qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, Cornelia Huck <cohuck@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] qemu-nbd vs 'simple' trace backend vs iotest 147
Date: Fri, 13 Jul 2018 08:40:19 +0200	[thread overview]
Message-ID: <eb3dd1ec-a420-1ede-d42a-4a01c8e9892f@redhat.com> (raw)
In-Reply-To: <20180712163014.GB23738@stefanha-x1.localdomain>

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

On 12/07/2018 18:30, Stefan Hajnoczi wrote:
> On Wed, Jul 11, 2018 at 03:33:21PM +0200, Cornelia Huck wrote:
>> The other qemu-nbds (the inet and the unix socket ones from the first
>> run, the second inet one from the second run) have a single thread with
>> the same backtrace I posted above.
> 
> We just discussed this on IRC, but for the record:
> 
> qemu-nbd --fork will fork the process after the simpletrace write-out
> thread has been spawned.  The child process lacks this thread (due to
> how fork(2) handles multithreading).  Either qemu-nbd needs to
> initialize tracing later (but that means we cannot trace early init) or
> simpletrace needs a way to respawn the write-out thread.

You can use pthread_atfork for this.

Paolo


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-07-13  6:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-09 13:45 [Qemu-devel] qemu-nbd vs 'simple' trace backend vs iotest 147 Cornelia Huck
2018-07-11 13:06 ` Stefan Hajnoczi
2018-07-11 13:15   ` Cornelia Huck
2018-07-11 13:33     ` Cornelia Huck
2018-07-12 16:30       ` Stefan Hajnoczi
2018-07-13  6:40         ` Paolo Bonzini [this message]
2018-07-13 13:53           ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb3dd1ec-a420-1ede-d42a-4a01c8e9892f@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).