Message ID | EB590324-281D-4023-92DC-8AAEE4AC2510@gmail.com |
---|---|
State | New |
Headers | show |
Hi Damjan, On Fri, Jul 1, 2011 at 10:56 AM, Damjan Marion <damjan.marion@gmail.com> wrote: > > On Jul 1, 2011, at 11:17 AM, Damjan Marion (damarion) wrote: > >> >> Hi, >> >> I have an issue when I try to run qemu-system-arm on Mac OS X. >> Sometime between 1 and 15 secs after qemu is started it crashes >> as shown bellow. >> >> Same thing on linux host works fine. >> >> Is anybody else experiencing this? >> Any Hints? > > After bisection seems that this starts happening after following patch: > > commit 09716e45a05cc0c93bcf55bd0c0888dd678e490f > Author: Alexander Graf <agraf@suse.de> > Date: Thu Jun 9 00:55:37 2011 +0200 > > sigfd: use pthread_sigmask > > > diff --git a/compatfd.c b/compatfd.c > index bd377c4..41586ce 100644 > --- a/compatfd.c > +++ b/compatfd.c > @@ -29,7 +29,7 @@ static void *sigwait_compat(void *opaque) > sigset_t all; > > sigfillset(&all); > - sigprocmask(SIG_BLOCK, &all, NULL); > + pthread_sigmask(SIG_BLOCK, &all, NULL); > > while (1) { > > > However before this patch qemu doesn't respond to keyboard (i.e. commit 31b7c261). > > Last full working commit is 630ecca. > > Thanks, > > Damjan > Can you try applying the following two patches and see if it solves your problem? http://patchwork.ozlabs.org/patch/100348/ http://patchwork.ozlabs.org/patch/100477/ Alexandre
On Jul 4, 2011, at 6:59 PM, Alexandre Raymond wrote: > Hi Damjan, > > > Can you try applying the following two patches and see if it solves > your problem? > > http://patchwork.ozlabs.org/patch/100348/ > http://patchwork.ozlabs.org/patch/100477/ > Unfortunately same thing happens: segmentation fault. Thanks, Damjan
Hi again Damjan, On Mon, Jul 4, 2011 at 6:35 PM, Damjan Marion <damjan.marion@gmail.com> wrote: > > On Jul 4, 2011, at 6:59 PM, Alexandre Raymond wrote: > >> Hi Damjan, >> >> >> Can you try applying the following two patches and see if it solves >> your problem? >> >> http://patchwork.ozlabs.org/patch/100348/ >> http://patchwork.ozlabs.org/patch/100477/ >> > > Unfortunately same thing happens: segmentation fault. You might also want to have a look at the following patches by Paolo: http://www.mail-archive.com/qemu-devel@nongnu.org/msg67088.html Finally, you might want to disable io-thead (if you've enabled it), which doesn't work properly on OS X. Alexandre
Hi Damjan, I've been able to reproduce the crash you're describing. Could you try the following patch, to see if it solves it? Alexandre On Tue, Jul 5, 2011 at 3:03 PM, Alexandre Raymond <cerbere@gmail.com> wrote: > Hi again Damjan, > > On Mon, Jul 4, 2011 at 6:35 PM, Damjan Marion <damjan.marion@gmail.com> wrote: >> >> On Jul 4, 2011, at 6:59 PM, Alexandre Raymond wrote: >> >>> Hi Damjan, >>> >>> >>> Can you try applying the following two patches and see if it solves >>> your problem? >>> >>> http://patchwork.ozlabs.org/patch/100348/ >>> http://patchwork.ozlabs.org/patch/100477/ >>> >> >> Unfortunately same thing happens: segmentation fault. > You might also want to have a look at the following patches by Paolo: > http://www.mail-archive.com/qemu-devel@nongnu.org/msg67088.html > > Finally, you might want to disable io-thead (if you've enabled it), > which doesn't work properly on OS X. > > Alexandre >
On 07/26/2011 06:58 AM, Alexandre Raymond wrote: > +#ifdef __APPLE__ > + if (sig == 0) continue; > +#endif From looking at the code this should not happen: http://fxr.watson.org/fxr/source/bsd/kern/kern_sig.c?v=xnu-792#L986 1046 sigw = (ut->uu_sigwait & siglist); ... 1053 signum = ffs((unsigned int)sigw); 1054 if (!signum) 1055 panic("sigwait with no signal wakeup"); 1056 ut->uu_siglist &= ~(sigmask(signum)); 1057 if (uap->sig != USER_ADDR_NULL) 1058 error = copyout(&signum, uap->sig, sizeof(int)); ?? Paolo
Indeed, I'd come to the exact same conclusion, yet I've witnessed it both in the debugger and with trace messages... Alexandre On Tue, Jul 26, 2011 at 4:46 AM, Paolo Bonzini <pbonzini@redhat.com> wrote: > On 07/26/2011 06:58 AM, Alexandre Raymond wrote: >> +#ifdef __APPLE__ >> + if (sig == 0) continue; >> +#endif > > From looking at the code this should not happen: > > http://fxr.watson.org/fxr/source/bsd/kern/kern_sig.c?v=xnu-792#L986 > > 1046 sigw = (ut->uu_sigwait & siglist); > ... > 1053 signum = ffs((unsigned int)sigw); > 1054 if (!signum) > 1055 panic("sigwait with no signal wakeup"); > 1056 ut->uu_siglist &= ~(sigmask(signum)); > 1057 if (uap->sig != USER_ADDR_NULL) > 1058 error = copyout(&signum, uap->sig, sizeof(int)); > > ?? > > Paolo >
On Tue, Jul 26, 2011 at 9:08 AM, Alexandre Raymond <cerbere@gmail.com> wrote: > Indeed, I'd come to the exact same conclusion, yet I've witnessed it > both in the debugger and with trace messages... > > Alexandre Note that I don't think that this is a proper patch. I simply want to verify that it solves the issue encountered by Damjan.
Hi Alexandre, I tried your patch and it works OK. Then I tried without it and seems that it also works ok. It might be 2 reasons: - I upgraded to Mac OS X 10.7 Lion - Something changed in qemu master branch I dont remember what was exact version I used when I reported this problem. Thanks, Damjan On Jul 26, 2011, at 6:58 AM, Alexandre Raymond wrote: > Hi Damjan, > > I've been able to reproduce the crash you're describing. > > Could you try the following patch, to see if it solves it? > > Alexandre > > On Tue, Jul 5, 2011 at 3:03 PM, Alexandre Raymond <cerbere@gmail.com> wrote: >> Hi again Damjan, >> >> On Mon, Jul 4, 2011 at 6:35 PM, Damjan Marion <damjan.marion@gmail.com> wrote: >>> >>> On Jul 4, 2011, at 6:59 PM, Alexandre Raymond wrote: >>> >>>> Hi Damjan, >>>> >>>> >>>> Can you try applying the following two patches and see if it solves >>>> your problem? >>>> >>>> http://patchwork.ozlabs.org/patch/100348/ >>>> http://patchwork.ozlabs.org/patch/100477/ >>>> >>> >>> Unfortunately same thing happens: segmentation fault. >> You might also want to have a look at the following patches by Paolo: >> http://www.mail-archive.com/qemu-devel@nongnu.org/msg67088.html >> >> Finally, you might want to disable io-thead (if you've enabled it), >> which doesn't work properly on OS X. >> >> Alexandre >> > <0001-Darwin-catch-invalid-return-of-sigwait.patch>
diff --git a/compatfd.c b/compatfd.c index bd377c4..41586ce 100644 --- a/compatfd.c +++ b/compatfd.c @@ -29,7 +29,7 @@ static void *sigwait_compat(void *opaque) sigset_t all; sigfillset(&all); - sigprocmask(SIG_BLOCK, &all, NULL); + pthread_sigmask(SIG_BLOCK, &all, NULL); while (1) {