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

Infinite build time of CLI tool on Julia 1.10-beta1 #50839

Closed
MilesCranmer opened this issue Aug 8, 2023 · 5 comments
Closed

Infinite build time of CLI tool on Julia 1.10-beta1 #50839

MilesCranmer opened this issue Aug 8, 2023 · 5 comments

Comments

@MilesCranmer
Copy link
Member

MilesCranmer commented Aug 8, 2023

x-post from comonicon/Comonicon.jl#249 as it may be a Julia bug.

I am experiencing infinite build times when compiling a Comonicon.jl-enabled CLI tool (AirspeedVelocity.jl) on Julia 1.10-beta1. Earlier versions of Julia such as 1.9.2 work fine.

To Reproduce

julia +1.10 -e 'using Pkg; Pkg.add("AirspeedVelocity")'

and, if needed, Pkg.build("AirspeedVelocity").

Screenshots
Screenshot 2023-08-08 at 10 21 43

^ It gets stuck here

The log it mentions contains the following:

[pid 61578] waiting for IO to finish:
 TYPE[FD/PID]       @UV_HANDLE_T->DATA
 pipe[16]           @0x112e2e790->0x104604bf0
 pipe[10]           @0x112e92600->0x104604c90
 process[61589]     @0x112e93dd0->0x11423eaf0

which is repeated over and over again.

More info:

julia> versioninfo()
Julia Version 1.10.0-beta1
Commit 6616549950e (2023-07-25 17:43 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
  Threads: 8 on 6 virtual cores
Environment:
  JULIA_NUM_THREADS = auto
  JULIA_FORMATTER_SO = /Users/mcranmer/julia_formatter.so
  JULIA_EDITOR = code

cc @Roger-luo

@vtjnash
Copy link
Member

vtjnash commented Aug 8, 2023

It is waiting for pid=61589 to exit, which is a package bug.

@MilesCranmer
Copy link
Member Author

It’s weird it only occurs on 1.10. Is there a way to get more debugging info out of the build step?

@vtjnash
Copy link
Member

vtjnash commented Aug 8, 2023

Older versions accidentally aborted it instead, which was worse for many other reasons.

@MilesCranmer
Copy link
Member Author

MilesCranmer commented Aug 8, 2023

cc @timholy

Update: I found the issue by doing a binary search of commenting out code. It turns out that it was the fault of one of my dependencies, PlotlyKaleido.jl. Apparently this package has some I/O resource hanging around, making precompilation/building hang.

Somehow that package managed to precompile on its own (I think?), but using it as a dependency made precompilation of my own package hang.

The following code gives the exact same issue I was seeing:

module AirspeedVelocity

using PlotlyKaleido

end

Is there a way to localize this I/O issue in the released Julia v1.10 so it is easier to track down?

@MilesCranmer
Copy link
Member Author

MilesCranmer commented Aug 9, 2023

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 using PlotlyKaleido inside a package triggered the precompilation error, but neither (a) running that in the REPL, nor (b) precompiling PlotlyKaleido itself, was enough to trigger the error. It was only when it was used as a dependency.

In case others stumble upon this thread, what's the best way of tracking something like this down? Or could such a thing be added to v1.10?

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