# Binaries made by PackageCompiler.jl hangs while maxing out RAM

**URL:** https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557
**Category:** General Usage
**Created:** [December 7, 2024, 1:21am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557 "2024-12-07T01:21:57Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [December 7, 2024, 1:21am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/1 "2024-12-07T01:21:57Z")

</div>

Linux binaries (WSL Ubuntu) made by PackageCompiler.jl hangs (\>1hr) while maxing out RAM. Windows binaries work though. How to debug?

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [December 7, 2024, 1:51pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/2 "2024-12-07T13:51:54Z")

</div>

I guess you need to tell us more about the code that you compiled to get a useful answer.

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 16, 2025, 1:27am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/3 "2025-01-16T01:27:20Z")

</div>

It’s a FDTD simulator [GitHub - paulxshen/Luminescent.jl](https://github.com/paulxshen/Luminescent.jl)

Windows binaries work.  
Linux binaries hangs now but worked few months ago.  
Tried couple different Linux machines to same effect.  
My entry point returns immediately on empty ARGS - still hangs in this case - so it’s not even executing my code.

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 16, 2025, 4:01pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/4 "2025-01-16T16:01:08Z")

</div>

I guess I can try using older PackageCompiler when it last worked. But still nice to know what’s causing the current issue

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 16, 2025, 4:10pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/5 "2025-01-16T16:10:15Z")

</div>

Can you:

1. provide the output of `using Pkg; Pkg.status()` ?
2. provide the code you use to run PackageCompiler ?

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 16, 2025, 4:22pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/6 "2025-01-16T16:22:37Z")

</div>

Thanks, here:

[fe5ef43c] ArrayPadding v1.0.8  
[ab4f0b2a] BFloat16s v0.5.0  
[052768ef] CUDA v5.6.0  
[13f3f980] CairoMakie v0.12.18  
[d360d2e6] ChainRulesCore v1.25.1  
[864edb3b] DataStructures v0.18.20  
[5789e2e9] FileIO v1.16.6  
[587475ba] Flux v0.16.0  
[d9f16b24] Functors v0.5.2  
[c817782e] ImageBase v0.1.7  
[682c06a0] JSON v0.21.4  
[6872b481] Jello v1.0.11  
[15e1cf62] NPZ v0.4.3  
[3bd65402] Optimisers v0.4.4  
[2ae35dd2] Permutations v0.4.22  
[3b53a3d7] Porcupine v1.0.10  
[10745b16] Statistics v1.11.1  
[3a884ed6] UnPack v1.0.2  
⌅ [e88e6eb3] Zygote v0.6.75  
[ade2ca70] Dates v1.11.0  
[37e2e46d] LinearAlgebra v1.11.0  
[9a3f8284] Random v1.11.0  
[2f01184e] SparseArrays v1.11.0

using PackageCompiler  
ENV[“JULIA\_SSL\_CA\_ROOTS\_PATH”] = “”

create\_app(“.”, “…/LuminescentAI”,  
executables=[  
“lumi” =\> “lumi”,  
],  
precompile\_execution\_file=“build/precompile\_app.jl”,  
force=true  
)

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 17, 2025, 3:18am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/7 "2025-01-17T03:18:28Z")

</div>

Tried incremental=false didn’t work. Tried rolling back to 2.1.17 but got some jll error on julia 1.11 - not worth debugging.

Odd why compiling on windows works…

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 17, 2025, 4:12am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/8 "2025-01-17T04:12:48Z")

</div>

One thing I had to do was to add `include_transitive_dependencies=true,`:

```julia
PackageCompiler.create_sysimage(
    [:Dierckx, :StaticArrays, :Parameters, :NLsolve, :DocStringExtensions, :Sundials, :KiteUtils, 
     :KitePodModels, :AtmosphericModels, :OrdinaryDiffEqCore, :OrdinaryDiffEqBDF, :OrdinaryDiffEqSDIRK,
     :ModelingToolkit, :DSP, :JLD2, :Colors];
    sysimage_path="kps-image_tmp.so",
    include_transitive_dependencies=true,
    precompile_execution_file=joinpath("test", "test_for_precompile.jl")
)

```

Furthermore, if you want more support I am afraid you have to provide a “minimal working example” that allows others to reproduce your problem, see: [Please read: make it easier to help you](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 19, 2025, 4:13am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/9 "2025-01-19T04:13:03Z")

</div>

Thanks I think include\_transitive\_dependencies=true is default - anyways I tried it and didn’t work. Also tried w/o luck incremental true. MWE is good practice but IDK if it has any additional useful info here. Meanwhile I interrupted ^C when it hangs and got:

···  
InterruptException()  
\_jl\_mutex\_unlock at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/threading.c:949  
jl\_mutex\_unlock at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia\_locks.h:80 [inlined]  
ijl\_task\_get\_next at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/scheduler.c:526  
^C^Cpoptask at ./task.jl:1012  
wait at ./task.jl:1021  
task\_done\_hook at ./task.jl:694  
jfptr\_task\_done\_hook\_378591.1 at /home/ubuntu/LuminescentAI/lib/julia/sys.so (unknown line)  
jl\_apply at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/julia.h:2157 [inlined]  
jl\_finish\_task at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/task.c:319  
start\_task at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/src/task.c:1213  
···

Because it’s hanging even on a dummy function that returns 0, I assume it’s stuck deserializing the sysimage? There were couple other github issues on apps hanging but no responses. .

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 19, 2025, 7:13am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/11 "2025-01-19T07:13:53Z")

</div>

See also: [Compiled app hangs in Ubuntu · Issue #1025 · JuliaLang/PackageCompiler.jl · GitHub](https://github.com/JuliaLang/PackageCompiler.jl/issues/1025)

Did you try if it works with Julia 1.10?

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 19, 2025, 4:57pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/12 "2025-01-19T16:57:48Z")

</div>

Thanks I’ll just answer your question here:

Julia Version 1.11.2  
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)  
Build Info:  
Official [https://julialang.org/](https://julialang.org/) release  
Platform Info:  
OS: Linux (x86\_64-linux-gnu)  
CPU: 16 × AMD EPYC 7R32  
WORD\_SIZE: 64  
LLVM: libLLVM-16.0.6 (ORCJIT, znver2)  
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)

Also failed on another machine on WSL  
I tried PackageCompiler (latest vs 2.1.17) on julia 1.10.6 - still didn’t work

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [January 19, 2025, 5:05pm UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/13 "2025-01-19T17:05:02Z")

</div>

Thanks for trying Julia 1.10.6 !

Now we only need a reproducable MWE (minimal working example) so that someone else can reproduce your problem.

---

<div class="post-metadata">

### Author: ![pxshen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pxshen/32/38776_2.png) [@pxshen](https://discourse.julialang.org/u/pxshen)
#### Post date: [January 21, 2025, 3:32am UTC](https://discourse.julialang.org/t/binaries-made-by-packagecompiler-jl-hangs-while-maxing-out-ram/123557/14 "2025-01-21T03:32:16Z")

</div>

CUDA is problem. see my new thread [CUDA app by PackageCompiler hangs at runtime on Ubuntu / Debian](https://discourse.julialang.org/t/cuda-app-by-packagecompiler-hangs-at-runtime-on-ubuntu-debian/124995)
