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

CI: Bus error in ccall test on Apple M1 #47171

Closed
Keno opened this issue Oct 14, 2022 · 3 comments · Fixed by #47214
Closed

CI: Bus error in ccall test on Apple M1 #47171

Keno opened this issue Oct 14, 2022 · 3 comments · Fixed by #47214
Labels
ci Continuous integration system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips

Comments

@Keno
Copy link
Member

Keno commented Oct 14, 2022

https://buildkite.com/julialang/julia-master/builds/16986


From worker 5:
--
  | From worker 5:	[59480] signal (10): Bus error: 10
  | From worker 5:	in expression starting at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/ccall.jl:1196
  | From worker 5:	gc_mark_loop at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	_jl_gc_collect at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_gc_collect at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_gc_pool_alloc_noinline at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_gc_alloc at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_alloc_svec_uninit at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_alloc_svec at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_unionall_ at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_unionall at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_unionall_ at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_unionall at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_all at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	intersect_types at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_has_empty_intersection at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ml_matches at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_matching_methods at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	_methods_by_ftype at ./reflection.jl:954 [inlined]
  | From worker 5:	_findall at ./compiler/methodtable.jl:107 [inlined]
  | From worker 5:	#findall#277 at ./compiler/methodtable.jl:76 [inlined]
  | From worker 5:	findall##kw at ./compiler/methodtable.jl:75 [inlined]
  | From worker 5:	#findall#279 at ./compiler/methodtable.jl:123
  | From worker 5:	findall##kw at ./compiler/methodtable.jl:114 [inlined]
  | From worker 5:	find_matching_methods at ./compiler/abstractinterpretation.jl:334
  | From worker 5:	abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:80
  | From worker 5:	abstract_call_known at ./compiler/abstractinterpretation.jl:1840
  | From worker 5:	abstract_call at ./compiler/abstractinterpretation.jl:1911
  | From worker 5:	abstract_call at ./compiler/abstractinterpretation.jl:1890
  | From worker 5:	abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2043
  | From worker 5:	abstract_eval_statement at ./compiler/abstractinterpretation.jl:2258
  | From worker 5:	abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2459
  | From worker 5:	typeinf_local at ./compiler/abstractinterpretation.jl:2634
  | From worker 5:	typeinf_nocycle at ./compiler/abstractinterpretation.jl:2740
  | From worker 5:	_typeinf at ./compiler/typeinfer.jl:244
  | From worker 5:	typeinf at ./compiler/typeinfer.jl:215
  | From worker 5:	typeinf_ext at ./compiler/typeinfer.jl:1079
  | From worker 5:	typeinf_ext_toplevel at ./compiler/typeinfer.jl:1112
  | From worker 5:	typeinf_ext_toplevel at ./compiler/typeinfer.jl:1108
  | From worker 5:	jfptr_typeinf_ext_toplevel_17341 at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/sys.dylib (unknown line)
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_type_infer at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_generate_fptr_impl at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-codegen.1.9.dylib (unknown line)
  | From worker 5:	jl_compile_method_internal at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	top-level scope at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/ccall.jl:1275
  | From worker 5:	jl_toplevel_eval_flex at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_toplevel_eval_flex at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_toplevel_eval_in at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	eval at ./boot.jl:370 [inlined]
  | From worker 5:	include_string at ./loading.jl:1523
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	_include at ./loading.jl:1583
  | From worker 5:	include at ./Base.jl:439 [inlined]
  | From worker 5:	macro expansion at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/testdefs.jl:29 [inlined]
  | From worker 5:	macro expansion at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
  | From worker 5:	macro expansion at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/testdefs.jl:23 [inlined]
  | From worker 5:	macro expansion at ./timing.jl:474 [inlined]
  | From worker 5:	#runtests#3 at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/testdefs.jl:21
  | From worker 5:	runtests##kw at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/testdefs.jl:5 [inlined]
  | From worker 5:	runtests##kw at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/share/julia/test/testdefs.jl:5
  | From worker 5:	unknown function (ip: 0x345f94043)
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	jl_f__call_latest at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	do_apply at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	#invokelatest#2 at ./essentials.jl:812
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	do_apply at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	invokelatest##kw at ./essentials.jl:807
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	do_apply at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	#110 at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.9/Distributed/src/process_messages.jl:285
  | From worker 5:	run_work_thunk at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.9/Distributed/src/process_messages.jl:70
  | From worker 5:	macro expansion at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/usr/share/julia/stdlib/v1.9/Distributed/src/process_messages.jl:285 [inlined]
  | From worker 5:	#109 at ./task.jl:514
  | From worker 5:	unknown function (ip: 0x117e9c32f)
  | From worker 5:	ijl_apply_generic at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	start_task at /Users/administrator/.julia/scratchspaces/a66863c6-20e8-4ff4-8a62-49f30b1f605e/agent-cache/default-macmini-aarch64-1.0/build/default-macmini-aarch64-1-0/julialang/julia-master/julia-037801226f/lib/julia/libjulia-internal.1.9.dylib (unknown line)
  | From worker 5:	Allocations: 1194571879 (Pool: 1193221190; Big: 1350689); GC: 1433


@Keno Keno added ci Continuous integration system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips labels Oct 14, 2022
@vtjnash
Copy link
Member

vtjnash commented Oct 15, 2022

I don't know why line numbers are failing there, but do note that this is running a stress-test for memory alignment issues with the HVA/HFA calling convention mismatches when it crashes (albeit in GC, while handling a return or argument value late in this test)

@gbaraldi
Copy link
Member

gbaraldi commented Oct 17, 2022

I couldn't reproduce this outside of the testing harness. Including the ccall file in the Repl works fine. But doing Base.runtests("ccall") leads to a hang, and running the activity monitor profiler shows it hanged inside a throw from the signal handler. Which I imagine is the bus error.

2511 ijl_sig_throw  (in libjulia-internal.1.9.dylib) + 52  [0x1009eff4c]  task.c:814 
2511 throw_internal  (in libjulia-internal.1.9.dylib) + 44  [0x1009efe74]  task.c:755 
2511 throw_internal  (in libjulia-internal.1.9.dylib) + 108  [0x1009efeb4]  

@gbaraldi
Copy link
Member

@George9000 Bisected this to the foreign threads PR #46609

vtjnash added a commit that referenced this issue Oct 18, 2022
We were checking and clearing the gc tag bits on a random memory
location when running these quiescent finalizers (which do not point to
julia memory, so they are not tag bits, but probably libc malloc
metadata).

Detected by ASAN (and also CI)

Fixes #47171
Closes #47177
vtjnash added a commit that referenced this issue Oct 18, 2022
We were checking and clearing the gc tag bits on a random memory
location when running these quiescent finalizers (which do not point to
julia memory, so they are not tag bits, but probably libc malloc
metadata).

Detected by ASAN (and also CI)

Fixes #47171
Closes #47177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration system:apple silicon Affects Apple Silicon only (Darwin/ARM64) - e.g. M1 and other M-series chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants