Julia killed on Mac Pro

Mac Pro - Tower: Apple M2 Ultra
julia is run to execute a series of simulations. After a few, the shell kills the process with nothing more than zsh: killed.

julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 24 × Apple M2 Ultra
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 16 virtual cores

Also, the zsh limits:

pkrysl@samadira TransdecPool.jl % limit
cputime         unlimited
filesize        unlimited
datasize        unlimited
stacksize       7MB
coredumpsize    0kB
addressspace    unlimited
memorylocked    unlimited
maxproc         10666
descriptors     256
pkrysl@samadira TransdecPool.jl %

The same script runs on Windows to completion. Memory limit is ~26 GB. (The Mac has 192 GB.)

What is the problem? Any ideas?

this generally is an out of memory error it might be worth trying on 1.8 or 1.10 (release candidate) since there are some differences in memory accounting.

If so, why wouldn’t an OutOfMemoryError be thrown at some point?

1 Like

outofmemory errors are a little tricky because if you don’t throw them at the exact right time, the OS can kill the process before the error can be thrown. Making matters worse, different OSes do things differently so there’s a bunch of fiddly bits that need to go right in order for the errors to be good.


However, I’d like to point out that the code runs w/o trouble on a 128GB Windows machine, but not on the 192GB Mac. The high water mark is somewhere around 40GB on the Windows system.

Is it possible that the GC is leaky on the Mac?

Did you try Julia 1.10-RC2?