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

Crashes when loading package after using Downloads.download during precompilation of package #224

Open
KristofferC opened this issue Apr 19, 2023 · 5 comments

Comments

@KristofferC
Copy link
Member

Inserting a small

Downloads.download("file://" * @__FILE__)

at the end of the package to precompile a bit causes a crash:

julia> using Downloads
[ Info: Precompiling Downloads [f43b241f-c20a-4ad4-852c-f6b1247861c6]
Task
Task(next=nothing, queue=Base.IntrusiveLinkedList{Task}(head=<circular reference @-2>, tail=<circular reference @-2>), storage=nothing, donenotify=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), result=nothing, logstate=nothing, code=Base.var"#702#703"{Downloads.Curl.var"#31#35"{Downloads.Curl.Multi}, Base.Timer}(cb=Downloads.Curl.var"#31#35"{Downloads.Curl.Multi}(multi=Downloads.Curl.Multi(lock=Base.ReentrantLock(locked_by=nothing, reentrancy_cnt=0x00000000, havelock=0x00, cond_wait=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=nothing, tail=nothing), lock=Base.Threads.SpinLock(owned=0)), _=(0, 0, 0)), handle=0x0000000124e5a000, timer=Base.Timer(handle=0x0000000105e327c0, cond=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=<circular reference @-5>, tail=<circular reference @-5>), lock=Base.Threads.SpinLock(owned=0)), isopen=true, set=false), easies=Array{Downloads.Curl.Easy, (0,)}[], grace=0x0000000000007530)), timer=Base.Timer(handle=0x0000000105e327c0, cond=Base.GenericCondition{Base.Threads.SpinLock}(waitq=Base.IntrusiveLinkedList{Task}(head=<circular reference @-4>, tail=<circular reference @-4>), lock=Base.Threads.SpinLock(owned=0)), isopen=true, set=false)), rngState0=0x5c8325272148d0cf, rngState1=0xac2c5d63764b9943, rngState2=0x9b7a360faa44d102, rngState3=0x4b467f9f06452b2f, _state=0x00, sticky=true, _isexcep
...
41246] signal (11.2): Segmentation fault: 11
in expression starting at REPL[1]:1
get_item_for_reloc at /Users/kristoffercarlsson/.julia/juliaup/julia-1.9.0-rc2+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_restore_system_image_from_stream_ at /Users/kristoffercarlsson/.julia/juliaup/julia-1.9.0-rc2+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
jl_restore_package_image_from_stream at /Users/kristoffercarlsson/.julia/juliaup/julia-1.9.0-rc2+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
ijl_restore_package_image_from_file at /Users/kristoffercarlsson/.julia/juliaup/julia-1.9.0-rc2+0.aarch64.apple.darwin14/lib/julia/libjulia-internal.1.9.dylib (unknown line)
@StefanKarpinski
Copy link
Member

I have no idea how to debug this. Maybe @vtjnash could suggest something.

@KristofferC
Copy link
Member Author

My guess is that the crash is not actually when precompiling but when loading the precompiled file. And then there is some task or something that is serialized and tries to get loaded and that breaks things. But just a guess.

@StefanKarpinski
Copy link
Member

Does it only happen if you use the file pseudoprotocol?

@KristofferC
Copy link
Member Author

Nope

@KristofferC
Copy link
Member Author

Okay, the crash is actually not during precompile time. It crashes when loading the generated pkgimage file.

@KristofferC KristofferC changed the title Crashes when running Downloads.download during precompilation of package Crashes when loading package after using Downloads.download during precompilation of package Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants