#2081: GHC reports internal error: stg_ap_v_ret
------------------------------+---------------------------------------------
 Reporter:  thorkilnaur       |          Owner:                  
     Type:  bug               |         Status:  new             
 Priority:  normal            |      Milestone:  6.10.1          
Component:  Compiler          |        Version:  6.11            
 Severity:  normal            |     Resolution:                  
 Keywords:                    |     Difficulty:  Unknown         
 Testcase:                    |   Architecture:  Unknown/Multiple
       Os:  Unknown/Multiple  |  
------------------------------+---------------------------------------------
Changes (by thorkilnaur):

  * version:  6.9 => 6.11

Comment:

 You are right, the {{{+RTS -DSs}}} output was certainly not produced by a
 {{{timeout}}} compiled with {{{-threaded}}}. If I try that, I get:
 {{{
 $ /Users/thorkilnaur/tn/buildbot/ghc/tnaur-ppc-osx-2/tnaur-ppc-osx-
 head-2/build/ghc/stage1-inplace/ghc --make timeout.hs -fforce-recomp -O2
 -debug -threaded
 [1 of 1] Compiling Main             ( timeout.hs, timeout.o )
 Linking timeout ...
 $ ./timeout 200 'echo Something' +RTS -DSs
     a0cfe074: allocated 1 capabilities
     a0cfe074: new task (taskCount: 1)
     a0cfe074: returning; I want capability 0
     a0cfe074: resuming capability 0
     a0cfe074: starting new worker on capability 0
     a0cfe074: new worker task (taskCount: 2)
     a0cfe074: task exiting
     a0cfe074: new task (taskCount: 2)
     a0cfe074: returning; I want capability 0
     f0081000: ### NEW SCHEDULER LOOP (task: 0x600590, cap: 0x2ad30c)
     f0081000: giving up capability 0
     f0081000: passing capability 0 to worker 0xa0cfe074
     a0cfe074: resuming capability 0
     a0cfe074: created thread 1, stack size = f1 words
     a0cfe074: new bound thread (1)
     a0cfe074: ### NEW SCHEDULER LOOP (task: 0x6004d0, cap: 0x2ad30c)
     a0cfe074: ### Running thread 1 in bound thread
     a0cfe074: -->> running thread 1 ThreadRunGHC ...
     a0cfe074: thread 1 did a safe foreign call
     a0cfe074: freeing capability 0
     a0cfe074: thread 1: leaving RTS
     a0cfe074: returning; I want capability 0
     a0cfe074: resuming capability 0
     a0cfe074: thread 1: re-entering RTS
     a0cfe074: created thread 2, stack size = f1 words
     a0cfe074: --++ thread 1 (ThreadComplete) finished
     a0cfe074: bound thread (1) finished
     a0cfe074: passing capability 0 to worker 0xf0081000
     a0cfe074: task exiting
     a0cfe074: new task (taskCount: 2)
     a0cfe074: returning; I want capability 0
     a0cfe074: resuming capability 0
     a0cfe074: created thread 3, stack size = f1 words
     a0cfe074: new bound thread (3)
     a0cfe074: ### NEW SCHEDULER LOOP (task: 0x6004d0, cap: 0x2ad30c)
     f0081000: woken up on capability 0
     a0cfe074: ### this OS thread cannot run thread 2
     f0081000: capability 0 is owned by another task
     a0cfe074: giving up capability 0
     a0cfe074: passing capability 0 to worker 0xf0081000
     f0081000: woken up on capability 0
     f0081000: resuming capability 0
     f0081000: -->> running thread 2 ThreadRunGHC ...
     f0081000: thread 2 did a safe foreign call
     f0081000: passing capability 0 to bound task 0xa0cfe074
     f0081000: thread 2: leaving RTS
     a0cfe074: woken up on capability 0
     a0cfe074: resuming capability 0
     a0cfe074: ### Running thread 3 in bound thread
     a0cfe074: -->> running thread 3 ThreadRunGHC ...
     a0cfe074: created thread 4, stack size = f1 words
     a0cfe074: created thread 5, stack size = f1 words
     a0cfe074: --<< thread 3 (ThreadRunGHC) stopped: blocked
     a0cfe074: giving up capability 0
     a0cfe074: starting new worker on capability 0
     a0cfe074: new worker task (taskCount: 3)
     f0103000: ### NEW SCHEDULER LOOP (task: 0x6006b0, cap: 0x2ad30c)
     f0103000: -->> running thread 4 ThreadRunGHC ...
     f0103000: --<< thread 4 (ThreadRunGHC) stopped: blocked
     f0103000: -->> running thread 5 ThreadRunGHC ...
     f0103000: thread 5 did a safe foreign call
     f0103000: starting new worker on capability 0
     f0103000: new worker task (taskCount: 4)
     f0103000: thread 5: leaving RTS
     f0103000: forking!
     f0103000: new task (taskCount: 5)
     f0185000: ### NEW SCHEDULER LOOP (task: 0x600770, cap: 0x2ad30c)
     f0185000: giving up capability 0
     f0081000: returning; I want capability 0
     f0103000: returning; I want capability 0
     f0185000: passing capability 0 to worker 0xf0081000
     f0081000: resuming capability 0
     f0081000: thread 2: re-entering RTS
     f0081000: --<< thread 2 (ThreadRunGHC) stopped, yielding
     f0081000: giving up capability 0
     f0081000: passing capability 0 to worker 0xf0103000
     f0103000: resuming capability 0
     f0103000: passing capability 0 to worker 0xf0081000
     f0103000: task exiting
     f0103000: returning; I want capability 0
     f0103000: resuming capability 0
     f0103000: thread 5: re-entering RTS
 timeout: internal error: stg_ap_p_ret
     (GHC version 6.11.20081003 for powerpc_apple_darwin)
     Please report this as a GHC bug:
 http://www.haskell.org/ghc/reportabug
     f0103000: waking up thread 5 on cap 0
     f0103000: raising exception in thread 4.
     f0103000: raising exception in thread 3.
     f0103000: raising exception in thread 2.
     f0103000: discarding task -266842112
     f0103000: discarding task -267374592
     f0103000: discarding task -267907072
     f0103000: discarding task -1596989324
     f0103000: created thread 6, stack size = f1 words
     f0103000: new bound thread (6)
     f0103000: ### NEW SCHEDULER LOOP (task: 0x600830, cap: 0x2ad30c)
     f0103000: ### Running thread 6 in bound thread
     f0103000: -->> running thread 6 ThreadRunGHC ...
     f0081000: woken up on capability 0
     f0081000: capability 0 is owned by another task
 Something
 Abort trap
 $
 }}}
 Best regards
 Thorkil

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