DEBUG JULIA_COPY_STACKS on Windows

mkitti
Sun, 11 Oct 2020 20:20:38 +0000
Internals & Design

Using JULIA_COPY_STACKS=1 causes Julia to crash for me in Windows. My interest with JULIA_COPY_STACKS is for developing multithreading capabilities with JavaCall.jl. Using JULIA_COPY_STACKS=1 works great on Linux but not Windows. I encounter an issue independently of JavaCall.jl.

I am using the Windows console debugger cdb: Debugging a User-Mode Process Using CDB - Windows drivers | Microsoft Docs

PS > $env:JULIA_COPY_STACKS=1
PS > cdb -o julia
[...]
(2cb0.7ad8): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00007fff`a475119c cc              int     3
0:000> G
[...]
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.0 (2020-08-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |
julia> using Plots
(2cb0.7ad8): Guard page violation - code 80000001 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
libjulia!jl_destroy_timing+0x3b61:
00000000`66910d31 48898588000000  mov     qword ptr [rbp+88h],rax ss:00000000`00c9dd98=0000000000000000
0:000> KP
Child-SP          RetAddr           Call Site
00000000`00c9dc90 00000000`6691a90d libjulia!jl_destroy_timing+0x3b61
00000000`00c9ebc0 00000000`66911f30 libjulia!jl_destroy_timing+0xd73d
00000000`00c9f120 00000000`6691a2e5 libjulia!jl_destroy_timing+0x4d60
00000000`00ca0050 00000000`6691a567 libjulia!jl_destroy_timing+0xd115
00000000`00ca00d0 00000000`6691183b libjulia!jl_destroy_timing+0xd397
00000000`00ca0230 00000000`6691a2e5 libjulia!jl_destroy_timing+0x466b
00000000`00ca1160 00000000`6691a567 libjulia!jl_destroy_timing+0xd115
00000000`00ca11e0 00000000`6691183b libjulia!jl_destroy_timing+0xd397
00000000`00ca1340 00000000`6691a2e5 libjulia!jl_destroy_timing+0x466b
00000000`00ca2270 00000000`6691a567 libjulia!jl_destroy_timing+0xd115
00000000`00ca22f0 00000000`6691183b libjulia!jl_destroy_timing+0xd397
00000000`00ca2450 00000000`66912bdc libjulia!jl_destroy_timing+0x466b
00000000`00ca3380 00000000`6691109b libjulia!jl_destroy_timing+0x5a0c
00000000`00ca3470 00000000`66916ae9 libjulia!jl_destroy_timing+0x3ecb
00000000`00ca43a0 00000000`66911e67 libjulia!jl_destroy_timing+0x9919
00000000`00ca4450 00000000`6691a2e5 libjulia!jl_destroy_timing+0x4c97
00000000`00ca53a0 00000000`6691a567 libjulia!jl_destroy_timing+0xd115
00000000`00ca5420 00000000`6691183b libjulia!jl_destroy_timing+0xd397
00000000`00ca5580 00000000`6691a2e5 libjulia!jl_destroy_timing+0x466b
00000000`00ca64b0 00000000`6691a567 libjulia!jl_destroy_timing+0xd115
00000000`00ca6530 00000000`6691183b libjulia!jl_destroy_timing+0xd397
00000000`00ca6690 00000000`6691a3ac libjulia!jl_destroy_timing+0x466b
00000000`00ca75c0 00000000`6691a567 libjulia!jl_destroy_timing+0xd1dc
00000000`00ca7640 00000000`669119b6 libjulia!jl_destroy_timing+0xd397
00000000`00ca77a0 00000000`6691a3ac libjulia!jl_destroy_timing+0x47e6
00000000`00ca86d0 00000000`6691a567 libjulia!jl_destroy_timing+0xd1dc
00000000`00ca8750 00000000`669119b6 libjulia!jl_destroy_timing+0xd397
00000000`00ca88b0 00000000`66912360 libjulia!jl_destroy_timing+0x47e6
00000000`00ca97e0 00000000`66912bdc libjulia!jl_destroy_timing+0x5190
00000000`00caa710 00000000`6691c05d libjulia!jl_destroy_timing+0x5a0c
00000000`00caa800 00000000`668b67dd libjulia!jl_type_intersection_env_s+0x41d
00000000`00caac60 00000000`668b7e17 libjulia!jl_typeinf_end+0xdd
00000000`00caacd0 00000000`668b7f3b libjulia!jl_typemap_intersection_visitor+0x237
00000000`00caad50 00000000`668ac745 libjulia!jl_typemap_intersection_visitor+0x35b
00000000`00caadd0 00000000`668b1eee libjulia!jl_fptr_sparam+0x7a5
00000000`00caaec0 00000000`668ddc13 libjulia!jl_method_table_insert+0x56e
00000000`00cab0c0 00000000`668e0f63 libjulia!jl_read_verify_header+0x713
00000000`00cab280 00000000`09d62d37 libjulia!jl_restore_incremental+0x53
00000000`00cab380 00000000`09dc9071 sys!jl_sysimg_fvars_base+0xfc7077
00000000`00cab4a0 00000000`09db76e1 sys!jl_sysimg_fvars_base+0x102d3b1
00000000`00cabae0 00000000`09dc87a9 sys!jl_sysimg_fvars_base+0x101ba21
00000000`00cabc00 00000000`09db76e1 sys!jl_sysimg_fvars_base+0x102cae9
00000000`00cac240 00000000`09dc87a9 sys!jl_sysimg_fvars_base+0x101ba21
00000000`00cac370 00000000`09eb5720 sys!jl_sysimg_fvars_base+0x102cae9
00000000`00cac9b0 00000000`09dc3f9c sys!jl_sysimg_fvars_base+0x1119a60
00000000`00cad2e0 00000000`0979035c sys!jl_sysimg_fvars_base+0x10282dc
00000000`00cad3c0 00000000`668e7e3b sys!jl_sysimg_fvars_base+0x9f469c
00000000`00cad810 00000000`668e9239 libjulia!jl_restore_system_image_data+0x31b
00000000`00cad8b0 00000000`668e938a libjulia!jl_toplevel_eval_flex+0x849
00000000`00cad9a0 00000000`668ea48b libjulia!jl_toplevel_eval_flex+0x99a
00000000`00cada90 00000000`0958304b libjulia!jl_toplevel_eval_in+0xab
00000000`00cadc20 00000000`0a078b4f sys!jl_sysimg_fvars_base+0x7e738b
00000000`00cadc60 00000000`0a07a8f6 sys!jl_sysimg_fvars_base+0x12dce8f
00000000`00cadec0 00000000`09b8e5e2 sys!jl_sysimg_fvars_base+0x12dec36
00000000`00cae0a0 00000000`09bca423 sys!jl_sysimg_fvars_base+0xdf2922
00000000`00cae100 00000000`2cd512a0 sys!jl_sysimg_fvars_base+0xe2e763
00000000`00cae260 00000000`09a63591 0x2cd512a0
00000000`00cae2a0 00000000`09a63912 sys!jl_sysimg_fvars_base+0xcc78d1
00000000`00cae5e0 00000000`668c0b19 sys!jl_sysimg_fvars_base+0xcc7c52
00000000`00cae610 00000000`668c132b libjulia!jl_f_tuple+0x589
00000000`00cae730 00000000`09f243d7 libjulia!jl_f__apply_latest+0x4b
00000000`00cae780 00000000`09f40036 sys!jl_sysimg_fvars_base+0x1188717
00000000`00caebf0 00000000`0999cbb2 sys!jl_sysimg_fvars_base+0x11a4376
00000000`00caf7d0 00000000`0999cd2f sys!jl_sysimg_fvars_base+0xc00ef2
00000000`00cafa80 00000000`004017e2 sys!jl_sysimg_fvars_base+0xc0106f
00000000`00cafab0 00000000`00401bd7 julia+0x17e2
00000000`00cafda0 00000000`004013df julia+0x1bd7
00000000`00cafe30 00000000`0040151b julia+0x13df
00000000`00caff00 00007fff`a29a7bd4 julia+0x151b
00000000`00caff30 00007fff`a46ece51 KERNEL32!BaseThreadInitThunk+0x14
00000000`00caff60 00000000`00000000 ntdll!RtlUserThreadStart+0x21

5 posts - 1 participant

Read full topic