#5214: SIGSEGV  in yieldCapability ()
-----------------------------+----------------------------------------------
  Reporter:  j.waldmann      |          Owner:                
      Type:  bug             |         Status:  new           
  Priority:  normal          |      Milestone:                
 Component:  Runtime System  |        Version:  7.4.1         
Resolution:                  |       Keywords:                
        Os:  Linux           |   Architecture:  x86_64 (amd64)
   Failure:  Runtime crash   |     Difficulty:                
  Testcase:                  |      Blockedby:                
  Blocking:                  |        Related:                
-----------------------------+----------------------------------------------
Changes (by vshabanov):

 * cc: vshabanoff@… (added)
  * status:  closed => new
  * version:  7.0.3 => 7.4.1
  * resolution:  wontfix =>


Comment:

 I've got similar bug just after I've started using STM (through
 Network.Riak.Connection.Pool). I'm also using FFI (curl & hsdns).

 It starting to appear with -N2.

 I've compiled with -debug and got
 {{{
 Queue: internal error: ASSERTION FAILED: file rts/Schedule.c, line 1268

     (GHC version 7.4.1 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 }}}

 gdb backtrace
 {{{
 Core was generated by `./Queue +RTS -N2'.
 Program terminated with signal 6, Aborted.
 #0  0x00007f394f848405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 (gdb) bt
 #0  0x00007f394f848405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007f394f84b680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x0000000002116fa2 in rtsFatalInternalErrorFn (
     s=0x21e64c8 "ASSERTION FAILED: file %s, line %u\n", ap=0x7f394b3f4870)
     at rts/RtsMessages.c:170
 #3  0x0000000002116b5b in barf (
     s=0x21e64c8 "ASSERTION FAILED: file %s, line %u\n")
     at rts/RtsMessages.c:42
 #4  0x0000000002116bbe in _assertFail (filename=0x21e7541
 "rts/Schedule.c",
     linenum=1268) at rts/RtsMessages.c:57
 #5  0x000000000211d6e4 in scheduleHandleThreadFinished (cap=0x27a40d0,
     task=0x27fe060, t=0x7f3943ae05d8) at rts/Schedule.c:1268
 #6  0x000000000211c891 in schedule (initialCapability=0x27a40d0,
     task=0x27fe060) at rts/Schedule.c:545
 #7  0x000000000211ea47 in scheduleWaitThread (tso=0x7f394c52d488,
     ret=0x7f394b3f4ab0, pcap=0x7f394b3f4ab8) at rts/Schedule.c:2154
 #8  0x0000000002113f1f in rts_evalIO (cap=0x7f394b3f4ab8,
 p=0x7f394c52d0d8,
     ret=0x7f394b3f4ab0) at rts/RtsAPI.c:456
 #9  0x0000000001242d82 in NetworkziCurlziEasy_dmd3 ()
 #10 0x00007f3950dcab48 in ?? ()
    from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
 #11 0x00007f3950de5434 in ?? ()
    from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
 #12 0x00007f3950ddec42 in ?? ()
    from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
 #13 0x00007f3950de9230 in ?? ()
    from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
 #14 0x00007f3950de9ba5 in curl_multi_perform ()
    from /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
 #15 0x0000000000718297 in sjos_info ()
 #16 0x0000000000000000 in ?? ()
 }}}

 You can download -Ds output from http://stuff.bazqux.com/Ds.bz2

 With parallel GC disabled I'm getting different error (and I'm getting it
 much faster -- usually in a minute from program start)
 {{{
 Queue: internal error: ASSERTION FAILED: file rts/Capability.c, line 444

     (GHC version 7.4.1 for x86_64_unknown_linux)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
 }}}

 gdb backtrace:
 {{{
 Core was generated by `./Queue +RTS -N8 -I10 -qg'.
 Program terminated with signal 6, Aborted.
 #0  0x00007f0785c74405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 (gdb) bt
 #0  0x00007f0785c74405 in raise () from /lib/x86_64-linux-gnu/libc.so.6
 #1  0x00007f0785c77680 in abort () from /lib/x86_64-linux-gnu/libc.so.6
 #2  0x0000000002116fa2 in rtsFatalInternalErrorFn (
     s=0x21e64c8 "ASSERTION FAILED: file %s, line %u\n", ap=0x7f077a0fcb80)
     at rts/RtsMessages.c:170
 #3  0x0000000002116b5b in barf (
     s=0x21e64c8 "ASSERTION FAILED: file %s, line %u\n") at
 rts/RtsMessages.c:42
 #4  0x0000000002116bbe in _assertFail (filename=0x21e41de
 "rts/Capability.c",
     linenum=444) at rts/RtsMessages.c:57
 #5  0x00000000021111a9 in releaseCapability_ (cap=0x3db9f70,
     always_wakeup=rtsFalse) at rts/Capability.c:444
 #6  0x000000000211160c in releaseCapabilityAndQueueWorker (cap=0x3db9f70)
     at rts/Capability.c:565
 #7  0x0000000002111b50 in yieldCapability (pCap=0x7f077a0fcd48,
 task=0x3e5b2e0)
     at rts/Capability.c:692
 #8  0x000000000211cc1f in scheduleYield (pcap=0x7f077a0fcd70,
 task=0x3e5b2e0)
     at rts/Schedule.c:659
 #9  0x000000000211c245 in schedule (initialCapability=0x3db9f70,
     task=0x3e5b2e0) at rts/Schedule.c:332
 #10 0x000000000211ea47 in scheduleWaitThread (tso=0x7f077b1075b8,
     ret=0x7f077a0fce50, pcap=0x7f077a0fce98) at rts/Schedule.c:2154
 #11 0x0000000002113f8e in rts_evalStableIO (cap=0x7f077a0fce98, s=0x12,
     ret=0x0) at rts/RtsAPI.c:478
 #12 0x0000000002137b3b in forkOS_createThreadWrapper (entry=0x12)
     at rts/posix/OSThreads.c:200
 #13 0x00007f0785fccb40 in start_thread ()
    from /lib/x86_64-linux-gnu/libpthread.so.0
 #14 0x00007f0785d1736d in clone () from /lib/x86_64-linux-gnu/libc.so.6
 #15 0x0000000000000000 in ?? ()
 }}}

 gdb backtrace w/o -debug:
 {{{
 Core was generated by `./Queue +RTS -N8 -I10 -S -sstderr -qg'.
 Program terminated with signal 11, Segmentation fault.
 #0  0x0000000002110ede in yieldCapability ()
 (gdb) bt
 #0  0x0000000002110ede in yieldCapability ()
 #1  0x0000000002117153 in schedule ()
 #2  0x000000000211794b in scheduleWorker ()
 #3  0x00002b72f82bfb40 in start_thread ()
    from /lib/x86_64-linux-gnu/libpthread.so.0
 #4  0x00002b72f85aa36d in clone () from /lib/x86_64-linux-gnu/libc.so.6
 #5  0x0000000000000000 in ?? ()
 }}}

 Without Network.Riak.Connection.Pool (which uses
 http://hackage.haskell.org/package/resource-pool internally, which uses
 STM) program works without any error for days.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5214#comment:5>
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

Reply via email to