Segfaulting programs with GHC 6.4.1

John Goerzen jgoerzen at complete.org
Thu Oct 20 15:32:18 EDT 2005


Hello,

I am running GHC 6.4.1 on Linux x86.  I have a program that is
multithreaded, and since the upgrade from GHC 6.4, the program is
segfaulting.

Initially, the program was written using forkIO.  It segfaulted, but
not very often.  I was able to capture a strace that showed it doing a
select right before the crash, but it didn't crash reliably enough for
me to get anything else.

With forkOS, it is crashing much more reliably and I was able to get
some output from +RTS -debug -DbsS.  I'm including the last few lines
below, and can attach more if you need it.

I have no C extensions or unsafe IO going on here.  I am using HSQL to
connect to PostgreSQL.  Previously, I used HSQL to connect to Sqlite3,
and the change didn't make any difference, so I suspect the DB can be
ruled out.

Other than that, the program is network-intensive and DB-intensive and
uses about 20 threads to download data from various hosts and note
what it did in the DB.

Any insight, and suggestions for next steps, would be greatly
appreciated.

Thanks,

-- John

        thread 571 @ 0xb7a1e000 is blocked on an external call
        thread 590 @ 0xb7a36828 is blocked on an MVar
        thread 591 @ 0xb7a36420 is blocked on an external call
        thread 641 @ 0xb7a494a8 has completed
        thread 642 @ 0xb7a490a0 has completed
sched (task 0xaa1bebb0): worker: giving up capability (no threads to run)
sched (task 0xaa1bebb0): worker: released capability
sched (task 0xaa1bebb0): worker: wait for capability (cond: (nil))
sched (task 0xab1ffbb0): worker: returning; workers waiting: 0
sched (task 0xab1ffbb0): worker: got capability
sched (task 0xab1ffbb0): worker (token 2): re-entering RTS
sched (task 0xab1ffbb0): thread 2 did a _ccall_gc
sched (task 0xab1ffbb0): worker: released capability
sched (task 0xab1ffbb0): worker (token 2): leaving RTS
sched (task 0xb71ffbb0): worker: returning; workers waiting: 0
sched (task 0xb71ffbb0): worker: got capability
sched (task 0xb71ffbb0): worker (token 571): re-entering RTS
sched (task 0xab9ffbb0): worker: returning; workers waiting: 0
sched (task 0xab1ffbb0): worker: returning; workers waiting: 1
Segmentation fault (core dumped)


More information about the Glasgow-haskell-users mailing list