Bug 18720 – Segfault in src/gc/impl/conservative/gc.d:1990
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-04-04T01:40:41Z
Last change time
2018-07-17T10:51:22Z
Assigned to
No Owner
Creator
Seb
Comments
Comment #0 by greensunny12 — 2018-04-04T01:40:41Z
From https://circleci.com/gh/dlang/phobos/7257
---
Program received signal SIGSEGV, Segmentation fault.
0x0000000000b17fec in gc.impl.conservative() (this=..., ptop=0x608f670, pbot=0x608f630) at src/gc/impl/conservative/gc.d:1990
1990 auto p = *p1;
#0 0x0000000000b17fec in gc.impl.conservative() (this=..., ptop=0x608f670, pbot=0x608f630) at src/gc/impl/conservative/gc.d:1990
#1 0x0000000000b188f1 in gc.impl.conservative() (this=0x7fffffff9b70, __applyArg0=...) at src/gc/impl/conservative/gc.d:2188
#2 0x0000000000b23d5d in rt.util.container.treap() (this=0x7fffffff9b30, e=...) at src/rt/util/container/treap.d:47
#3 0x0000000000b24135 in rt.util.container.treap() (dg=..., node=0x5d5c210) at src/rt/util/container/treap.d:221
#4 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5ef5950) at src/rt/util/container/treap.d:224
#5 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5ef4ec0) at src/rt/util/container/treap.d:224
#6 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5ef45b0) at src/rt/util/container/treap.d:224
#7 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5783e90) at src/rt/util/container/treap.d:224
#8 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5607660) at src/rt/util/container/treap.d:224
#9 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x5905eb0) at src/rt/util/container/treap.d:224
#10 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x2c35530) at src/rt/util/container/treap.d:224
#11 0x0000000000b24161 in rt.util.container.treap() (dg=..., node=0x1a85a40) at src/rt/util/container/treap.d:224
#12 0x0000000000b23d93 in rt.util.container.treap() (this=..., dg=...) at src/rt/util/container/treap.d:52
#13 0x0000000000b23d2f in rt.util.container.treap() (this=..., dg=...) at src/rt/util/container/treap.d:47
#14 0x0000000000b18870 in gc.impl.conservative() (this=..., nostack=false) at src/gc/impl/conservative/gc.d:2185
#15 0x0000000000b19336 in gc.impl.conservative() (this=..., nostack=false) at src/gc/impl/conservative/gc.d:2417
#16 0x0000000000b17479 in gc.impl.conservative() (this=..., bits=0, alloc_size=@0x7fffffff9e08: 32, bin=1 '\001') at src/gc/impl/conservative/gc.d:1711
#17 0x0000000000b1730a in gc.impl.conservative() (this=..., bits=0, alloc_size=@0x7fffffff9e08: 32, size=32) at src/gc/impl/conservative/gc.d:1676
#18 0x0000000000b152a1 in gc.impl.conservative() (this=0xf4a250, ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>, alloc_size=@0x7fffffff9e08: 32, bits=0, size=32) at src/gc/impl/conservative/gc.d:517
#19 0x0000000000b1b35e in gc.impl.conservative() (this=0xf4a250, _param_3=@0x7fffffff9e28: 0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>, _param_2=@0x7fffffff9e08: 32, _param_1=@0x7fffffff9e30: 0, _param_0=@0x7fffffff9e38: 32) at src/gc/impl/conservative/gc.d:390
#20 0x0000000000b15343 in gc.impl.conservative() (this=0xf4a250, __HID11=0x7fffffff9ee8, ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>, bits=0, size=32) at src/gc/impl/conservative/gc.d:543
#21 0x0000000000ac8957 in gc_qalloc (__HID9=0x7fffffff9ee8, sz=32, ba=0, ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>) at src/gc/proxy.d:144
#22 0x0000000000ac8163 in core.memory.GC.qalloc() (__HID2=0x7fffffff9ee8, ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>, ba=0, sz=32) at src/core/memory.d:406
#23 0x0000000000b1eab6 in _d_newitemU (_ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>) at src/rt/lifetime.d:1102
#24 0x0000000000acc0f9 in _d_newitemiT (_ti=0xeb0300 <TypeInfo_S3std5array__T8AppenderTAS7dsymbol16string_interning14InternedStringZQCd4Data.__init()>) at src/rt/lifetime.d:1124
#25 0x000000000099c31c in std.array() (this=..., arr=...) at /home/circleci/dmd/generated/linux/debug/64/../../../../../phobos/std/array.d:2884
#26 0x000000000099c21c in std.array() () at /home/circleci/dmd/generated/linux/debug/64/../../../../../phobos/std/array.d:3406
#27 0x00000000009a8a9c in std.array() (r=...) at /home/circleci/dmd/generated/linux/debug/64/../../../../../phobos/std/array.d:133
#28 0x0000000000a9f3f0 in dscanner.analysis.mismatched_args.MismatchedArgumentCheck.visit() (this=0x7ffff7fda7c0, fce=0x1683be8) at src/dscanner/analysis/mismatched_args.d:55
#29 0x00000000009c0ce5 in dparse.ast.UnaryExpression.accept() (this=0x1683ad8, visitor=0x7ffff7fda7c0) at libdparse/src/dparse/ast.d-mixin-3267:3271
---
Comment #1 by greensunny12 — 2018-04-10T01:46:32Z
Just to clarify a bit more about this, this is spuriously happening on CircleCi for dlang/phobos when it runs DScanner and apparently the GC finds some invalid memory during its marking phase.