Subject: python-grib: Segmentation fault reading NCEP grib file
Package: python-grib
Version: 2.0.2-1
Severity: normal

Dear Maintainer,

I have a python script that reads in some data from a GRIB file
obtained from NCEP. Last time I used it (about a year ago), it worked;
that was on Debian 8 (and, I think, i386). This year, having upgraded
to Debian 9.3 (and gone all amd64), it crashes. A minimal segment of
the script that causes the crash is as follows:

#!/usr/bin/python

## access to grib files at higher lev than ncepgrib2
import pygrib as pg

print("Reading")
##grbs = pg.open('fnl_20180118_00_00.grib2')
grbs = pg.open('fnl_20180118_00_00.grib2')
print("File open")
grb = grbs.select(name='MSLP (Eta model reduction)')[0]
print("Selected MSLP")
## Extract data and plot it.
omslp=grb.values
print("extracted MSLP")

##### End code snippet ###################

The code requires a data file to read in; you can get this from

https://www.geos.ed.ac.uk/~hcp/chartarch/2018_01_18/fnl_20180118_00_00.grib2

If above snippet is run, I get a segfault:

./gribcrash.py
Reading
File open
Selected MSLP
Segmentation fault

I have two different amd64/Debian9.3 machines; the same thing happens on
both.

I have tried other files from the same dataset, so the problem is not
a single corrupt data file. Also, my script still works on my
employer's machines, which are running Python 2.7.5.

Yours puzzledly,

Hugh Pumphrey


-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8),
LANGUAGE=en_GB (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-grib depends on:
ii  libc6                             2.24-11+deb9u1
ii  libgrib-api-dev                   1.19.0-1
ii  libgrib-api0                      1.19.0-1
ii  libgrib2c-dev                     1.6.0-7
ii  libgrib2c0d                       1.6.0-7
ii  python                            2.7.13-2
ii  python-numpy [python-numpy-abi9]  1:1.12.1-3
ii  python-pyproj                     1.9.5.1-2+b1
ii  python3-grib                      2.0.2-1

Versions of packages python-grib recommends:
ii  python-grib-doc  2.0.2-1

python-grib suggests no packages.

-- no debconf information

Reply via email to