-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
Segmentation Fault when running numpy test (Trac #1815) #2408
Comments
@charris wrote on 2011-04-30 Hi Alex, Since this problem doesn't show up on most systems we to figure out what is different about your setup. So far I see SPARC There may have been some fixes for the string part, but I don't think that is the fundamental problem as there are other test failures shown in the output. It would be helpful to see what those were so could you run the tests as 'numpy.test(verbose=2)'? I suspect library problems or possibly mixed g77 and gfortran compilers, but it is hard to say at the moment. |
@charris wrote on 2011-04-30 Hi Alex, Since this problem doesn't show up on most systems we to figure out what is different about your setup. So far I see
There may have been some fixes for the string part, but I don't think that is the fundamental problem as there are other test failures shown in the output. It would be helpful to see what those were so could you run the tests as 'numpy.test(verbose=2)'? I suspect library problems or possibly mixed g77 and gfortran compilers, but it is hard to say at the moment. |
trac user alex_lai wrote on 2011-04-30 Hi Charris, I ran the test on Solaris 10 system: sbtorsvr391: As per your requirement, I ran the test with verbose level 2 and below is the result. Please kindly let me know if you need any additional infomation. sbtorsvr391:~ $ cd /home/dcottr/local/tests Thanks you very much, Alex |
@charris wrote on 2011-04-30 OK, I don't get this error. How did you install the version you are running now? Can you try the numpy 1.6 release candidate? |
trac user alex_lai wrote on 2011-04-30 Hi Charris, The installation was done by my colleage. Below is the script he provided: #!/bin/bash export LDFLAGS="-lCrun -lCstd"PATH=/opt/SUNWspro/bin:/usr/ccs/bin:/usr/bin:/usr/sfw/bin:/usr/sbin:/usr/local/bin; export PATH python3 setup.py build --help-fcompiler python3 setup.py install --prefix=/home/dcottr/localPython 3.1.2 is a 32-bit binary: sbtorsvr391:~ $ which python3 Please note that both Sun Studio 11 and 12 are installed on the machine. Thanks, Alex |
@charris wrote on 2011-04-30 This is getting beyond what I know, maybe someone with more experience with SUN systems can step in. It looks like you are using SUN fortran in combination with gcc compiled python/numpy? If so, that it likely a problem as everything needs to be built with compatible compilers. This ticket might fare better as a discussion on the numpy mailing list, You might want to post there. |
trac user alex_lai wrote on 2011-05-01 It looks likely that mixing sun fortran and gnu may have cuased the problem. We will try using gcc to compile numpy. Thanks for your comments. Alex |
@charris wrote on 2011-05-01 Let us know how things go. |
@charris wrote on 2011-05-05 Seems to have been resolved. |
trac user alex_lai wrote on 2011-05-16 Hi Charris, sbtorsvr391{alelai}: python3 -c "import numpy; numpy.test()" mdb core_sbtorsvr391_python3_7991_1520_1305581875_6742Loading modules: [ libc.so.1 libavl.so.1 libuutil.so.1 ld.so.1 ]
Below is the steps I followed to reinstall numpy: sbtorsvr391{alelai}: PATH=/usr/local/ssl/bin:/usr/local/bin:/usr/sfw/bin/:/usr/sbin:/usr/bin; export PATH sbtorsvr391{alelai}: which gcc btorsvr391{alelai}: which g77 GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
cd /var/tmp/python_pkgsPATH=$PATH:/apps/gnu/bin; export PATHcp /home/dcottr/local/archive/numpy-1.5.1.tar.gz .gunzip -c numpy-1.5.1.tar.gz |tar -xf -cd numpy-1.5.1python3 setup.py build --fcompiler=gnu... python3 setup.py install... Thnanks, Alex |
Way old. @matthew-brett Ever see something like this? |
Not until I tested it just now :( I'm not sure it's the same problem, but there's still a segmentation fault during testing. On standard Debian squeeze system (
For the above, running:
is OK. However:
gives:
So - maybe a different error. |
That does look like a different problem. If you can reproduce it easily, please open an issue. Hmm, |
New issue for rec functions bus error at #4314 |
The original was generating an exception message and, after aliasing, calling PyBytes_AsString on a unicode string -> error. It was also leaking references, although that probably didn't matter in context. The fix here is on the cheap side, just use a C string for the message without including the extra information about the erroneous type that led to the exception. No test, I don't know how to evoke this error. Closes numpy#2408.
Running:
in a Debian sid chroot does not reproduce the error either (Python 3.3). |
BUG: #2408, Fix f2py Python 3 error message string bug.
Original ticket http://projects.scipy.org/numpy/ticket/1815 on 2011-04-30 by trac user alex_lai, assigned to unknown.
Hi experts,
I’m wondering if anyone would look into this issue. While testing numpy package, Python crashed with the following error:
sbtorsvr391:~ $ cd /home/dcottr/local/tests
sbtorsvr391:
/local/tests $ export PYTHONPATH=$PYTHONPATH:/local/lib/python3.1/site-packagessbtorsvr391:~/local/tests $ /usr/local/bin/python3 -c "import numpy; numpy.test()"
Running unit tests for numpy
NumPy version 1.5.1
NumPy is installed in /home/dcottr/local/lib/python3.1/site-packages/numpy
Python version 3.1.2 (r312:79147, Mar 23 2010, 02:42:06) [GCC 3.4.6]
nose version 1.0.0
..S...............................................................................................................................................S........Warning: invalid value encountered in isfinite
............................................................................................................................................................................................Warning: invalid value encountered in isinf
Warning: invalid value encountered in isinf
......................................................................................................SSS........................K...........................................................K.....................................................................................................................................................F.F....................K.............................................................................................K...SK.F.......S...........................................................................................Segmentation Fault (core dumped)
mdb core_sbtorsvr391_python3_10439_5000_1304101376_11246
Loading modules: [ libc.so.1 libavl.so.1 libuutil.so.1 ld.so.1 ]
The C library used by Python is as follows:
sbtorsvr391:~/local/tests $ ldd /usr/local/bin/python3|grep libc
libc.so.1 => /lib/libc.so.1
/platform/SUNW,Sun-Fire-V490/lib/libc_psr.so.1
sbtorsvr391:~ $ ls -l /lib/libc.so.1
-rwxr-xr-x 1 root bin 1640776 Aug 10 2010 /lib/libc.so.1
sbtorsvr391:~ $ pkgchk -l -p /lib/libc.so.1
NOTE: Couldn't lock the package database.
Pathname: /lib/libc.so.1
Type: regular file
Expected mode: 0755
Expected owner: root
Expected group: bin
Expected file size (bytes): 1640776
Expected sum(1) of contents: 50250
Expected last modification: Aug 10 13:55:34 2010
Referenced by the following packages:
SUNWcslr
Current status: installed
sbtorsvr391:~ $ pkginfo -l SUNWcslr
PKGINST: SUNWcslr
NAME: Core Solaris Libraries (Root)
CATEGORY: system
ARCH: sparc
VERSION: 11.10.0,REV=2005.01.21.15.53
BASEDIR: /
VENDOR: Sun Microsystems, Inc.
DESC: core software for a specific instruction-set architecture
PSTAMP: on10-patch20100511083333
INSTDATE: Jan 22 2011 16:10
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 245 installed pathnames
2 shared pathnames
5 directories
133 executables
34303 blocks used (approx)
The same problem doesn't occur when the command is run as root.
I opened a ticket with Python support. they responsed with the comment:
The issue is actually in numpy. In numpy/f2py/src/fortranobject.c, function array_from_pyobj(), there is::
(In numpy headers, PyString_AsString is aliased to PyBytes_AsString.) Besides the reference leaks, this function will fail when given the unicode string returned by PyObject_Str(), and sprintf receives the null string...
Please report this to numpy.
I'm hoping I will find answer to this issue here...
Thanks in advance,
Alex
The text was updated successfully, but these errors were encountered: