#951: stage2 on sparc dies with "schedule: re-entered unsafely"
-----------------------------+----------------------------------------------
Reporter: duncan | Owner: benl
Type: bug | Status: assigned
Priority: normal | Milestone: 6.10.2
Component: Build System | Version: 6.6
Severity: major | Resolution:
Keywords: | Difficulty: Unknown
Testcase: N/A | Os: Unknown/Multiple
Architecture: sparc |
-----------------------------+----------------------------------------------
Comment (by duncan):
I tried using ghc-6.8.3 and gcc-3.4.3 (the Solaris 10 `/usr/sfw/bin/gcc`).
The build went through fine but the stage2/ghc-inplace just hangs when
run. GDB reports that we're waiting on something:
{{{
(gdb) bt
#0 0xff044a30 in __lwp_park () from /lib/libc.so.1
#1 0xff03e968 in cond_sleep_queue () from /lib/libc.so.1
#2 0xff03ea84 in cond_wait_queue () from /lib/libc.so.1
#3 0xff03f004 in cond_wait () from /lib/libc.so.1
#4 0xff03f040 in pthread_cond_wait () from /lib/libc.so.1
#5 0x018ef654 in waitCondition ()
#6 0x018e52c4 in waitForReturnCapability ()
#7 0x018e86c4 in rts_lock ()
#8 0x018e7de0 in real_main ()
#9 0x018e7f64 in main ()
}}}
Relinking `stage2/ghc-6.8.3` without `-threaded` we get a segfault
instead. GDB reports that it occurs in `stg_ap_v_fast`:
{{{
(gdb) bt
#0 0x019033b4 in stg_ap_v_fast ()
#1 0x018e9a74 in scheduleWaitThread ()
#2 0x018e6b6c in real_main ()
#3 0x018e6cc8 in main ()
}}}
Relinking stage2 with the debug rts seems to make it work ok. At least it
does not die on startup. In fact `stage2/ghc-inplace --interactive` also
works in that it can eval `1+1`.
Anyway, the conclusion does seem to be that this version of gcc does not
like the rts. It's interesting that the debug one works. Does it get built
with less aggressive gcc optimisations perhaps?
For the moment I think I'd just recommend that we make ghc's `./configure`
reject `gcc-3.x` on Sparc platforms. We may well also like to warn if
people are using `gcc-4.2` as it is known to be very slow. We've not
tested 4.3 because the mangler didn't like it last time we tried.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/951#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs