Memory leak when migrating from Julia 1.10.7 to 1.11.2

Hi, I’m experiencing something very similar with Julia 1.11.3 – I’m doing a calculation using the ITensors.jl library, and writing to files using HDF5.jl, on a university cluster (SLURM). I run a somewhat intensive function a few dozen times - but I’m finding that memory usage grows without bound (even overshooting the heap-size-hint). I’m even manually calling GC.gc() each time after calling that function.

To give an example, if I call this function once, the memory usage is ~1-2GB. After calling it about 30 times, it’s hitting 5GB, and SLURM is killing my jobs.

Can anyone help me diagnose what the issue is, please?

Edit: To add to this, using How to track total memory usage of Julia process over time - #6 by sloede, on my computer I’m finding it’s consistently using slightly more memory after each loop. For a (much) smaller problem, it’s 10MB each time, resulting in total extra memory usage of 400MB by the end. I’m running the same diagnostics on the cluster for a bigger problem.