MicroMamba.jl icon indicating copy to clipboard operation
MicroMamba.jl copied to clipboard

Precompilation IO issue

Open MilesCranmer opened this issue 1 year ago • 8 comments

Seeing this message whenever I pre-compile micromamba_jll:

micromamba_jll Waiting for background task / IO / timer.
[pid 2148] waiting for IO to finish:
 Handle type        uv_handle_t->data
 timer              0x2b43820->0x7efe88aee5f0
This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.

I'm not sure if this is the right repo to post this or not but thought I would just point this out if unaware.

MilesCranmer avatar Mar 30 '24 23:03 MilesCranmer

Also hit this in Plots, e.g. https://github.com/JuliaPlots/Plots.jl/actions/runs/8587355509/job/23530898701?pr=4914#step:8:26.

t-bltg avatar Apr 07 '24 08:04 t-bltg

Quick update — it looks like the actual code is here: https://github.com/JuliaBinaryWrappers/micromamba_jll.jl/blob/main/src/wrappers/aarch64-apple-darwin.jl

not sure where to report this though.

MilesCranmer avatar Apr 07 '24 15:04 MilesCranmer

cc’ing @cjdoris just in case you aren’t getting notified on this repo.

I wonder if there’s a new Yggdrasil build script or something that deals with this sort of thing?

MilesCranmer avatar Apr 07 '24 15:04 MilesCranmer

Up until a few days ago, the micromamba_jll had not been rebuilt for about 9 months. So if this is a new issue then probably it is an upstream issue - in JLLWrappers maybe?

A few days ago (after you reported this issue) I triggered a new build of micromamba_jll just in case it helped. I suspect not.

cjdoris avatar Apr 07 '24 18:04 cjdoris

For reference, this only occurs on julia ≥ 1.10, see https://docs.julialang.org/en/v1/devdocs/precompile_hang.

t-bltg avatar Apr 07 '24 19:04 t-bltg

I've noticed this precompilation warning for micromamba_jll since the start of 1.10 but only posted the issue now because it is one of the few packages left still giving the warning. I think at the beginning of 1.10 there were a ton of packages with this warning (because people didn't realize such issues existed) but now there are only a couple left.

MilesCranmer avatar Apr 07 '24 20:04 MilesCranmer

Maybe try the tips in https://docs.julialang.org/en/v1/devdocs/precompile_hang to try and figure out where the issue lies?

cjdoris avatar Apr 09 '24 16:04 cjdoris

Here's what I get installing micromamba_jll into a new depot:

Precompiling project...
  5 dependencies successfully precompiled in 35 seconds
  1 dependency had output during precompilation:
┌ micromamba_jll
│   Downloading artifact: micromamba
│
│  [pid 1501] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1d34340->0x7f1084111ae0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│
│  [pid 1501] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x1d34340->0x7f1084111ae0
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
└

What is suspicious to me is Downloading artifact: micromamba despite the fact that the artifacts are marked as lazy and so should not be getting downloaded here IIUC. Maybe there's some bug in the lazy artifacts logic?

cjdoris avatar Apr 09 '24 16:04 cjdoris

Just asked about this on Slack.

It’s a bug in Downloads.jl on 1.10 https://github.com/JuliaLang/Downloads.jl/pull/234#issuecomment-1889942752

It’s fixed on 1.11+

On 1.10 any download leaves a worker running after it for a period of time in case another download needs it

https://julialang.slack.com/archives/C674ELDNX/p1715542984972079?thread_ts=1715542984.972079&cid=C674ELDNX

So it's an upstream issue. Closing as there's nothing to do from this end.

cjdoris avatar May 12 '24 20:05 cjdoris

Ah gotcha. Thanks!

MilesCranmer avatar May 12 '24 20:05 MilesCranmer