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

GC root erroring in subtype? #49762

Closed
vtjnash opened this issue May 11, 2023 · 2 comments · Fixed by #49820
Closed

GC root erroring in subtype? #49762

vtjnash opened this issue May 11, 2023 · 2 comments · Fixed by #49820
Labels
ci Continuous integration heisenbug This bug occurs unpredictably rr trace included

Comments

@vtjnash
Copy link
Member

vtjnash commented May 11, 2023

      From worker 12:
      From worker 12:	Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
      From worker 12:	Exception: EXCEPTION_ACCESS_VIOLATION at 0x7ffc88df24d9 -- has_free_typevars at C:/workdir/src\jltypes.c:110
      From worker 12:	in expression starting at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\subtype.jl:1108
      From worker 12:	has_free_typevars at C:/workdir/src\jltypes.c:110
      From worker 12:	ijl_has_free_typevars at C:/workdir/src\jltypes.c:158 [inlined]
      From worker 12:	jl_precompute_memoized_dt at C:/workdir/src\jltypes.c:1646
      From worker 12:	inst_datatype_inner at C:/workdir/src\jltypes.c:2035
      From worker 12:	jl_apply_tuple_type_v_ at C:/workdir/src\jltypes.c:2091 [inlined]
      From worker 12:	ijl_apply_tuple_type_v at C:/workdir/src\jltypes.c:2101
      From worker 12:	macro expansion at C:\workdir\usr\share\julia\stdlib\v1.10\Test\src\Test.jl:512 [inlined]
      From worker 12:	test_properties at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\subtype.jl:683
      From worker 12:	unknown function (ip: 000002c3af7d3903)
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	do_call at C:/workdir/src\interpreter.c:125
      From worker 12:	eval_value at C:/workdir/src\interpreter.c:222
      From worker 12:	eval_stmt_value at C:/workdir/src\interpreter.c:173 [inlined]
      From worker 12:	eval_body at C:/workdir/src\interpreter.c:620
      From worker 12:	jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:760
      From worker 12:	jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:911
      From worker 12:	jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:854
      From worker 12:	ijl_toplevel_eval at C:/workdir/src\toplevel.c:920 [inlined]
      From worker 12:	ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:970
      From worker 12:	eval at .\boot.jl:383 [inlined]
      From worker 12:	include_string at .\loading.jl:1945
      From worker 12:	_include at .\loading.jl:2005
      From worker 12:	include at .\Base.jl:488 [inlined]
      From worker 12:	macro expansion at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\testdefs.jl:29 [inlined]
      From worker 12:	macro expansion at C:\workdir\usr\share\julia\stdlib\v1.10\Test\src\Test.jl:1546 [inlined]
      From worker 12:	macro expansion at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\testdefs.jl:23 [inlined]
      From worker 12:	macro expansion at .\timing.jl:501 [inlined]
      From worker 12:	#runtests#3 at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\testdefs.jl:21
      From worker 12:	runtests at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\testdefs.jl:5 [inlined]
      From worker 12:	runtests at C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-540f283cb3\share\julia\test\testdefs.jl:5
      From worker 12:	unknown function (ip: 000002c3d1cdcb72)
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	jl_f__call_latest at C:/workdir/src\builtins.c:812
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	do_apply at C:/workdir/src\builtins.c:768
      From worker 12:	#invokelatest#2 at .\essentials.jl:865
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	do_apply at C:/workdir/src\builtins.c:768
      From worker 12:	invokelatest at .\essentials.jl:860
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	do_apply at C:/workdir/src\builtins.c:768
      From worker 12:	#110 at C:\workdir\usr\share\julia\stdlib\v1.10\Distributed\src\process_messages.jl:285
      From worker 12:	run_work_thunk at C:\workdir\usr\share\julia\stdlib\v1.10\Distributed\src\process_messages.jl:70
      From worker 12:	#109 at C:\workdir\usr\share\julia\stdlib\v1.10\Distributed\src\process_messages.jl:285
      From worker 12:	unknown function (ip: 000002c3d1cd4383)
      From worker 12:	jl_apply at C:/workdir/src\julia.h:1961 [inlined]
      From worker 12:	start_task at C:/workdir/src\task.c:1238
      From worker 12:	Allocations: 250174524 (Pool: 249846051; Big: 328473); GC: 348
Worker 12 terminated.

https://buildkite.com/julialang/julia-master/builds/23764#0188077d-f957-45a8-ad20-baed893dbb4d
test x86_64-w64-mingw32

@vtjnash vtjnash added heisenbug This bug occurs unpredictably ci Continuous integration labels May 11, 2023
@vtjnash
Copy link
Member Author

vtjnash commented May 12, 2023

@vtjnash
Copy link
Member Author

vtjnash commented May 15, 2023

We are on this line

 681                 @test issubTS == issub(Tuple{T}, Tuple{S})

with T=Tuple{T, S} where S<:Number where T<:Integer
this results in calling

1847                iparams[i] = normalize_unionalls(iparams[i]);                                                       

to turn it into
T=Tuple{Integer, Number}
but then we free (unmap) iparam[0] (since it wasn't rooted during the call to ijl_alloc_svec_uninit, which happens next), which then causes a null pointer exception when we try to figure out the properties of Tuple{Tuple{Integer, Number}} in jl_precompute_memoized_dt shortly thereafter.
This iparams originally came from here:

1355            return jl_apply_tuple_type_v(&args[1], nargs-1);

vtjnash added a commit that referenced this issue May 15, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
vtjnash added a commit that referenced this issue May 15, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
vtjnash added a commit that referenced this issue May 15, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
vtjnash added a commit that referenced this issue May 15, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
vtjnash added a commit that referenced this issue May 15, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
vtjnash added a commit that referenced this issue May 16, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762
KristofferC pushed a commit that referenced this issue Jun 27, 2023
Try to optimize the order of this code a bit more, given that these
checks are somewhat infrequently to be needed.

Fix #49762

(cherry picked from commit c245179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Continuous integration heisenbug This bug occurs unpredictably rr trace included
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant