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

cdms2 seg faults when using unknown '+rw' mode for opening a file #77

Open
jypeter opened this issue Jan 13, 2017 · 1 comment
Open
Assignees
Milestone

Comments

@jypeter
Copy link
Member

jypeter commented Jan 13, 2017

A colleague wanted to open a file in 'r+' mode. Except that he used '+rw' instead and he got the following error

CDMS I/O error: Looking up file 45136816
cdunif: Unknown Error
Segmentation fault: 11

Can you add some code to check the open mode requested by the user and make it more foolproof?

For reference, I get a similar but more verbose output in my antique cdms2

>>> f = cdms2.open('rmp_tlmd_to_uorc_BILINEAR.nc', '+rw')
CDMS I/O error: Looking up file 149265024
cdunif: Unknown Error
[asterix2:23459] *** Process received signal ***
[asterix2:23459] Signal: Segmentation fault (11)
[asterix2:23459] Signal code: Address not mapped (1)
[asterix2:23459] Failing at address: 0x8
[asterix2:23459] [ 0] /lib64/libpthread.so.0() [0x3f5fe0f7e0]
[asterix2:23459] [ 1] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyDict_Next+0) [0x2b4101134470]
[asterix2:23459] [ 2] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/python2.7/site-packages/cdms2/Cdunif.so(+0x11b8a) [0x2b410e374b8a]
[asterix2:23459] [ 3] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/python2.7/site-packages/cdms2/Cdunif.so(+0x11ce5) [0x2b410e374ce5]
[asterix2:23459] [ 4] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/python2.7/site-packages/cdms2/Cdunif.so(+0x12042) [0x2b410e375042]
[asterix2:23459] [ 5] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/python2.7/site-packages/cdms2/Cdunif.so(+0x14e91) [0x2b410e377e91]
[asterix2:23459] [ 6] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5930) [0x2b41011a19d0]
[asterix2:23459] [ 7] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x88e) [0x2b41011a354e]
[asterix2:23459] [ 8] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(+0x77711) [0x2b4101121711]
[asterix2:23459] [ 9] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x2b41010f2243]
[asterix2:23459] [10] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(+0x5a87f) [0x2b410110487f]
[asterix2:23459] [11] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x2b41010f2243]
[asterix2:23459] [12] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(+0xb4580) [0x2b410115e580]
[asterix2:23459] [13] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(+0xab118) [0x2b4101155118]
[asterix2:23459] [14] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyObject_Call+0x53) [0x2b41010f2243]
[asterix2:23459] [15] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x4dfd) [0x2b41011a0e9d]
[asterix2:23459] [16] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x88e) [0x2b41011a354e]
[asterix2:23459] [17] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x565a) [0x2b41011a16fa]
[asterix2:23459] [18] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x88e) [0x2b41011a354e]
[asterix2:23459] [19] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x32) [0x2b41011a3662]
[asterix2:23459] [20] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyRun_InteractiveOneFlags+0x195) [0x2b41011c2fb5]
[asterix2:23459] [21] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyRun_InteractiveLoopFlags+0x4e) [0x2b41011c31ce]
[asterix2:23459] [22] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(PyRun_AnyFileExFlags+0x4c) [0x2b41011c390c]
[asterix2:23459] [23] /home/share/unix_files/cdat/versions/cdat_install_uv-2.1.0_x86_64_gcc4_13/lib/libpython2.7.so.1.0(Py_Main+0xc74) [0x2b41011d8ce4]
[asterix2:23459] [24] /lib64/libc.so.6(__libc_start_main+0xfd) [0x3f5f61ed1d]
[asterix2:23459] [25] python() [0x4006e9]
[asterix2:23459] *** End of error message ***
Segmentation fault (core dumped)
@durack1
Copy link
Member

durack1 commented Mar 27, 2017

@dnadeau4 this would be a trivial check of a list of possibles right?

@doutriaux1 doutriaux1 assigned dnadeau4 and unassigned dnadeau4 May 5, 2017
@doutriaux1 doutriaux1 modified the milestones: 3.0, 3.1 Mar 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants