[GHC] #10154: strange closure type 983040 (GHC version 7.8.3 for x86_64_unknown_linux)
GHC
ghc-devs at haskell.org
Wed Apr 15 03:40:11 UTC 2015
#10154: strange closure type 983040 (GHC version 7.8.3 for x86_64_unknown_linux)
-------------------------------------+-------------------------------------
Reporter: masterdezign | Owner:
Type: bug | Status: closed
Priority: high | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: invalid | Keywords: strange
Operating System: Linux | closure type
Type of failure: Runtime crash | Architecture:
Blocked By: | Unknown/Multiple
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* status: infoneeded => closed
* resolution: => invalid
Comment:
I tried building with `-debug -rtsopts` and running with `+RTS -DS` under
gdb and sure enough, many hours later, I got this:
{{{
...
Running epsilon=5.0e-3 delta=1.8e-2
Running epsilon=5.0e-3 delta=1.9e-2
Running epsilon=5.0e-3 delta=2.0e-2
[New Thread 0x7fffa53ff700 (LWP 18847)]
epsilon=2.0e-2 delta=1.0e-3 => 0 head(s) (92.3%)
Simul: internal error: ASSERTION FAILED: file rts/sm/Storage.c, line 789
(GHC version 7.8.4 for x86_64_unknown_linux)
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe5dfc700 (LWP 18737)]
0x00007ffff6798077 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or
directory.
(gdb) bt
#0 0x00007ffff6798077 in __GI_raise (sig=sig at entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007ffff6799458 in __GI_abort () at abort.c:89
#2 0x00000000007e5087 in rtsFatalInternalErrorFn (s=0x854810 "ASSERTION
FAILED: file %s, line %u\n", ap=0x7fffe5df7cd8) at rts/RtsMessages.c:170
#3 0x00000000007e4cbf in barf (s=0x854810 "ASSERTION FAILED: file %s,
line %u\n") at rts/RtsMessages.c:42
#4 0x00000000007e4d22 in _assertFail (filename=0x85a1c8
"rts/sm/Storage.c", linenum=789) at rts/RtsMessages.c:57
#5 0x0000000000804d69 in allocate (cap=0xacec60, n=8) at
rts/sm/Storage.c:789
#6 0x000000000080f522 in stg_newByteArrayzh ()
#7 0x0000000000000000 in ?? ()
}}}
The failed assertion is at the end of `allocate`:
{{{
IF_DEBUG(sanity, ASSERT(*((StgWord8*)p) == 0xaa));
}}}
Inspecting the memory before `p` (the pointer that `allocate` has just
allocated, and is about to return) I see
{{{
(gdb) x/ga p-8
0x7ffff42ec9c0: 0x812e60 <stg_ARR_WORDS_info>
(gdb)
0x7ffff42ec9c8: 0x30
(gdb)
0x7ffff42ec9d0: 0x30002e0030002d
(gdb)
0x7ffff42ec9d8: 0x30003000300030
(gdb)
0x7ffff42ec9e0: 0x30003200300031
(gdb)
0x7ffff42ec9e8: 0x33003200340038
(gdb)
0x7ffff42ec9f0: 0x31003100340032
(gdb)
0x7ffff42ec9f8: 0x33003500380035
(gdb)
0x7ffff42eca00: 0xaaaaaaaaaaaa0032
(gdb)
}}}
so, I strongly suspect that something in the C++ code in the `double-
conversion` library is writing past the end of an allocated array.
It's quite a lot of C++ code though, so I don't particularly want to
investigate further. I'll file a bug with `double-conversion`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10154#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list