thouis / numpy-trac-migration

numpy Trac to github issues migration
2 stars 3 forks source link

seg fault during "ptp on MaskedArrays"; Solaris 9, NumPy 1.2.1 (Trac #1000) #4803

Open numpy-gitbot opened 11 years ago

numpy-gitbot commented 11 years ago

Original ticket http://projects.scipy.org/numpy/ticket/1000 on 2009-02-05 by trac user gbburkhardt, assigned to atmention:cournape.

Built NumPy 1.2.1 on a Solaris 9 system, netlib/lapack-3.2, fftw-3.2, UMFPACK-5.2.0, AMD-2.2.0, UFconfig-3.2.0. Ran unit tests, and program seg fault'd in the "ptp on MaskedArrays" test. Log from test, backtrace, some variable queries attached. 'site.cfg' file attached.

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-02-05: site.cfg

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-02-05: numpy-dump

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-02-05: numpy-dump.2

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-02-05

And Atlas 3.8.2. Please ignore first attachment "numpy-dump". I meant to replace it, and can't see how to delete it from the ticket.

numpy-gitbot commented 11 years ago

atmention:cournape wrote on 2009-02-20

Which compiler were you using ? Would you mind trying numpy svn as well, with the same compiler (but without site.cfg - I doubt the error comes from atlas or something else, but I would prefer keeping things as simple as possible to track this down).

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-02-23

Compiler:

glenn.burkhardt $ gcc -v Using built-in specs. Target: sparc-sun-solaris2.9 Configured with: ../gcc-4.3.2/configure --prefix=/home/vxworks/opt/sparc-sun-solaris2.9/gcc/4.3.2 --with-gnu-as --with-gnu-ld --enable-languages=c,c++,fortran --enable-threads --disable-nls --with-gmp-lib=/home/vxworks/opt/sparc-sun-solaris2.9/gcc/4.3.2/lib --with-mpfr-lib=/home/vxworks/opt/sparc-sun-solaris2.9/gcc/4.3.2/lib --with-libiconv-prefix=/home/vxworks/opt/sparc-sun-solaris2.9/gcc/4.3.2 CPPFLAGS=-I/home/vxworks/opt/sparc-sun-solaris2.9/gcc/4.3.2/include Thread model: posix gcc version 4.3.2 (GCC)

I'll pull a copy from the SVN archive, and try again.

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-02-24: numpy-svn-2.23.09

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-02-24

I pulled a snapshot from the repository last night, and ran the test suite. A different error occurred (see attachment "numpy-svn-2.23.09". It looks like it went past the code in which the original error occurred, and the new one is more straight forward. The Sparc processor requires 8-byte memory alignment for writing a double, and the address in the pointer is only 4-byte aligned. It looks like the function that's allocating the memory is deep inside Python.

numpy-gitbot commented 11 years ago

atmention:cournape wrote on 2009-03-02

Can you check whether r6528 fixes this ?

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-03-02

I pulled r6830, but there's a build error on Solaris. Execution of the tests results in:

ImportError: ld.so.1: python: fatal: relocation error: file /opt/gnu/python-2.5.2/lib/python2.5/site-packages/numpy/core/umath.so: symbol fmodf: referenced symbol not found

I note that for a previous snapshot:

core $ nm -g umath.so | grep fmod U fmodatmention:atmention:SUNW_1.1 00009514 T fmodf 00008ddc T fmodl

and for the r6830 snapshot:

core $ nm -g umath.so | grep fmod U fmodatmention:atmention:SUNW_1.1 U fmodf U fmodl 00038448 T npy_fmod 00038410 T npy_fmodf 00038458 T npy_fmodl

I'll try to investigate a fix, but if a solution is clear to you, please let me know.

numpy-gitbot commented 11 years ago

atmention:cournape wrote on 2009-03-02

Could you create a new ticket for this build error (with the full build log). It is a separate problem, but should be easy to fix once I get the build log.

I am afraid the fix at r6528 is not right, or more exactly stressed a codepath which is not well tested (and segfaults on windows).

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-03-03

The problem with undefined references for fmodf, et al, has been fixed (ticket #1033). With r6535, I'm still seeing a seg fault when running the unit tests. I've attached a log file (numpy-segfault-3.3.09). The code for that run was compiled with debugging OFF.

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-03-03: numpy-segfault-3.3.09

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-03-03

Sorry, I meant that that code was compiled with optimization OFF.

numpy-gitbot commented 11 years ago

atmention:pv wrote on 2009-03-08

[comment:4 gbburkhardt]:

The Sparc processor requires 8-byte memory alignment for writing a double, and the address in the pointer is only 4-byte aligned. It looks like the function that's allocating the memory is deep inside Python.

Doesn't this also mean that Sparc users will also be hit by #551: unpickling arrays regularly makes them mis-aligned.

numpy-gitbot commented 11 years ago

Attachment added by trac user gbburkhardt on 2009-03-09: numpy-r6591-segfault

numpy-gitbot commented 11 years ago

trac user gbburkhardt wrote on 2009-03-09

I thought the alignment problem had been fixed, but apparently I had just gotten lucky. I've attached another log with a seg fault on Solaris due to an unaligned double pointer. It's in the same spot as it was in the 2/23/09 seg fault.