On Wed, Mar 05, 2025 at 07:55:48AM +0100, Thomas Huth wrote:
> On 27/02/2025 23.06, Eric Blake wrote:
> > At least the simple trace backend works by spawning a helper thread,
> > and setting up an atexit() handler that coordinates completion with
> > the helper thread.  But since atexit registrations survive fork() but
> > helper threads do not, this means that qemu-nbd configured to use the
> > simple trace will deadlock waiting for a thread that no longer exists
> > when it has daemonized.
> > 
> > Better is to follow the example of vl.c: don't call any setup
> > functions that might spawn helper threads until we are in the final
> > process that will be doing the work worth tracing.
> > 

...
> This also sounds like the best option to me!
> 
> Reviewed-by: Thomas Huth <th...@redhat.com>

Thanks; added to my NBD queue.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to