segmentation fault in Gtk2Hs callbacks

Simon Marlow marlowsd at gmail.com
Fri May 7 05:59:52 EDT 2010


On 06/05/2010 09:15, Axel Simon wrote:
> Good morning,
>
> I'm looking at ticket http://hackage.haskell.org/trac/ghc/ticket/4038
> and wonder who is to blame:
>
> - this segmentation fault occurs in Gtk2Hs' callbacks (i.e. a Haskell
> function pointer is being passed to C land) and in a signal (where a
> general machinery is used to invoke a Haskell function), thus, it
> doesn't seem to be the way callbacks are used
>
> - the segfault only occurs in ghc 6.12.2 not in ghc 6.12.1
>
> However, in the release notes of 6.12.2 there are no changes indicated
> that look like the RTS has changed. So I would like to simply ask: Are
> any of the GHC developers aware of any change in the concurrency or GC
> behaviour in GHC's RTS? Have any other parameters changed (perhaps
> something with multithreading?).
>
> Neither Gtk2Hs nor GHC seem to have changed, yet, there are these
> intermittend segfaults. It would be good to know which part is the culprit.

It's my fault, I'm afraid.  To fix a deadlock bug in 6.12.1, we merged a 
patch that changed some of the RTS data structures used for callbacks, 
and unfortunately that patch had a bug affecting nested callbacks.  We 
didn't have a test for that case, so we didn't notice the bug.

I'm working on getting the fix in right now, and we'll push out 6.12.3 
with the fix as soon as we can.  Sorry about this.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list