Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault when marking GC shadow stack #56141

Closed
d-netto opened this issue Oct 13, 2024 · 1 comment · Fixed by #56472
Closed

Segfault when marking GC shadow stack #56141

d-netto opened this issue Oct 13, 2024 · 1 comment · Fixed by #56472
Labels
bug Indicates an unexpected problem or unintended behavior ci Continuous integration GC Garbage collector

Comments

@d-netto
Copy link
Member

d-netto commented Oct 13, 2024

See https://buildkite.com/julialang/julia-master/builds/40903#01928664-6aa2-43b2-a0a0-49ab0fd41de7.

We're probably storing a garbage pointer in the shadow stack.

Don't know if it's reproducible.

@d-netto d-netto added bug Indicates an unexpected problem or unintended behavior ci Continuous integration labels Oct 13, 2024
@giordano
Copy link
Contributor

See https://buildkite.com/julialang/julia-master/builds/40903#01928664-6aa2-43b2-a0a0-49ab0fd41de7.

Since the log disappears after some time and isn't findable by doing a search here, I'm copying the top of the error message:

      From worker 10:	[31604] signal 11 (2): Segmentation fault: 11
      From worker 10:	in expression starting at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-ddc36168a9/share/julia/test/arrayops.jl:1934
      From worker 10:	gc_try_claim_and_push at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:1547 [inlined]
      From worker 10:	gc_mark_stack at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:1954 [inlined]
      From worker 10:	gc_mark_outrefs at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:2177 [inlined]
      From worker 10:	gc_mark_loop_serial_ at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:2385
      From worker 10:	gc_mark_loop_serial at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:2408
      From worker 10:	_jl_gc_collect at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:2968
      From worker 10:	ijl_gc_collect at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:3351
      From worker 10:	maybe_collect at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:346 [inlined]
      From worker 10:	jl_gc_small_alloc_inner at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:760 [inlined]
      From worker 10:	jl_gc_small_alloc_noinline at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/gc-stock.c:818 [inlined]
      From worker 10:	jl_gc_alloc_ at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/./julia_internal.h:549
      From worker 10:	ijl_alloc_svec_uninit at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/simplevector.c:63 [inlined]
      From worker 10:	ijl_svec_copy at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/simplevector.c:81
      From worker 10:	insert_nondiagonal at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/subtype.c:4715
      From worker 10:	_widen_diagonal at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/subtype.c:4734 [inlined]
      From worker 10:	widen_diagonal at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/subtype.c:4745
      From worker 10:	widen_diagonal at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-HL2F7YQ3XH.0/build/default-honeycrisp-HL2F7YQ3XH-0/julialang/julia-master/src/subtype.c:4743
      From worker 10:	widen_diagonal at ./essentials.jl:561 [inlined]
      From worker 10:	instanceof_tfunc at ./compiler/tfuncs.jl:118
      From worker 10:	jfptr_instanceof_tfunc_33200.1 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-ddc36168a9/lib/julia/sys.dylib (unknown line)
      From worker 10:	instanceof_tfunc at ./compiler/tfuncs.jl:123
      From worker 10:	jfptr_instanceof_tfunc_33200.1 at /Users/julia/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-honeycrisp-R17H3W25T9.0/build/default-honeycrisp-R17H3W25T9-0/julialang/julia-master/julia-ddc36168a9/lib/julia/sys.dylib (unknown line)
      From worker 10:	instanceof_tfunc at ./compiler/tfuncs.jl:100
      From worker 10:	apply_type_nothrow at ./compiler/tfuncs.jl:1680
      From worker 10:	_builtin_nothrow at ./compiler/tfuncs.jl:2252
      From worker 10:	builtin_nothrow at ./compiler/tfuncs.jl:2649 [inlined]
      From worker 10:	builtin_effects at ./compiler/tfuncs.jl:2560
      From worker 10:	abstract_call_known at ./compiler/abstractinterpretation.jl:2344
      From worker 10:	abstract_call at ./compiler/abstractinterpretation.jl:2535
      From worker 10:	abstract_call at ./compiler/abstractinterpretation.jl:2528
      From worker 10:	abstract_call at ./compiler/abstractinterpretation.jl:2683
      From worker 10:	abstract_eval_call at ./compiler/abstractinterpretation.jl:2701
      From worker 10:	abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2942
      From worker 10:	typeinf_local at ./compiler/abstractinterpretation.jl:3608
      From worker 10:	typeinf at ./compiler/abstractinterpretation.jl:3805
      From worker 10:	typeinf_ext at ./compiler/typeinfer.jl:1091
      From worker 10:	typeinf_ext_toplevel at ./compiler/typeinfer.jl:1162 [inlined]
      From worker 10:	typeinf_ext_toplevel at ./compiler/typeinfer.jl:1160

Side note, there's another ticket mentioning a segfault in gc_try_claim_and_push: #54328.

@giordano giordano added the GC Garbage collector label Oct 13, 2024
vtjnash added a commit that referenced this issue Nov 6, 2024
@vtjnash vtjnash closed this as completed in 671cd5e Nov 7, 2024
KristofferC pushed a commit that referenced this issue Nov 11, 2024
Fixes #56141
Introduced by #52228 (a624d44)

(cherry picked from commit 671cd5e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior ci Continuous integration GC Garbage collector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants