From: "Michael S. Tsirkin" <mst@redhat.com>
To: malc <av1474@comtv.ru>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] qemu: work around for "posix-aio-compat"
Date: Fri, 9 Oct 2009 01:19:18 +0200 [thread overview]
Message-ID: <20091008231918.GA8607@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0910090215350.3153@linmac.oyster.ru>
On Fri, Oct 09, 2009 at 02:17:13AM +0400, malc wrote:
> On Thu, 8 Oct 2009, Michael S. Tsirkin wrote:
>
> > On Fri, Oct 09, 2009 at 01:13:12AM +0400, malc wrote:
> > > On Fri, 9 Oct 2009, malc wrote:
> > >
> > > > On Thu, 8 Oct 2009, Michael S. Tsirkin wrote:
> > > >
> > > > > With commit ee3993069ff55fa6f1c64daf1e09963e340db8e4,
> > > > > "posix-aio-compat: avoid signal race when spawning a thread"
> > > > > winxp installation on a raw format file fails
> > > > > during disk format, with a message "your
> > > > > disk may be damaged".
> > > > >
> > > > > This commit moved signal mask from aio thread to creating thread.
> > > > > It turns out if we keep the mask in aio thread as well, the problem
> > > > > disappears. It should not be needed, but since this is harmless, let's
> > > > > keep it around until someone inclined to debug pthread library internals
> > > > > can check this issue.
> > > > >
> > > > > While we are at it, convert sigprocmask to pthread_sigmask
> > > > > as per posix.
> > > >
> > > > Thanks for the work you've put into it, i'll try to see how all of this
> > > > works on my x86 machine.
> > > >
> > > > [..snip..]
> > >
> > > Nope, still can not reproduce... So indeed it appears someone is needed,
> > > who:
> > >
> > > a. Can reproduce
> > > b. Cares
>
> [..snip..]
>
> > >
> > > So the thing that works for you can be replaced with some dummy loop
> > > or something,
> >
> > Exactly. I just did this:
> >
> > sigset_t xset;
> >
> > static void *aio_thread(void *unused)
> > {
> > pid_t pid;
> > sigset_t set;
> >
> > /* block all signals */
> > /* Should not be necessary as we should inherit mask
> > * from creating thread. However, without this,
> > * on FC11, WinXP installation fails during disk format
> > * saying disk was damaged. pthread library bug?
> > * */
> > memset(&set, 0, sizeof set);
> > memcpy(&xset, &set, sizeof set);
> >
> > and it also helps.
>
> Now question of the week is - why does pausing the work that aio_thread
> does helps things? Come to think of it - your machine (judging by -j 8)
> is a lot faster than anything i have in my vicinity, and that might be
> why i can not reproduce it...
No, I think it's just memory layout.
We have some memory corruption, using some stack space
moves it about to a non-critical place.
> --
> mailto:av1474@comtv.ru
next prev parent reply other threads:[~2009-10-08 23:21 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-08 20:37 [Qemu-devel] [PATCH] qemu: work around for "posix-aio-compat" Michael S. Tsirkin
2009-10-08 20:53 ` [Qemu-devel] " malc
2009-10-08 21:13 ` malc
2009-10-08 21:46 ` Michael S. Tsirkin
2009-10-08 22:17 ` malc
2009-10-08 23:19 ` Michael S. Tsirkin [this message]
2009-10-09 1:06 ` [Qemu-devel] Emulated network cards Natalia Portillo
2009-10-09 8:54 ` Luca Tettamanti
2009-10-09 13:05 ` Natalia Portillo
2009-10-09 13:16 ` [Qemu-devel] Re: [PATCH] qemu: work around for "posix-aio-compat" malc
2009-10-08 21:00 ` Michael S. Tsirkin
2009-10-20 18:39 ` [Qemu-devel] " Mark McLoughlin
2009-10-20 18:57 ` [Qemu-devel] " Paolo Bonzini
2009-10-21 15:42 ` Michael S. Tsirkin
2009-10-21 15:54 ` Michael S. Tsirkin
2009-10-21 17:28 ` Paolo Bonzini
2009-10-21 17:35 ` Michael S. Tsirkin
2009-10-21 17:44 ` Paolo Bonzini
2009-10-21 17:46 ` Michael S. Tsirkin
2009-10-21 18:38 ` Paolo Bonzini
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=20091008231918.GA8607@redhat.com \
--to=mst@redhat.com \
--cc=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.