Skip to content

Conversation

@JackStouffer
Copy link
Contributor

No description provided.

@dlang-bot
Copy link
Contributor

Thanks for your pull request, @JackStouffer!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JackStouffer
Copy link
Contributor Author

@wilzbach GDB got the stack trace

@wilzbach
Copy link
Contributor

@wilzbach GDB got the stack trace

Posting it here for posterity:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000a79b58 in gc.impl.conservative() ()
#0  0x0000000000a79b58 in gc.impl.conservative() ()
#1  0x0000000000a7a14a in gc.impl.conservative() ()
#2  0x0000000000a832ca in rt.util.container.treap() ()
#3  0x0000000000a836bc in rt.util.container.treap() ()
#4  0x0000000000a836aa in rt.util.container.treap() ()
#5  0x0000000000a836aa in rt.util.container.treap() ()
#6  0x0000000000a832a2 in rt.util.container.treap() ()
#7  0x0000000000a7a0f0 in gc.impl.conservative() ()
#8  0x0000000000a7abd6 in gc.impl.conservative() ()

Not really helpful :/

@nemanja-boric-sociomantic
Copy link
Contributor

Are you on the wrong PR? 👼

@JackStouffer
Copy link
Contributor Author

@nemanja-boric-sociomantic no, dscanner has been segfaulting and we finally got a stack trace

@JackStouffer
Copy link
Contributor Author

@wilzbach I thought linux gave line numbers for stack traces?

@wilzbach
Copy link
Contributor

I thought linux gave line numbers for stack traces?

It has been broken since a few releases: http://forum.dlang.org/post/ufpwobqmisamazigcaav@forum.dlang.org

@wilzbach
Copy link
Contributor

I logged into the CircleCi machine via ssh and here's the full stacktrace:

0x0000000000a79b58 in gc.impl.conservative() ()
#0  0x0000000000a79b58 in gc.impl.conservative() ()
#1  0x0000000000a7a14a in gc.impl.conservative() ()
#2  0x0000000000a832ca in rt.util.container.treap() ()
#3  0x0000000000a836bc in rt.util.container.treap() ()
#4  0x0000000000a832a2 in rt.util.container.treap() ()
#5  0x0000000000a7a0f0 in gc.impl.conservative() ()
#6  0x0000000000a7abd6 in gc.impl.conservative() ()
#7  0x0000000000a78c2a in gc.impl.conservative() ()
#8  0x0000000000a7cd29 in gc.impl.conservative() ()
#9  0x0000000000a7671f in gc.impl.conservative() ()
#10 0x0000000000a4548f in gc_qalloc ()
#11 0x0000000000a44df0 in core.memory.GC.qalloc() ()
#12 0x0000000000a4e862 in std.array() ()
#13 0x00000000009350cf in std.array() (this=0x7fffffff9f70, extra=1) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:3062
#14 0x0000000000935011 in std.array() (this=..., items=...) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:3065
#15 0x00000000009a9982 in ddoc.macros() (output=..., macros=..., val=...) at libddoc/src/ddoc/macros.d:752
#16 0x00000000009a92c6 in ddoc.macros() (output=..., macros=..., input=...) at libddoc/src/ddoc/macros.d:478
#17 0x00000000009a9b5b in ddoc.macros() (output=..., macros=..., input=...) at libddoc/src/ddoc/macros.d:257
#18 0x00000000009a9861 in ddoc.macros() (output=..., macros=..., val=...) at libddoc/src/ddoc/macros.d:740
#19 0x00000000009a92c6 in ddoc.macros() (output=..., macros=..., input=...) at libddoc/src/ddoc/macros.d:478
#20 0x00000000009a9056 in ddoc.macros() (output=..., macros=..., input=...) at libddoc/src/ddoc/macros.d:186
#21 0x00000000009a7fea in ddoc.macros.expand() (macros=..., input=...) at libddoc/src/ddoc/macros.d:205
#22 0x00000000009a5215 in ddoc.comments.parseComment() (macros=..., text=...) at libddoc/src/ddoc/comments.d:48
#23 0x00000000009b825c in analysis.has_public_example.HasPublicExampleCheck() (this=0x2aaaaabec740, decl=0x3442830) at src/analysis/has_public_example.d:89
#24 0x00000000009b7ffe in analysis.has_public_example.HasPublicExampleCheck() (this=0x2aaaaabec740, decl=0x34427e8)
    at src/analysis/has_public_example.d-mixin-95:95
#25 0x00000000009b7a4e in analysis.has_public_example.HasPublicExampleCheck.visit() (this=0x2aaaaabec740, mod=0x103f210)
    at src/analysis/has_public_example.d:65
#26 0x00000000009f61a3 in analysis.run.analyze() (staticAnalyze=true, tokens=..., moduleCache=..., analysisConfig=..., m=0x103f210, fileName=...)
    at src/analysis/run.d:498
#27 0x00000000009f3382 in analysis.run.analyze() (staticAnalyze=true, moduleCache=..., cache=..., config=..., fileNames=...) at src/analysis/run.d:182
#28 0x0000000000a32763 in D main (args=...) at src/main.d:237
#29 0x0000000000a46c74 in rt.dmain2._d_run_main() ()
#30 0x0000000000a46b04 in rt.dmain2._d_run_main() ()
#31 0x0000000000a46be3 in rt.dmain2._d_run_main() ()
#32 0x0000000000a46b04 in rt.dmain2._d_run_main() ()
#33 0x0000000000a46a6f in _d_run_main ()
#34 0x0000000000a3f236 in main ()

and another one:

#13 0x0000000000957618 in std.array() (this=..., arr=...) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:2856
        cap = 140737488332688
#14 0x0000000000957518 in std.array() () at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:3319
No locals.
#15 0x00000000009a9e8c in ddoc.sections.splitSections() (text=...) at libddoc/src/ddoc/sections.d:104
        lex = {current = {text = {length = 9, 
              ptr = 0x47fb0e4 "Evaluates to $(D AliasSeq!(F!(T[0]), F!(T[1]), ..., F!(T[$ - 1]))).EmptySingleTests whether all given items satisfy a template predicate, i.e. evaluates to\n$(D F!(T[0]) && F!(T[1]) && ... && F!(T[$ - "...}, type = 10 '\n'}, offset = 9, text = {length = 67, 
            ptr = 0x47fb0e4 "Evaluates to $(D AliasSeq!(F!(T[0]), F!(T[1]), ..., F!(T[$ - 1]))).EmptySingleTests whether all given items satisfy a template predicate, i.e. evaluates to\n$(D F!(T[0]) && F!(T[1]) && ... && F!(T[$ - "...}, _empty = false, parseHeader = true}
        app = {_data = 0x7fffffffa840}
        hasSummary = 80
        sliceStart = 4
        sliceEnd = 10980278
        name = {length = 4294944976, ptr = 0x94 <Address 0x94 out of bounds>}
        __r3510 = {length = 147, ptr = 0x94}
        __key3511 = 46912497471464
        section = @0x82f2c7: {name = {length = 292929668, ptr = 0x2819e13d8d4800 <Address 0x2819e13d8d4800 out of bounds>}, content = {length = 559320296, 
            ptr = 0x1b80888f8458b48 <Address 0x1b80888f8458b48 out of bounds>}, mapping = {length = 1207959552, ptr = 0x7fff07d81c3}}
#16 0x00000000009a4b9e in ddoc.comments.parseComment() (macros=..., text=...) at libddoc/src/ddoc/comments.d:21
        sections = {length = 4294945264, ptr = 0xa5c620}
        sMacros = {ptr = 0x94}
        m = {length = 0, ptr = 0x2aaaaabf4fe0}
        e = {length = 4294945296, ptr = 0x2aaaaabf4fe8}
        p = {length = 2864666880, ptr = 0x7fffffffaa98}
        __r3357 = {length = 0, ptr = 0x0}
        __key3358 = 148
        kv = {__expand_field_0 = {length = 4294945584, ptr = 0xa5c4f8 "UH\213\354H\203\354PH\211]\260H\211}\370H\213\032\213>\350\252\n\003"}, 
          __expand_field_1 = {length = 148, ptr = 0x7fffffffab60 "p\207", <incomplete sequence \336>}}
        __aaval3359 = @0x7fffffffaa60: {length = 4294945504, ptr = 0x34 <Address 0x34 out of bounds>}
        __r3360 = {length = 4294945504, ptr = 0x34}
        __key3361 = 140737488333680
        kv = @0x8e5102: {__expand_field_0 = {length = 1082493256, ptr = 0xe8870f0dfb83f85d <Address 0xe8870f0dfb83f85d out of bounds>}, __expand_field_1 = {
            length = 2332033027, ptr = 0x980c6348001fa032 <Address 0x980c6348001fa032 out of bounds>}}
        __r3362 = {length = 4294958140, ptr = 0x7}
        __key3363 = 140737488333616
        sec = @0xa4387c: {name = {length = 2484060293, ptr = 0x20ec8348ec8b4855 <Address 0x20ec8348ec8b4855 out of bounds>}, content = {length = 3766323528, 
            ptr = 0xf84d8948f0558948 <Address 0xf84d8948f0558948 out of bounds>}, mapping = {length = 1979332936, ptr = 0x74ff8548057500f0}}
        retVal = {sections = {length = 14583664, ptr = 0xde8770}}
#17 0x00000000009b825c in analysis.has_public_example.HasPublicExampleCheck() (this=0x2aaaaabed740, decl=0x3449208) at src/analysis/has_public_example.d:89

@wilzbach
Copy link
Contributor

And another one:

#13 0x0000000000957885 in std.array() (this=..., nelems=1) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:2968
        len = 0
        reqlen = 1
        newlen = 8
        u = 46912497489472
        overflow = false
        nbytes = 384
        bi = {base = 0xdf7560, size = 140737488332528, attr = 10783447}
#14 0x0000000000957a3d in std.array() (this=..., item=...) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:3019
        len = 0
        bigData = {length = 0, ptr = 0x7fffffffa6e0}
#15 0x0000000000957bb5 in std.array() (this=..., rhs=...) at ../dmd/generated/linux/release/64/../../../../../phobos/std/array.d:3109
No locals.
#16 0x00000000009a9f57 in ddoc.sections.splitSections() (text=...) at libddoc/src/ddoc/sections.d:111
        lex = {current = {text = {length = 7, ptr = 0x47fb016 "Returns the type from TList that is the most derived from type T.\nIf none are found, T is returned.DerivedToFrontReturns the `AliasSeq` TList with the types sorted so that the most\nderived types come "...}, type = 10 '\n'}, offset = 7, text = {length = 99, ptr = 0x47fb016 "Returns the type from TList that is the most derived from type T.\nIf none are found, T is returned.DerivedToFrontReturns the `AliasSeq` TList with the types sorted so that the most\nderived types come "...}, _empty = false, parseHeader = true}
        app = {_data = 0x2aaaaabf9640}
        hasSummary = false
        sliceStart = 0
        sliceEnd = 0
        name = {length = 0, ptr = 0x0}
        __r3510 = {length = 119, ptr = 0x78}
        __key3511 = 46912497489448
        section = @0x82f2c7: {name = {length = 292929668, ptr = 0x2819e13d8d4800 <Address 0x2819e13d8d4800 out of bounds>}, content = {length = 559320296, ptr = 0x1b80888f8458b48 <Address 0x1b80888f8458b48 out of bounds>}, mapping = {length = 1207959552, ptr = 0x7fff07d81c3}}
#17 0x00000000009a4b9e in ddoc.comments.parseComment() (macros=..., text=...) at libddoc/src/ddoc/comments.d:21
        sections = {length = 4294945264, ptr = 0xa5c620}
        sMacros = {ptr = 0x78}
        m = {length = 0, ptr = 0x2aaaaabf9620}
        e = {length = 4294945296, ptr = 0x2aaaaabf9628}
        p = {length = 2864662656, ptr = 0x7fffffffaa98}
        __r3357 = {length = 0, ptr = 0x0}
        __key3358 = 120
        kv = {__expand_field_0 = {length = 4294945584, ptr = 0xa5c4f8 "UH\213\354H\203\354PH\211]\260H\211}\370H\213\032\213>\350\252\n\003"}, __expand_field_1 = {length = 120, ptr = 0x7fffffffab60 "p\207", <incomplete sequence \336>}}
        __aaval3359 = @0x7fffffffaa60: {length = 4294945504, ptr = 0x30 <Address 0x30 out of bounds>}
        __r3360 = {length = 4294945504, ptr = 0x30}
        __key3361 = 140737488333680
        kv = @0x8e5102: {__expand_field_0 = {length = 1082493256, ptr = 0xe8870f0dfb83f85d <Address 0xe8870f0dfb83f85d out of bounds>}, __expand_field_1 = {length = 2332033027, ptr = 0x980c6348001fa032 <Address 0x980c6348001fa032 out of bounds>}}
        __r3362 = {length = 4294958140, ptr = 0x7}
        __key3363 = 140737488333616
        sec = @0xa4387c: {name = {length = 2484060293, ptr = 0x20ec8348ec8b4855 <Address 0x20ec8348ec8b4855 out of bounds>}, content = {length = 3766323528, ptr = 0xf84d8948f0558948 <Address 0xf84d8948f0558948 out of bounds>}, mapping = {length = 1979332936, ptr = 0x74ff8548057500f0}}
        retVal = {sections = {length = 14583664, ptr = 0xde8770}}
#18 0x00000000009b825c in analysis.has_public_example.HasPublicExampleCheck() (this=0x2aaaaabeda40, decl=0x343cb08) at src/analysis/has_public_example.d:89
No locals.

Another one:

0x0000000000a79b58 in gc.impl.conservative() ()
#0  0x0000000000a79b58 in gc.impl.conservative() ()
No symbol table info available.
#1  0x0000000000a7a14a in gc.impl.conservative() ()
No symbol table info available.
#2  0x0000000000a832ca in rt.util.container.treap() ()
No symbol table info available.
#3  0x0000000000a836bc in rt.util.container.treap() ()
No symbol table info available.
#4  0x0000000000a836aa in rt.util.container.treap() ()
No symbol table info available.
#5  0x0000000000a832a2 in rt.util.container.treap() ()
No symbol table info available.
#6  0x0000000000a7a0f0 in gc.impl.conservative() ()
No symbol table info available.
#7  0x0000000000a7abd6 in gc.impl.conservative() ()
No symbol table info available.
#8  0x0000000000a78c2a in gc.impl.conservative() ()
No symbol table info available.
#9  0x0000000000a7cd29 in gc.impl.conservative() ()
No symbol table info available.
#10 0x0000000000a7671f in gc.impl.conservative() ()
No symbol table info available.
#11 0x0000000000a4548f in gc_qalloc ()
No symbol table info available.
#12 0x0000000000a7fa17 in rt.lifetime.__arrayAlloc() ()
No symbol table info available.
#13 0x0000000000a49570 in _d_arraysetlengthT ()
No symbol table info available.
#14 0x00000000009c0618 in analysis.redundant_attributes.RedundantAttributesCheck.pushScope() (this=0x2aaaaabd3000) at src/analysis/redundant_attributes.d:167
        __pitmp4108 = 4
        __arraylength4109 = 0x2aaaaabd3038

Information gathered:

  • seems to be an allocation issue in druntime as I get a totally different stack trace
  • only occurs on every second or third run (concurrency!)
  • I tried to compile druntime + phobos with debug, but I couldn't reproduce the segfault then

@wilzbach
Copy link
Contributor

(rebased to hopefully avoid the persistent CircleCi segfaults).

@dlang-bot dlang-bot merged commit 3a0f39f into master Dec 14, 2017
@wilzbach wilzbach deleted the JackStouffer-patch-1 branch December 14, 2017 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants