Closed kyleaoman closed 1 year ago
@JBorrow this came up in my tests, but smells like an upstream issue (probably in h5py but possibly in swiftsimio), thought you'd want to be aware. Or if this looks familiar, please let me know!
The real issue is upstream in h5py
. Details noted in https://github.com/SWIFTSIM/swiftsimio/issues/127
h5py releases >=3.1.0 for python3.6 won't happen, but swiftsimio and swiftgalaxy no longer support python3.6, on any more recent python the solution is simply to update h5py to a recent version.
Describe the bug There is an issue apparently introduced in
h5py 3.0.0
that causes a memory allocation issue leading to a segmentation fault.To Reproduce Steps to reproduce the behaviour:
toysnap.py
).python -c "from toysnap import *;create_toysnap();create_toyvr();from swiftgalaxy import *;vr=Velociraptor('toyvr', halo_index=0);sg=SWIFTGalaxy('toysnap.hdf5', vr);sg.gas.hydrogen_ionization_fractions.neutral"
(note using a SWIFTDataset directly but naively doesn't seem to reproduce the error, but presumably would if the same mask was provided before invoking the read).Expected behaviour Data is read cleanly and program exits.
System and python details (please complete):
Python 3.6.13 :: Anaconda, Inc.
Additional context Some crashes complained of "corrupted chunks", errors in
free()
ormalloc()
, GC issues, and more. Crash seemed to occur aroundreturn
statement ofread_ranges_from_file_unchunked
inswiftsimio/accelerated.py
, but seems to actually be triggered somewhere in a garbage collection call while interpreting code inh5py
.