[GHC] #15608: Segfault in retainer profiling
GHC
ghc-devs at haskell.org
Thu Sep 13 07:18:20 UTC 2018
#15608: Segfault in retainer profiling
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Profiling | Version: 8.5
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5134
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
One of the problems is that because of recursive `retainClosure()` calls
retainer profiler sometimes fills the C stack. I currently see 14000+
stack frames because of this loop:
{{{
#174645 retainClosure
(c0=<optimized out>, cp0=cp0 at entry=0x4201ecaa20, r0=r0 at entry=0x6810bc0
<CCS_SYSTEM>)
at rts/RetainerProfile.c:1598
#174646 0x00000000059b48c7 in retain_small_bitmap
(c_child_r=<optimized out>, c=0x4201ecaa20, bitmap=0, size=<optimized
out>, p=0x4201ecaa50)
at rts/RetainerProfile.c:1140
#174647 retain_PAP_payload
(n_args=<optimized out>, payload=0x4201ecaa50, fun=<optimized out>,
c_child_r=<optimized out>, pap=0x4201ecaa20)
at rts/RetainerProfile.c:1334
#174648 retainClosure
(c0=<optimized out>, cp0=cp0 at entry=0x4203affe88, r0=r0 at entry=0x6810bc0
<CCS_SYSTEM>)
at rts/RetainerProfile.c:1598
}}}
I don't understand how retainer profiler works yet. It has a stack, and a
maxStack variable, but I don't understand why we sometimes push work to
the stack and sometimes recurse, and maxStack seems to be unused.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15608#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list