#5897: GHC runtime task workers are not released with C FFI
------------------------------+---------------------------------------------
 Reporter:  sanketr           |          Owner:                
     Type:  bug               |         Status:  new           
 Priority:  normal            |      Component:  Runtime System
  Version:  7.4.1             |       Keywords:  worker, ffi   
       Os:  Unknown/Multiple  |   Architecture:  x86_64 (amd64)
  Failure:  None/Unknown      |       Testcase:                
Blockedby:                    |       Blocking:                
  Related:  4262              |  
------------------------------+---------------------------------------------

Comment(by sanketr):

 Just figured out how to reproduce the segmentation fault/bus error I have
 been seeing with more complicated code this test code is derived from. The
 test code will consistently produce bus error or segmentation fault on Mac
 OS 10.7.2, after twenty or so iterations, if I set nThreads in main of
 T.hs to say 30. It seems to crash in pthread, during call to lock mutex in
 sendSignal C code - I wonder if it is related to some kind of mutex leak
 in interaction between GHC RTS and C FFI. gdb output from core below:


 {{{
 $ gdb ./T /cores/core.2372
 GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul  1 10:50:06 UTC
 2011)
 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 "x86_64-apple-darwin"...Reading symbols for
 shared libraries ... done

 Reading symbols for shared libraries . done
 Reading symbols for shared libraries ........................... done
 #0  0x00007fff9321fbca in __psynch_cvwait ()
 (gdb)


 }}}

 I can reproduce the crash consistently on quad-core iMac with "-N3"
 runtime option.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5897#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to