[GHC] #15543: Binary crashes under dtrace
GHC
ghc-devs at haskell.org
Wed Aug 22 20:45:25 UTC 2018
#15543: Binary crashes under dtrace
----------------------------------+----------------------------------------
Reporter: last_g | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.4.3
Resolution: | Keywords: dtrace, crash
Operating System: MacOS X | Architecture: Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
----------------------------------+----------------------------------------
Comment (by last_g):
Similar happens with System Tap but I don't know is it related or not.
{{{
[lastg at devvm2623.lla2 ~/scratches/ghc_tests] sudo stap pc.stp -c
'~/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3 10'
WARNING: function _start return probe is blacklisted: keyword at
pc.stp:24:1
source: probe process.function("*").return { trace(-1, $$return) }
^
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("hs_atomic_add32").return
inode-offset 0000000000098b90 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("m32_free_internal at rts/linker/M32Alloc.c:176").return
inode-offset 00000000000bd6b0 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("hs_atomic_add32")
inode-offset 0000000000098b90 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("atoi@/usr/include/stdlib.h:278")
inode-offset 0000000000000808 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("atoi@/usr/include/stdlib.h:278")
inode-offset 0000000000000238 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("m32_free_internal at rts/linker/M32Alloc.c:176")
inode-offset 00000000000bd6b0 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("get_itbl at includes/rts/storage/ClosureMacros.h:84")
inode-offset 0000000000000131 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("Bdescr at includes/rts/storage/Block.h:172")
inode-offset 0000000000000018 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("bco_sizeW at includes/rts/storage/ClosureMacros.h:354")
inode-offset 0000000000000040 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("XXH32_round at rts/xxhash.c:255")
inode-offset 0000000000000250 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("XXH32_round at rts/xxhash.c:255")
inode-offset 00000000000000da registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("XXH_readLE64_align at rts/xxhash.c:580")
inode-offset 00000000000001cc registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("loadObj_ at rts/Linker.c:1446")
inode-offset 0000000000000012 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("preloadObjectFile at rts/Linker.c:1319")
inode-offset 0000000000000040 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("ghciRemoveSymbolTable at rts/Linker.c:227")
inode-offset 0000000000000040 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("stat@/usr/include/x86_64
-linux-gnu/sys/stat.h:453") inode-offset 0000000000000040 registration
error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("appendToRunQueue at rts/Schedule.h:130")
inode-offset 00000000000000d2 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("unlockClosure at rts/SMPClosureOps.h:108")
inode-offset 0000000000000110 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.8-4-3.O3").function("lockClosure at rts/SMPClosureOps.h:99")
inode-offset 0000000000000018 registration error (rc -524)
WARNING: Child process exited with signal 11 (Segmentation fault)
WARNING: /usr/bin/staprun exited with status: 1
Pass 5: run failed. [man error::pass5]
}}}
and on `master`
{{{
[lastg at devvm2623.lla2 ~/scratches/ghc_tests] sudo stap pc.stp -c
'~/scratches/ghc_tests/test_cases/FibbSlow.master.O3 10'
WARNING: function _start return probe is blacklisted: keyword at
pc.stp:24:1
source: probe process.function("*").return { trace(-1, $$return) }
^
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("hs_atomic_add32").return
inode-offset 00000000000805c0 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("m32_free_internal at rts/linker/M32Alloc.c:176").return
inode-offset 000000000008f500 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("hs_atomic_add32")
inode-offset 00000000000805c0 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("get_itbl at includes/rts/storage/ClosureMacros.h:84")
inode-offset 0000000000000131 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("Bdescr at includes/rts/storage/Block.h:170")
inode-offset 00000000000001b0 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("Bdescr at includes/rts/storage/Block.h:170")
inode-offset 0000000000000191 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("XXH32_round at rts/xxhash.c:255")
inode-offset 0000000000000251 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("thunk_sizeW_fromITBL at includes/rts/storage/ClosureMacros.h:313")
inode-offset 0000000000000040 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("m32_free_internal at rts/linker/M32Alloc.c:176")
inode-offset 000000000008f500 registration error (rc -524)
WARNING: probe
process("/home/lastg/scratches/ghc_tests/test_cases/FibbSlow.master.O3").function("ghciRemoveSymbolTable at rts/Linker.c:228")
inode-offset 0000000000000040 registration error (rc -524)
WARNING: Child process exited with signal 11 (Segmentation fault)
WARNING: /usr/bin/staprun exited with status: 1
Pass 5: run failed. [man error::pass5]
}}}
In the same time, it gets the same warnings but works when attached to a
running process with {{{ sudo stap pc.stp -x `pgrep Fib` }}}. I suppose
there's something with process/RTS initialization.
I also tested different compiler versions: it crashes on 8.2, 8.4 and
master and works well on 8.0.
{{{ pc.stp: }}}
{{{
#! /usr/bin/env stap
function trace(entry_p, extra) {
%( $# > 1 %? if (tid() in trace) %)
printf("%s%s%s %s\n",
thread_indent (entry_p),
(entry_p>0?"->":"<-"),
ppfunc (),
extra)
}
probe process.function("*") { trace(1, $$parms) }
probe process.function("*").return { trace(-1, $$return) }
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15543#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list