-
Notifications
You must be signed in to change notification settings - Fork 25
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
[BUG] Infinite build time on Julia 1.10 #249
Comments
Perhaps should also report in julia? Since it was working in previous versions. I'm not sure if this is something on Comonicon side but if it is I guess it might be the eval call in toplevel after generating all the commands |
If you open an I/O resource during module definition, you now (Julia 1.10+) have to close it before exiting the module. Example of a fix:
I can't remember if the 2nd PR was needed to fix precompilation, but I don't think so. But digging turned up more evidence that we were doing a bad job of freeing resources, so responding to the changes in 1.10 made the package better. |
Thanks, that is very helpful. @Roger-luo I looked through AirspeedVelocity.jl and there aren't any I/O resources opened external to individual methods, so I think it might be in Comonicon.jl? Are there any that you know of? |
Actually I guess since |
Okay, I found the issue by doing a binary search of commenting out code. It turns out it's not Comonicon.jl at all, sorry @Roger-luo! It turns out to be the fault of PlotlyKaleido.jl, which is a dependency. Apparently this package has some I/O resource hanging around. Somehow that package managed to precompile on its own, but using it as a dependency made precompilation hang... The following code gives the exact same bug I was seeing: module AirspeedVelocity
using PlotlyKaleido
end |
For posterity: I fixed it in the dependency with this: JuliaPlots/PlotlyKaleido.jl#6 However there was really no easy way of finding this besides randomly turning on/off parts of code. The difficulty is compounded by the fact that only calling In case others stumble upon this thread, what's the best way of tracking something like this down? Or maybe such a thing could be added to v1.10? |
Yeah I do wish we had better tools than binary-search-commenting. Any ideas, @vtjnash? |
I was expecting people would see the output "waiting for IO" and think "Huh, why is it waiting for process 61589 IO, <checks htop>, which is the foobar process, <checks grep>, and seems to be run from the FooBars package. Why was that running during precompile and not being cleaned up properly by FooBars? <files issue with FooBars package to manage resources better>" |
It's pretty easy to think of that as some internal token and not realize you might be able to get more information with OS tools like FWIW, I didn't know about |
I'd be happy to help craft such devdocs, but I've not used those techniques myself. Do you happen to know of another package that needs this kind of fix? I could use it as a testcase. |
People were recently complaining about PyPlot at JuliaCon: JuliaPy/PyPlot.jl#572. Though finding the source of the bogus |
For that PyPlot.jl issue it looks like it's the same issue to PlotlyKaleido.jl of turning on a plotting backend at the |
That's quite a lot of assumed knowledge about how this works - not very user friendly/actionable |
Describe the bug
I'm trying to build AirspeedVelocity.jl on Julia 1.10-beta1 (macOS aarch64) but am encountering infinite build time. Earlier Julia versions do not have this issue.
Version of the package:
Comonicon.jl 1.0.5
These are the dependencies of AirspeedVelocity 0.4.2:
To Reproduce
julia +1.10 -e 'using Pkg; Pkg.add("AirspeedVelocity")'
Screenshots
Here is the log:
which repeats over time.
The text was updated successfully, but these errors were encountered: