
Thanks Robert. I don't believe that particular bug is on our critical path, but I'm glad they have a fix. I haven't tried the patch myself, not having a FreeBSD build handy. The current status w.r.t. GHC is: - I merged a fix to the timeout program in our testsuite that fixes occasional hangs on FreeBSD (issue was calling fork() from the child of fork(), not allowed according to POSIX). - I did a complete build and testsuite run with -lthr instead of -pthread, this completes without problems. - When GHC itself is linked with the threaded RTS and -pthread, it occasionally hangs (I saw about 5 hangs during a testsuite run of 2000 tests). When it hangs, it is consuming 100% CPU. I tried attached to the hung GHC process using gdb, and got this: ~ > gdb --pid=53978 GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". Attaching to process 53978 /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib-svr4.c :1443: internal-error: legacy_fetch_link_map_offsets called without legacy link_map support enabled. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib-svr4.c :1443: internal-error: legacy_fetch_link_map_offsets called without legacy link_map support enabled. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) y Abort trap: 6 (core dumped) At this stage I'm tempted to default to using -lthr, since this appears to work. I can't make any further progress on the -pthread hangs without gdb working, unfortunately. If you think I should report the gdb crash, where is the best place? Cheers, Simon On 07 August 2006 18:31, Robert Watson wrote:
Dear many,
I pinged the FreeBSD threads list about the previously mentioned problem, and was sent this patch by Dan Eischen. The FreeBSD threads mailing list is extremely responsive to bug reports; my recommendation is that we direct future specific bug reports, as well as any feedback on this patch, to that list.
Thanks,
Robert N M Watson Computer Laboratory University of Cambridge
---------- Forwarded message ---------- Date: Mon, 7 Aug 2006 13:15:21 -0400 (EDT) From: Daniel Eischen
To: Robert Watson Cc: threads@freebsd.org Subject: Re: GHC 6.4.3 on FreeBSD (fwd) On Mon, 7 Aug 2006, Robert Watson wrote:
I've been talking to the Haskell folk about problems they've had getting their threaded runtime running on FreeBSD. Here's one of their problem reports. Since I'm not up on how threads and signals are supposed to act, I can't confirm the below is a bug, of course, but figured you (experts) would be able to respond better.
Try this patch.