[GHC] #2858: Segmentation fault due to race between IO manager
and installSignals.
GHC
trac at galois.com
Thu Feb 19 06:22:54 EST 2009
#2858: Segmentation fault due to race between IO manager and installSignals.
------------------------------------------------+---------------------------
Reporter: dsh | Owner: igloo
Type: merge | Status: new
Priority: normal | Milestone: 6.10.2
Component: libraries/base | Version: 6.10.1
Severity: normal | Resolution:
Keywords: posix signal threaded IOmanager | Difficulty: Unknown
Testcase: | Os: Linux
Architecture: Unknown/Multiple |
------------------------------------------------+---------------------------
Changes (by simonmar):
* owner: simonmar => igloo
* type: bug => merge
Comment:
I think these patches should fix the problem, since we no longer have the
RTS table of `StablePtrs` to signal handlers. I'd be grateful if you
could test the new code and let me know if you still encounter any
problems.
patch to libraries/unix:
{{{
Thu Feb 19 02:05:32 PST 2009 Simon Marlow <marlowsd at gmail.com>
* Rewrite of signal-handling.
Ignore-this: 1579194c10020dc34af715c225a9f207
The API is the same (for now). The new implementation has the
capability to define signal handlers that have access to the siginfo
of the signal (#592), but this functionality is not exposed in this
patch.
#2451 is the ticket for the new API.
The main purpose of bringing this in now is to fix race conditions in
the old signal handling code (#2858). Later we can enable the new
API in the HEAD.
Implementation differences:
- More of the signal-handling is moved into Haskell. We store the
table of signal handlers in an MVar, rather than having a table of
StablePtrs in the RTS.
- In the threaded RTS, the siginfo of the signal is passed down the
pipe to the IO manager thread, which manages the business of
starting up new signal handler threads. In the non-threaded RTS,
the siginfo of caught signals is stored in the RTS, and the
scheduler starts new signal handler threads.
}}}
patch to libraries/base:
{{{
Thu Feb 19 02:22:03 PST 2009 Simon Marlow <marlowsd at gmail.com>
* Rewrite of signal-handling (base patch; see also ghc and unix patches)
}}}
patch to ghc:
{{{
Thu Feb 19 02:31:42 PST 2009 Simon Marlow <marlowsd at gmail.com>
* Rewrite of signal-handling (ghc patch; see also base and unix patches)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2858#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list