All threaded programs fail RTS sanity testing.
Simon Marlow
marlowsd at gmail.com
Mon Nov 22 04:41:42 EST 2010
On 22/11/2010 02:19, Ben Lippmeier wrote:
>
> Hi Simon,
> RTS sanity checking is failing with all threaded programs, which sounds like something nasty has happened under the hood. Sanity checking threaded programs worked in 6.12.1 -- is it still supposed to work in 7?
>
>
> desire:tmp benl$ ~/ghc/perf/ghc-stage2 --version
> The Glorious Glasgow Haskell Compilation System, version 7.1.20101121
>
> desire:tmp benl$ ~/ghc/perf/ghc-stage2 --make Hello.hs -debug -threaded -fforce-recomp -rtsopts
> [1 of 1] Compiling Main ( Hello.hs, Hello.o )
> Linking Hello ...
>
> desire:tmp benl$ ./Hello +RTS -N2 -DS
> Hello: internal error: ASSERTION FAILED: file rts/sm/Storage.c, line 640
>
> (GHC version 7.1.20101121 for i386_apple_darwin)
> Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
> Abort trap
> desire:tmp benl$
>
>
> The corresponding assertion is:
>
> rts/sm/Storage.c:637
> p = bd->free;
> bd->free += n;
>
> IF_DEBUG(sanity, ASSERT(*((StgWord8*)p) == 0xaa));
> return p;
>
>
> At rts/sm/Sanity.c:470 it says that "heap sanity checking doesn't work with SMP, because we can't zero the slop". However, that code looks like it's skipping over the slop in closures, while the code in Storage.c just appears to want free space in nurseries to be filled with 0xaa, which would also work in threaded mode.
I have a patch that I think fixes this that I just extracted from my
new-GC branch. I'll validate and push.
Cheers,
Simon
More information about the Cvs-ghc
mailing list