[GHC] #11406: RTS gets stuck in scheduleDetectDeadlock()

#11406: RTS gets stuck in scheduleDetectDeadlock() -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime | Version: 8.1 System | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Steps to reproduce: - Compile HEAD. - Add this line to MkId.mkDataConRep: {{{#!haskell pprTrace "mkDataConRep" (text "wrap_body:" <+> ppr wrap_body) (return ()) }}} - Recompile only stage1. (stage2 will fail, see next step) - Compile any file using newly generated stage1. GHC gets stuck, not using any CPU or RAM. The stack trace: {{{ #0 0x00007fd56d570650 in __pause_nocancel () at ../sysdeps/unix/syscall- template.S:81 #1 0x0000000002174e11 in awaitUserSignals () at rts/posix/Signals.c:343 #2 0x0000000002168a6a in scheduleDetectDeadlock (pcap=<synthetic pointer>, task=<optimized out>) at rts/Schedule.c:931 #3 schedule (task=0x42fa8e0, initialCapability=<optimized out>) at rts/Schedule.c:282 #4 scheduleWaitThread (tso=<optimized out>, ret=ret@entry=0x0, pcap=pcap@entry=0x7fffb90b7778) at rts/Schedule.c:2380 #5 0x0000000002187724 in rts_evalLazyIO (cap=cap@entry=0x7fffb90b7778, p=<optimized out>, ret=ret@entry=0x0) at rts/RtsAPI.c:500 #6 0x0000000002166637 in real_main () at rts/RtsMain.c:63 #7 hs_main (argc=<optimized out>, argv=<optimized out>, main_closure=<optimized out>, rts_config=...) at rts/RtsMain.c:114 #8 0x0000000000421fe4 in main () }}} It's basically stuck in pause() syscall. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11406 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11406: RTS gets stuck in scheduleDetectDeadlock() -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Runtime System | Version: 8.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonmar): This is probably an infinite loop, i.e. a blackhole. The trace you added forces something too early and causes a deadlock. For some reason we don't detect and report blackhole loops as `<<loop>>` in GHC, that is probably worth investigating. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11406#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC