You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
astropy.test() has error Segmentation fault (core dumped) #5497
After running astropy.test() have the error:
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_funcs.py ..Segmentation fault (core dumped)
Running tests with Astropy version 1.3.dev16418.
Running tests in /usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy.
135ec565025514e105135a9c5112e01ecc026907 is the first bad commit
commit 135ec565025514e105135a9c5112e01ecc026907
Author: Simon Conseil <[email protected]>
Date: Mon Sep 19 14:30:31 2016 +0200
Use off_t instead of unsigned long for file indexing
After adding a few prints and without a working gdb, I have no idea: the code that crashes is not related to 135ec56 , the output_len array is initialiazed, I don't know !
I didn't find the root of the issue with off_t, but if I replace its use with other types (size_t, long, unsigned long, ...) it no more crashes. So, I will make a PR to replace it (which also makes #5501 useless).
Activity
astrofrog commentedon Nov 23, 2016
@katehuseva - could you post the full output for astropy.test(), which will include e.g. the python and dependency versions?
katehuseva commentedon Nov 23, 2016
@astrofrog yes, sure. The full output for astropy.test()
pllim commentedon Nov 23, 2016
Perhaps
gdbwill give a more useful segfault diagnostic. See https://wiki.python.org/moin/DebuggingWithGdbastrofrog commentedon Nov 23, 2016
I'm seeing the same failure in https://circleci.com/gh/astrofrog/astropy/30?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link - debugging
katehuseva commentedon Nov 23, 2016
@pllim Running with gdb:
(gdb) run astro.py
Starting program: /usr/bin/python astro.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb60beb40 (LWP 8107)]
[New Thread 0xb58bdb40 (LWP 8108)]
[New Thread 0xb40bcb40 (LWP 8109)]
========================================== test session starts ===========================================
platform linux2 -- Python 2.7.12, pytest-2.8.3, py-1.4.30, pluggy-0.3.1
[Thread 0xb60beb40 (LWP 8107) exited]
[Thread 0xb40bcb40 (LWP 8109) exited]
[Thread 0xb58bdb40 (LWP 8108) exited]
Running tests with Astropy version 1.3.dev16418.
Running tests in /usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy.
Date: 2016-11-23T16:46:06
Platform: Linux-3.19.0-25-generic-i686-with-Ubuntu-14.04-trusty
Executable: /usr/bin/python
Full Python Version:
2.7.12 (default, Jul 18 2016, 15:04:44)
[GCC 4.8.4]
encodings: sys: ascii, locale: UTF-8, filesystem: UTF-8, unicode bits: 20
byteorder: little
float info: dig: 15, mant_dig: 15
Numpy: 1.11.2
Scipy: not available
Matplotlib: not available
h5py: not available
Pandas: not available
rootdir: /usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy, inifile:
collected 11234 items
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/_erfa/tests/test_erfa.py .......
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/analytic_functions/tests/test_blackbody.py s....
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/config/tests/test_configs.py ...............
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/constants/tests/test_constant.py ................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/constants/tests/test_pickle.py xxxxxxxxx
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_convolve.py ...............................................................................................................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_convolve_fft.py ...................................................................................................................................................................................................................................................................................................................................................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_convolve_kernels.py ..............................................................................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_discretize.py ...s...........s........ss.....
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_kernel_class.py ssssssss................................ssss....................................ssss................................................................................ssss................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/convolution/tests/test_pickle.py .xx.xx.xx
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_angles.py ....................................................................................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_angular_separation.py ....
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_api_ape5.py ....s
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_arrays.py ..........................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_atc_replacements.py ........
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_celestial_transformations.py ........[New Thread 0xb40bcb40 (LWP 8148)]
[New Thread 0xb58bdb40 (LWP 8149)]
[New Thread 0xb60beb40 (LWP 8150)]
......
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_distance.py .s.......
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_earth.py ..............s..............s
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_formatting.py ....................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_frames.py ...........................
../../usr/local/lib/python2.7/dist-packages/astropy-1.3.dev16418-py2.7-linux-i686.egg/astropy/coordinates/tests/test_funcs.py ..
Program received signal SIGSEGV, Segmentation fault.
__pyx_pf_7astropy_2io_5ascii_7cparser_7CParser_6read_header (__pyx_v_self=0xad117984)
at astropy/io/ascii/cparser.c:5128
5128 __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_self->tokenizer->output_len[0])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = LINE; goto __pyx_L1_error;}
(gdb)
pllim commentedon Nov 23, 2016
@taldcroft ?
pllim commentedon Nov 23, 2016
Looks like that comes from https://github.com/astropy/astropy/blob/master/astropy/io/ascii/cparser.pyx#L315
MSeifert04 commentedon Nov 23, 2016
Would be good to know if the error is also present in the latest stable release (1.2.1).
astrofrog commentedon Nov 23, 2016
@saimn - I think this is likely due to #5319 - could you investigate? (I'll confirm by bisecting soon)
Note that we also see this error on CircleCi which I've now enabled for Astropy. So you should be able to reproduce the issue by doing:
@mhvk - unlikely to be 1.2.1 since I think CircleCI didn't see this error before a few weeks ago, but it'd be great if someone could try.
astrofrog commentedon Nov 23, 2016
@pllim - if it only affects dev, then the right milestone is 1.3 - did you check if it affects 1.2.1?
pllim commentedon Nov 23, 2016
@astrofrog , #5319 is marked for 1.0.x. Anyways, feel free to retag as needed.
astrofrog commentedon Nov 23, 2016
Ah sorry my bad! You're right :)
MSeifert04 commentedon Nov 23, 2016
You need another tag "affects-backported-but-not-released-change" 😄
astrofrog commentedon Nov 23, 2016
Bisecting in the 32-bit docker image gives:
so as suspected, this is due to #5319.
cc @saimn
saimn commentedon Nov 23, 2016
I'll have a look !
astrofrog commentedon Nov 23, 2016
@saimn - note my comment higher up if you want to use the docker image to debug, since it will save a lot of time setting up a 32-bit system :)
saimn commentedon Nov 23, 2016
@astrofrog - yep, I already have the docker image running the tests, great to have this !
saimn commentedon Nov 23, 2016
Ok, this is the minimum code to reproduce:
But debugging seems tricky inside the docker image. Core dumps are generated on the host and I cannot get gdb to generate a proper backtrace ...
saimn commentedon Nov 23, 2016
After adding a few prints and without a working gdb, I have no idea: the code that crashes is not related to 135ec56 , the output_len array is initialiazed, I don't know !
saimn commentedon Nov 24, 2016
I didn't find the root of the issue with
off_t, but if I replace its use with other types (size_t,long,unsigned long, ...) it no more crashes. So, I will make a PR to replace it (which also makes #5501 useless).Replace use of off_t by size_t in cparser
Replace use of off_t by size_t in cparser
astrofrog commentedon Nov 24, 2016
@katehuseva - this should be fixed in the latest developer version of Astropy, but please let us know if not!