-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in MDArray API when opening same file from multiple threads #6253
Comments
This also happens in EDIT: actually no, it still crashes in |
Reproducer involving only netCDF API provided to Unidata/netcdf-c#2496 . I can't see any reasonable workaround on GDAL side for this |
Thanks a lot for looking into this. We're actually seeing a similar crash even when opening different files, so it might run deeper than this 🥲. |
#6311 seems to be a workaround for the reproducer of that ticket (I didn't manage to reproduce an issue when opening 2 different files) |
netCDF (multidim): workaround crash with using same file in 2 differents threads (each thread with its own dataset object) (fixes #6253)
Expected behavior and actual behavior.
The following code crashes with
SIGSEGV
inlibhdf5
.This is using ASAN, but it also happens without it:
Important note: it only seems to happen when opening the same file. If I make a copy of the
.nc
under another name and use that in the second thread, it doesn't crash any more.The 2D API might be affected too, I haven't tried.
Steps to reproduce the problem.
Operating system
Arch Linux x64
GDAL version and provenance
gdal 3.5.1
netcdf 4.9.0
hdf5 1.12.2
All of the above being distro packages. I think Arch carries a couple of patches, but the ones for
netcdf
don't seem relevant.alldatatypes.zip
The text was updated successfully, but these errors were encountered: