Skip to content
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

Segfault on Python 3.12 #260

Open
torfsen opened this issue Dec 10, 2024 · 0 comments
Open

Segfault on Python 3.12 #260

torfsen opened this issue Dec 10, 2024 · 0 comments

Comments

@torfsen
Copy link

torfsen commented Dec 10, 2024

I get a segfault on Python 3.12.5 with pygrib 2.1.6 while trying to close an ECMWF ensemble GRIB file that was opened via pygrib.index:

$ cat segfault.py 
#!/usr/bin/env python

import pygrib
import sys

idx = None
try:
    print("Loading ...")
    idx = pygrib.index(sys.argv[1])
    print("Loaded.")
except Exception as e:
    print(f"ERROR: {e}")
finally:
    if idx is not None:
        print("Closing ...")
        idx.close()
    print("Closed.")

$ PYTHONFAULTHANDLER=1 python segfault.py ecmwf_ens_euro-0.25_2024121000_f000.grib2
Loading ...
Loaded.
Closing ...
Fatal Python error: Segmentation fault

Current thread 0x00007f828968b740 (most recent call first):
  File "/home/fbrucker/ubide-physicalforecast/segfault.py", line 16 in <module>

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, pyproj._compat, pyproj._context, pyproj._network, pyproj._version, pyproj._geod, pyproj.list, pyproj._crs, pyproj.database, pyproj._transformer, pyproj._sync, pygrib._pygrib (total: 24)
Segmentation fault (core dumped)

I have eccodes=2.39.0 and I'm running Ubuntu 20.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant