Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-28 Thread Matthias Kilian
On Mon, Jun 28, 2010 at 09:52:22AM +0100, Simon Marlow wrote: > >After some more poor man's debugging (sprinkling some puts(3) into > >rts/posix/Signals.c), the problem seems to be that ioManagerDie() > >assumes that writing that `kill byte' (IO_MANAGER_DIE) wakes the > >service loop immediately, a

Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-28 Thread Simon Marlow
On 27/06/2010 20:00, Matthias Kilian wrote: [sorry for constantly replying to myself...] On Sat, Jun 26, 2010 at 10:42:02AM +0200, Matthias Kilian wrote: However, the munmaps happen after what looks like GHC cleanup. For example this comes before the munmaps: [...] then, after some more stuff

Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-27 Thread Matthias Kilian
[sorry for constantly replying to myself...] On Sat, Jun 26, 2010 at 10:42:02AM +0200, Matthias Kilian wrote: > However, the munmaps happen after what looks like GHC cleanup. For > example this comes before the munmaps: [...] > then, after some more stuff (like getrusage, gettimeofday, some > mpro

Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-26 Thread Matthias Kilian
On Fri, Jun 25, 2010 at 09:16:58PM +0200, Matthias Kilian wrote: > > So perhaps something called munmap() at some point? Have you tried > > strace? (or equivalent on OpenBSD, truss?). > > Yep (it's ktrace on OpenBSD). Took me some time (this bug tries to > hide really hard if you *want* it to ha

Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-25 Thread Matthias Kilian
On Tue, Jun 22, 2010 at 09:18:20AM +0100, Simon Marlow wrote: > So perhaps something called munmap() at some point? Have you tried > strace? (or equivalent on OpenBSD, truss?). Yep (it's ktrace on OpenBSD). Took me some time (this bug tries to hide really hard if you *want* it to happen). All I

Re: Weird impossible segfault in select_loop on OpenBSD

2010-06-22 Thread Simon Marlow
On 19/06/2010 19:10, Matthias Kilian wrote: Hi, Short story: I get impossible segfaults with ghc-6.12.3 on OpenBSD (unless I completely disable threading support when building ghc). Long story: in libraries/base/GHC/Conc.lhs, service_loop, the call to c_select sometimes segfaults because of in

Weird impossible segfault in select_loop on OpenBSD

2010-06-19 Thread Matthias Kilian
Hi, Short story: I get impossible segfaults with ghc-6.12.3 on OpenBSD (unless I completely disable threading support when building ghc). Long story: in libraries/base/GHC/Conc.lhs, service_loop, the call to c_select sometimes segfaults because of inaccessible (not mapped) readfds and writefds a