#3956: GHC6.12.2-RC1 runtime error: Invalid object in isRetainer(): 32
-----------------------------+----------------------------------------------
Reporter: jlouis | Owner:
Type: bug | Status: closed
Priority: highest | Milestone: 6.12.2
Component: Runtime System | Version:
Resolution: fixed | Keywords: GHC6.12.2-RC1 Retainer
Profiling isRetainer()
Difficulty: | Os: Linux
Testcase: | Architecture: x86_64 (amd64)
Failure: Runtime crash |
-----------------------------+----------------------------------------------
Changes (by igloo):
* status: new => closed
* resolution: => fixed
Comment:
Here's the stack trace of it going wrong:
{{{
#4 0x00000000004ef863 in isRetainer (c=0x79f390) at
rts/RetainerProfile.c:1141
#5 0x00000000004f05d0 in retainRoot (user=0x0, tl=0x7d25f0)
at rts/RetainerProfile.c:1792
#6 0x00000000004f9985 in markStablePtrTable (evac=0x4f0577 <retainRoot>,
user=0x0) at rts/Stable.c:366
#7 0x00000000004f065e in computeRetainerSet () at
rts/RetainerProfile.c:1830
#8 0x00000000004f08a1 in retainerProfile () at rts/RetainerProfile.c:2023
#9 0x00000000004ec5a7 in heapCensus () at rts/ProfHeap.c:1079
#10 0x00000000004f6a75 in scheduleDoGC (cap=0x7b3800, task=0x7ea300,
force_major=rtsTrue) at rts/Schedule.c:1513
#11 0x00000000004f60bd in scheduleDetectDeadlock (cap=0x7b3800,
task=0x7ea300)
at rts/Schedule.c:946
#12 0x00000000004f5020 in schedule (initialCapability=0x7b3800,
task=0x7ea300)
at rts/Schedule.c:329
#13 0x00000000004f7647 in scheduleWorker (cap=0x7b3800, task=0x7ea300)
}}}
The problem was that isRetainer didn't expect to be getting an IND_STATIC:
{{{
// IND_STATIC cannot be *c, *cp, *r in the retainer profiling loop.
case IND_STATIC:
barf("Invalid object in isRetainer(): %d", get_itbl(c)->type);
}}}
but isAlive ignores static closures, so doesn't look through IND_STATIC.
Worked around by
{{{
Fri Apr 9 11:26:41 BST 2010 Ian Lynagh <[email protected]>
* Handle IND_STATIC in isRetainer
IND_STATIC used to be an error, but at the moment it can happen
as isAlive doesn't look through IND_STATIC as it ignores static
closures. See trac #3956 for a program that hit this error.
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3956#comment:6>
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