# Sysimage creation process gets OOM killed (out-of-memory)

**URL:** <https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079>\
**Category:** Performance\
**Tags:** memory, package-compiler, sysimage\
**Created:** [March 7, 2026, 3:09am UTC](https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079 "2026-03-07T03:09:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abhro/32/220753_2.png) [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Post date:** [March 7, 2026, 3:09am UTC](https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079/1 "2026-03-07T03:09:52Z")

</div>

When I try to create a sysimage with Makie in it (or maybe any other heavy package, Makie’s the only one I’ve noticed), the `create_sysimage()` call gets to the “Compiling incremental sysimage” stage, then crashes, also exiting the terminal window somehow.

Minimal working example script:

```julia
ENV["JULIA_DEBUG"] = "Pkg,PackageCompiler,Main"
ENV["JULIA_PKG_PRECOMPILE_AUTO"] = 0

using InteractiveUtils: versioninfo
versioninfo()

import Pkg
Pkg.activate(temp = true)

Pkg.add(["PackageCompiler", "CairoMakie"])

using PackageCompiler: create_sysimage

create_sysimage(;
    sysimage_path = "mwe-sysimage.so",
    import_into_main = false,
)

```

When I run it, I manage to get the following output

```sh
$ julia --start=no oom-killed-sysimage-mwe.jl
Julia Version 1.12.5
Commit 5fe89b8ddc1 (2026-02-09 16:05 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × 13th Gen Intel(R) Core(TM) i5-1340P
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_PRECOMPILE_FILES = 50
  JULIA_NUM_PRECOMPILE_TASKS = 9
  JULIA_DEBUG = Pkg,PackageCompiler,Main
  JULIA_PKG_PRECOMPILE_AUTO = 0
  Activating new project at `/tmp/jl_2dlCqT`
┌ Debug: Skipping updating registry General since it is on cooldown: 12 hours, 53 minutes, 10 seconds, 37 milliseconds left
└ @ Pkg.Registry ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/Registry/Registry.jl:433
   Resolving package versions...
┌ Debug: tiered_resolve: trying PRESERVE_ALL
└ @ Pkg.Operations ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/Operations.jl:1722
    Updating `/tmp/jl_2dlCqT/Project.toml`
  [13f3f980] + CairoMakie v0.15.9
  [9b87118b] + PackageCompiler v2.2.5
    Updating `/tmp/jl_2dlCqT/Manifest.toml`
  [621f4979] + AbstractFFTs v1.5.0
  [1520ce14] + AbstractTrees v0.4.5
  [79e6a3ab] + Adapt v4.5.0
  [35492f91] + AdaptivePredicates v1.2.0
  [66dad0bd] + AliasTables v1.1.3
  [27a7e980] + Animations v0.4.2
  [67c07d97] + Automa v1.1.0
  [13072b0f] + AxisAlgorithms v1.1.0
  [39de3d68] + AxisArrays v0.4.8
  [18cc8868] + BaseDirs v1.3.2
  [fa961155] + CEnum v0.5.0
  [96374032] + CRlibm v1.0.2
  [159f3aea] + Cairo v1.1.1
  [13f3f980] + CairoMakie v0.15.9
  [d360d2e6] + ChainRulesCore v1.26.0
  [a2cac450] + ColorBrewer v0.4.2
  [35d6a980] + ColorSchemes v3.31.0
  [3da002f7] + ColorTypes v0.12.1
  [c3611d14] + ColorVectorSpace v0.11.0
  [5ae59095] + Colors v0.13.1
  [34da2185] + Compat v4.18.1
  [95dc2771] + ComputePipeline v0.1.7
  [187b0558] + ConstructionBase v1.6.0
  [d38c429a] + Contour v0.6.3
  [9a962f9c] + DataAPI v1.16.0
  [864edb3b] + DataStructures v0.19.3
  [e2d170a0] + DataValueInterfaces v1.0.0
  [927a84f5] + DelaunayTriangulation v1.6.6
  [31c24e10] + Distributions v0.25.123
  [ffbed154] + DocStringExtensions v0.9.5
  [4e289a0a] + EnumX v1.0.7
  [429591f6] + ExactPredicates v2.2.9
  [411431e0] + Extents v0.1.6
  [b86e33f2] + FFTA v0.3.1
  [5789e2e9] + FileIO v1.18.0
  [8fc22ac5] + FilePaths v0.9.0
  [48062228] + FilePathsBase v0.9.24
  [1a297f60] + FillArrays v1.16.0
  [53c48c17] + FixedPointNumbers v0.8.5
  [1fa38f19] + Format v1.3.7
  [b38be410] + FreeType v4.1.1
  [663a7486] + FreeTypeAbstraction v0.10.8
  [5c1252a2] + GeometryBasics v0.5.10
  [c27321d9] + Glob v1.4.0
  [a2bd30eb] + Graphics v1.1.3
  [3955a311] + GridLayoutBase v0.11.2
  [42e2da0e] + Grisu v1.0.2
  [34004b35] + HypergeometricFunctions v0.3.28
  [2803e5a7] + ImageAxes v0.6.12
  [c817782e] + ImageBase v0.1.7
  [a09fc81d] + ImageCore v0.10.5
  [82e4d734] + ImageIO v0.6.9
  [bc367c6b] + ImageMetadata v0.9.10
  [9b13fd28] + IndirectArrays v1.0.0
  [d25df0c9] + Inflate v0.1.5
  [18e54dd8] + IntegerMathUtils v0.1.3
  [a98d9a8b] + Interpolations v0.16.2
  [d1acc4aa] + IntervalArithmetic v1.0.2
  [8197267c] + IntervalSets v0.7.13
  [3587e190] + InverseFunctions v0.1.17
  [92d709cd] + IrrationalConstants v0.2.6
  [f1662d9f] + Isoband v0.1.1
  [c8e1da08] + IterTools v1.10.0
  [82899510] + IteratorInterfaceExtensions v1.0.0
  [692b3bcd] + JLLWrappers v1.7.1
  [682c06a0] + JSON v1.4.0
  [b835a17e] + JpegTurbo v0.1.6
  [5ab0869b] + KernelDensity v0.6.11
  [b964fa9f] + LaTeXStrings v1.4.0
  [8cdb02fc] + LazyModules v0.3.1
  [2ab3a3ac] + LogExpFunctions v0.3.29
  [1914dd2f] + MacroTools v0.5.16
  [ee78f7c6] + Makie v0.24.9
  [dbb5928d] + MappedArrays v0.4.3
  [0a4f8689] + MathTeXEngine v0.6.7
  [e1d29d7a] + Missings v1.2.0
  [e94cdb99] + MosaicViews v0.3.4
  [46d2c3a1] + MuladdMacro v0.2.4
  [77ba4419] + NaNMath v1.1.3
  [f09324ee] + Netpbm v1.1.1
  [510215fc] + Observables v0.5.5
  [6fe1bfb0] + OffsetArrays v1.17.0
  [52e1d378] + OpenEXR v0.3.3
  [bac558e1] + OrderedCollections v1.8.1
  [90014a1f] + PDMats v0.11.37
  [f57f5aa1] + PNGFiles v0.4.4
  [9b87118b] + PackageCompiler v2.2.5
  [19eb6ba3] + Packing v0.5.1
  [5432bcbf] + PaddedViews v0.5.12
  [69de0a69] + Parsers v2.8.3
  [eebad327] + PkgVersion v0.3.3
  [995b91a9] + PlotUtils v1.4.4
  [647866c9] + PolygonOps v0.1.2
  [aea7be01] + PrecompileTools v1.3.3
  [21216c6a] + Preferences v1.5.2
  [27ebfcd6] + Primes v0.5.7
  [92933f4c] + ProgressMeter v1.11.0
  [43287f4e] + PtrArrays v1.4.0
  [4b34888f] + QOI v1.0.2
  [1fd47b50] + QuadGK v2.11.2
  [b3c3ace0] + RangeArrays v0.3.2
  [c84ed2f1] + Ratios v0.4.5
  [189a3867] + Reexport v1.2.2
  [05181044] + RelocatableFolders v1.0.1
  [ae029012] + Requires v1.3.1
  [79098fc4] + Rmath v0.9.0
  [5eaf0fd0] + RoundingEmulator v0.2.1
  [fdea26ae] + SIMD v3.7.2
  [6c6a2e73] + Scratch v1.3.0
  [65257c39] + ShaderAbstractions v0.5.0
  [992d4aef] + Showoff v1.0.3
  [73760f76] + SignedDistanceFields v0.4.1
  [699a6c99] + SimpleTraits v0.9.5
  [45858cf5] + Sixel v0.1.5
  [a2af1166] + SortingAlgorithms v1.2.2
  [276daf66] + SpecialFunctions v2.7.1
  [860ef19b] + StableRNGs v1.0.4
  [cae243ae] + StackViews v0.1.2
  [90137ffa] + StaticArrays v1.9.17
  [1e83bf80] + StaticArraysCore v1.4.4
  [10745b16] + Statistics v1.11.1
  [82ae8749] + StatsAPI v1.8.0
  [2913bbd2] + StatsBase v0.34.10
  [4c63d2b9] + StatsFuns v1.5.2
  [09ab397b] + StructArrays v0.7.2
  [ec057cc2] + StructUtils v2.6.3
  [3783bdb8] + TableTraits v1.0.1
  [bd369af6] + Tables v1.12.1
  [62fd8b95] + TensorCore v0.1.1
  [731e570b] + TiffImages v0.11.8
  [3bb67fe8] + TranscodingStreams v0.11.3
  [981d1d27] + TriplotBase v0.1.0
  [1cfade01] + UnicodeFun v0.4.1
  [1986cc42] + Unitful v1.28.0
  [e3aaa7dc] + WebP v0.1.3
  [efce3f68] + WoodburyMatrices v1.1.0
  [6e34b625] + Bzip2_jll v1.0.9+0
  [4e9b3aee] + CRlibm_jll v1.0.1+0
  [83423d85] + Cairo_jll v1.18.5+1
  [5ae413db] + EarCut_jll v2.2.4+0
  [2e619515] + Expat_jll v2.7.3+0
  [b22a6f82] + FFMPEG_jll v8.0.1+0
  [a3f928ae] + Fontconfig_jll v2.17.1+0
  [d7e528f0] + FreeType2_jll v2.13.4+0
  [559328eb] + FriBidi_jll v1.0.17+0
  [b0724c58] + GettextRuntime_jll v0.22.4+0
  [59f7168a] + Giflib_jll v5.2.3+0
  [7746bdde] + Glib_jll v2.86.3+0
  [3b182d85] + Graphite2_jll v1.3.15+0
  [2e76f6c2] + HarfBuzz_jll v8.5.1+0
  [905a6f67] + Imath_jll v3.2.2+0
  [aacddb02] + JpegTurbo_jll v3.1.4+0
  [c1c5ebd0] + LAME_jll v3.100.3+0
  [88015f11] + LERC_jll v4.0.1+0
  [1d63c593] + LLVMOpenMP_jll v18.1.8+0
  [dd4b983a] + LZO_jll v2.10.3+0
⌅ [e9f186c6] + Libffi_jll v3.4.7+0
  [7e76a0d4] + Libglvnd_jll v1.7.1+1
  [94ce4f54] + Libiconv_jll v1.18.0+0
  [4b2f31a3] + Libmount_jll v2.41.3+0
  [89763e89] + Libtiff_jll v4.7.2+0
  [38a345b3] + Libuuid_jll v2.41.3+0
  [e7412a2a] + Ogg_jll v1.3.6+0
  [6cdc7f73] + OpenBLASConsistentFPCSR_jll v0.3.30+0
  [18a262bb] + OpenEXR_jll v3.4.4+0
  [efe28fd5] + OpenSpecFun_jll v0.5.6+0
  [91d4177d] + Opus_jll v1.6.1+0
  [36c8627f] + Pango_jll v1.57.0+0
⌅ [30392449] + Pixman_jll v0.44.2+0
  [f50d1b31] + Rmath_jll v0.5.1+0
  [ffd25f8a] + XZ_jll v5.8.2+0
  [4f6342f7] + Xorg_libX11_jll v1.8.13+0
  [0c0b7dd1] + Xorg_libXau_jll v1.0.13+0
  [a3789734] + Xorg_libXdmcp_jll v1.1.6+0
  [1082639a] + Xorg_libXext_jll v1.3.8+0
  [ea2f1a96] + Xorg_libXrender_jll v0.9.12+0
  [c7cfdc94] + Xorg_libxcb_jll v1.17.1+0
  [c5fb5394] + Xorg_xtrans_jll v1.6.0+0
  [3161d3a3] + Zstd_jll v1.5.7+1
  [9a68df92] + isoband_jll v0.2.3+0
  [a4ae2306] + libaom_jll v3.13.1+0
  [0ac62f75] + libass_jll v0.17.4+0
  [f638f0a6] + libfdk_aac_jll v2.0.4+0
  [b53b4c65] + libpng_jll v1.6.55+0
  [075b6546] + libsixel_jll v1.10.5+0
  [f27f6e37] + libvorbis_jll v1.3.8+0
  [c5f90fcd] + libwebp_jll v1.6.0+0
⌅ [1270edf5] + x264_jll v10164.0.1+0
  [dfaa095f] + x265_jll v4.1.0+0
  [0dad84c5] + ArgTools v1.1.2
  [56f22d72] + Artifacts v1.11.0
  [2a0f44e3] + Base64 v1.11.0
  [8bf52ea8] + CRC32c v1.11.0
  [ade2ca70] + Dates v1.11.0
  [8ba89e20] + Distributed v1.11.0
  [f43a241f] + Downloads v1.7.0
  [7b1f6079] + FileWatching v1.11.0
  [b77e0a4c] + InteractiveUtils v1.11.0
  [ac6e5ff7] + JuliaSyntaxHighlighting v1.12.0
  [4af54fe1] + LazyArtifacts v1.11.0
  [b27032c2] + LibCURL v0.6.4
  [76f85450] + LibGit2 v1.11.0
  [8f399da3] + Libdl v1.11.0
  [37e2e46d] + LinearAlgebra v1.12.0
  [56ddb016] + Logging v1.11.0
  [d6f4376e] + Markdown v1.11.0
  [a63ad114] + Mmap v1.11.0
  [ca575930] + NetworkOptions v1.3.0
  [44cfe95a] + Pkg v1.12.1
  [de0858da] + Printf v1.11.0
  [3fa0cd96] + REPL v1.11.0
  [9a3f8284] + Random v1.11.0
  [ea8e919c] + SHA v0.7.0
  [9e88b42a] + Serialization v1.11.0
  [1a1011a3] + SharedArrays v1.11.0
  [6462fe0b] + Sockets v1.11.0
  [2f01184e] + SparseArrays v1.12.0
  [f489334b] + StyledStrings v1.11.0
  [4607b0f0] + SuiteSparse
  [fa267f1f] + TOML v1.0.3
  [a4e569a6] + Tar v1.10.0
  [cf7118a7] + UUIDs v1.11.0
  [4ec0a83e] + Unicode v1.11.0
  [e66e0078] + CompilerSupportLibraries_jll v1.3.0+1
  [deac9b47] + LibCURL_jll v8.15.0+0
  [e37daf67] + LibGit2_jll v1.9.0+0
  [29816b5a] + LibSSH2_jll v1.11.3+1
  [14a3606d] + MozillaCACerts_jll v2025.11.4
  [4536629a] + OpenBLAS_jll v0.3.29+0
  [05823500] + OpenLibm_jll v0.8.7+0
  [458c3c95] + OpenSSL_jll v3.5.4+0
  [efcefdf7] + PCRE2_jll v10.44.0+1
  [bea87d4a] + SuiteSparse_jll v7.8.3+2
  [83775a58] + Zlib_jll v1.3.1+2
  [8e850b90] + libblastrampoline_jll v5.15.0+0
  [8e850ede] + nghttp2_jll v1.64.0+1
  [3f19e933] + p7zip_jll v17.7.0+0
        Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`
┌ Debug: instantiating project at "/tmp/jl_2dlCqT"
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:661
┌ Debug: ensurecompiled: running `~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/bin/julia --color=yes --startup-file=no --pkgimages=no --sysimage=~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/lib/julia/sys.so -e 'using Pkg; Pkg.precompile()'`
│ JULIA_LOAD_PATH = "/tmp/jl_2dlCqT:@stdlib"
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:377
┌ Debug: precompile: instantiated
└ @ Pkg.API ~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/share/julia/stdlib/v1.12/Pkg/src/API.jl:1236
┌ Debug: running precompilation execution script...
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:429
┌ Debug: run_precompilation_script: running `~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/bin/julia --color=yes --startup-file=no --pkgimages=no --sysimage=~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/lib/julia/sys.so --compile=all --trace-compile=/tmp/jl_packagecompiler_gCc0t6/jl_A6hzBK -e ''`
│ JULIA_LOAD_PATH = "/tmp/jl_2dlCqT:@stdlib"
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:390
┌ Debug: writing precompile staging code to /tmp/jl_EtI3ib2j6V
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:540
┌ Debug: running `~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/bin/julia --color=yes --startup-file=no --pkgimages=no --cpu-target=native --sysimage=~/.julia/juliaup/julia-1.12.5+0.x64.linux.gnu/lib/julia/sys.so --project=/tmp/jl_2dlCqT --output-o=/tmp/jl_0fEZ4rQ1Ef-o.a --threads=1 /tmp/jl_EtI3ib2j6V`
└ @ PackageCompiler ~/.julia/packages/PackageCompiler/2L6xB/src/PackageCompiler.jl:552

```

and the elapsed timer showing “Compiling incremental system sysimage”

It’s at that stage the process crashes, taking out the terminal with it. Below is the (truncated) output from running `journalctl --no-hostname --dmesg` around the time of the crash

```plaintext
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: smbd-notifyd invoked oom-killer: gfp_mask=0x140cca(GFP_HIGHUSER_MOVABLE|__GFP_COMP), order=0, oom_score_adj=0
kernel: CPU: 8 PID: 2331 Comm: smbd-notifyd Not tainted 6.8.0-101-generic #101-Ubuntu
kernel: Call Trace:
kernel: <TASK>
kernel: dump_stack_lvl+0x76/0xa0
kernel: dump_stack+0x10/0x20
kernel: dump_header+0x49/0x210
kernel: oom_kill_process+0x118/0x280
kernel: ? oom_evaluate_task+0x143/0x1e0
kernel: out_of_memory+0x103/0x350
kernel: __alloc_pages_may_oom+0x10c/0x1d0
kernel: __alloc_pages_slowpath.constprop.0+0x4df/0xa20
kernel: __alloc_pages+0x31f/0x350
kernel: alloc_pages_mpol+0x91/0x210
kernel: alloc_pages+0x5b/0xd0
kernel: folio_alloc+0x15/0x40
kernel: filemap_alloc_folio+0xf4/0x100
kernel: __filemap_get_folio+0x199/0x2e0
kernel: filemap_fault+0x15c/0x8e0
kernel: __do_fault+0x3a/0x190
kernel: do_read_fault+0x133/0x200
kernel: do_fault+0xf0/0x260
kernel: handle_pte_fault+0x114/0x1d0
kernel: __handle_mm_fault+0x654/0x790
kernel: handle_mm_fault+0x18a/0x380
kernel: do_user_addr_fault+0x169/0x670
kernel: exc_page_fault+0x83/0x1b0
kernel: asm_exc_page_fault+0x27/0x30
kernel: RIP: 0033:0x7a9121d02ae0
kernel: Code: Unable to access opcode bytes at 0x7a9121d02ab6.
kernel: RSP: 002b:00007fffcbcb6cc8 EFLAGS: 00010246
kernel: RAX: 0000000000000000 RBX: 0000000000007530 RCX: 0000000000000000
kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00006488f42cd000
kernel: RBP: 00007fffcbcb6d30 R08: 00006488f42d0340 R09: 0000000000000007
kernel: R10: 0000000000007530 R11: 0000000000000202 R12: 00006488f42cd230
kernel: R13: 00007a9121d0b912 R14: 0000000000000000 R15: 00006488f42ca678
kernel: </TASK>
kernel: Mem-Info:
kernel: active_anon:2184657 inactive_anon:1114445 isolated_anon:0
         active_file:0 inactive_file:188 isolated_file:0
         unevictable:5048 dirty:0 writeback:0
         slab_reclaimable:31400 slab_unreclaimable:64537
         mapped:244033 shmem:869522 pagetables:24180
         sec_pagetables:0 bounce:0
         kernel_misc_reclaimable:0
         free:32898 free_pcp:0 free_cma:0
kernel: Node 0 active_anon:8738628kB inactive_anon:4457780kB active_file:0kB inactive_file:752kB unevictable:20192kB isolated(anon):0kB isolated(file):0kB mapped:976132kB dirty:0kB writeback:0kB shmem:3478088kB shmem_thp:1888256kB shmem_pmdmapped:6144kB anon_thp:0kB writeback_tmp:0kB kernel_stack:29296kB pagetables:96720kB sec_pagetables:0kB all_unreclaimable? yes
kernel: Node 0 DMA free:13316kB boost:0kB min:72kB low:88kB high:104kB reserved_highatomic:0KB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:15992kB managed:15364kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
kernel: lowmem_reserve[]: 0 834 13582 13582 13582
kernel: Node 0 DMA32 free:55136kB boost:0kB min:4148kB low:5184kB high:6220kB reserved_highatomic:0KB active_anon:615332kB inactive_anon:250576kB active_file:0kB inactive_file:44kB unevictable:3064kB writepending:0kB present:999680kB managed:933820kB mlocked:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
kernel: lowmem_reserve[]: 0 0 12747 12747 12747
kernel: Node 0 Normal free:63140kB boost:0kB min:63360kB low:79200kB high:95040kB reserved_highatomic:0KB active_anon:8123296kB inactive_anon:4207204kB active_file:720kB inactive_file:0kB unevictable:17008kB writepending:0kB present:13365248kB managed:13062360kB mlocked:80kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
kernel: lowmem_reserve[]: 0 0 0 0 0
kernel: Node 0 DMA: 1*4kB (U) 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 1*1024kB (U) 2*2048kB (UM) 2*4096kB (M) = 13316kB
kernel: Node 0 DMA32: 370*4kB (UM) 270*8kB (UME) 143*16kB (UM) 182*32kB (UME) 118*64kB (UME) 99*128kB (UME) 51*256kB (UME) 18*512kB (UME) 1*1024kB (M) 0*2048kB 0*4096kB = 55272kB
kernel: Node 0 Normal: 7182*4kB (UME) 1372*8kB (UM) 486*16kB (UM) 329*32kB (UME) 102*64kB (UME) 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 64536kB
kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
kernel: Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
kernel: 876616 total pagecache pages
kernel: 6926 pages in swap cache
kernel: Free swap = 44kB
kernel: Total swap = 1998844kB
kernel: 3595230 pages RAM
kernel: 0 pages HighMem/MovableOnly
kernel: 92344 pages reserved
kernel: 0 pages hwpoisoned
kernel: Tasks state (memory values in pages):
kernel: [pid] uid tgid total_vm rss rss_anon rss_file rss_shmem pgtables_bytes swapents oom_score_adj name
kernel: [182192] 1000 182192 370756 125517 125393 124 0 2121728 3680 200 julia
kernel: [182814] 1000 182814 1376203 1254778 1254602 176 0 10911744 0 200 julia
kernel: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user@1000.service/app.slice/app-konsole-818bd47e72654a39b6454d8f2fd51a90.scope,task=julia,pid=182814,uid=1000
kernel: Out of memory: Killed process 182814 (julia) total-vm:5504812kB, anon-rss:5018408kB, file-rss:704kB, shmem-rss:0kB, UID:1000 pgtables:10656kB oom_score_adj:200
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.
kernel: Purging GPU memory, 0 pages freed, 0 pages still pinned, 3812 pages left available.

```

---

<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:** [March 7, 2026, 11:17am UTC](https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079/2 "2026-03-07T11:17:31Z")

</div>

How much RAM do you have? If you have many cores, but a small amount of RAM this is to be expected. Easy to avoid by using:

- less threads
- or a large swap file

This is the code I use in my create\_sys\_image script:

```julia-auto
# Check memory and limit threads if needed
if [["$OSTYPE" == "msys" || "$OSTYPE" == "win32"]]; then
    # Windows: use wmic or PowerShell
    echo "Checking system memory on Windows..."
    totalmem=$(powershell.exe -Command "(Get-CimInstance Win32_ComputerSystem).TotalPhysicalMemory / 1MB" 2>/dev/null | awk '{printf "%i", $1}')
    if [[-z "$totalmem" || $totalmem -lt 27000]]; then
        echo "Warning: Less than 27GB of memory detected on Windows. Using only one thread for sysimage compilation."
        export JULIA_IMAGE_THREADS=1
    fi
else
    # Linux: use /proc/meminfo
    totalmem=$(grep MemTotal /proc/meminfo | awk '{printf "%i", $2 / 1024}')
    if [[$totalmem -lt 26674]]; then
        echo "Warning: Less than 27GB of memory detected. Using only one thread for sysimage compilation."
        export JULIA_IMAGE_THREADS=1
    fi
fi

```

Does it work if you add `export JULIA_IMAGE_THREADS=1` to your .bashrc file?

---

<div class="post-metadata">

**Author:** ![Abhro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abhro/32/220753_2.png) [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Post date:** [March 7, 2026, 2:46pm UTC](https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079/3 "2026-03-07T14:46:20Z")

</div>

I definitely have less than 27 GiB of memory (~12 GiB AFAICT), and I think 16 cores (probably what’s reflected in `versioninfo()`). I did set `JULIA_IMAGE_THREADS=1` in the environment, and it stil crashed. I also set `JULIA_NUM_THREADS=1` and `JULIA_NUM_PRECOMPILE_TASKS=1` (lowered from 9 before) for good measure, and it still gets OOM killed. I’ll be looking up how to increase swap space next.

(After doing a `grep` for `SwapTotal` in `/proc/meminfo`, I seem to have \< 2 GiB of swap space available in total)

---

<div class="post-metadata">

**Author:** ![Abhro](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abhro/32/220753_2.png) [@Abhro](https://discourse.julialang.org/u/Abhro)\
**Post date:** [March 7, 2026, 3:15pm UTC](https://discourse.julialang.org/t/sysimage-creation-process-gets-oom-killed-out-of-memory/136079/4 "2026-03-07T15:15:40Z")

</div>

Creating a 32 GiB swapfile did work. A bit frustrating that there were no hints/proper documentation from official Julia docs or PackageCompiler.jl docs on how to approach this 😅
