Skip to content

Numpy master segfaults in Scipy testsuite #8671

Closed

Description

@pv

Current numpy (2017-02-23, f24da28) crashes in Scipy test suite.
Observed on travis, and repro locally. Crashes at

$ gdb --args python runtests.py -g -t scipy/signal/tests/test_spectral.py:TestSTFT.test_permute_axes
Program received signal SIGSEGV, Segmentation fault.
0x00007fffedea4671 in PyArray_Transpose (ap=0x7fffd9244cb0, permute=0x7fffffff9b30) at numpy/core/src/multiarray/shape.c:711
711	            if (reverse_permutation[axis] != -1) {
(gdb) bt
#0  0x00007fffedea4671 in PyArray_Transpose (ap=0x7fffd9244cb0, permute=0x7fffffff9b30) at numpy/core/src/multiarray/shape.c:711
#1  0x00007fffede6b5db in array_transpose (self=0x7fffd9244cb0, args=0x7fffd97a0610) at numpy/core/src/multiarray/methods.c:1956
#2  0x00007ffff7adb7a1 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
...

Result from git bisect:
564b7cb is the first bad commit

Activity

  1. eric-wieser commented on Feb 23, 2017

    @eric-wieser
    Member

    Fixed in #8672, hopefully

  2. pv commented on Feb 23, 2017

    @pv
    MemberAuthor
  3. rgommers commented on Feb 23, 2017

    @rgommers
    Member

    I thought numpy travis checks for compiler warnings, so I wonder why it didnt catch it...

    These are the only ones (in travis-test.sh):

    # make some warnings fatal, mostly to match windows compilers
    werrors="-Werror=declaration-after-statement -Werror=vla "
    werrors+="-Werror=nonnull -Werror=pointer-arith"
    
  4. eric-wieser commented on Feb 23, 2017

    @eric-wieser
    Member

    Is there any way to make travis at least report other warnings? I've only ever seen them when there's also a failure

  5. pv commented on Feb 23, 2017

    @pv
    MemberAuthor
  6. pv commented on Feb 23, 2017

    @pv
    MemberAuthor
  7. eric-wieser commented on Feb 23, 2017

    @eric-wieser
    Member

    I think the issue is that travis is discarding the build stdout/stderr when it succeeds - I've seen warnings be emitted in the past. They just get emitted into nothingness... Maybe I'm just missing something in the travis UI.

  8. rgommers commented on Feb 23, 2017

    @rgommers
    Member

    It's not TravisCI, it's pip. pip install . is completely silent. Changing it to pip install . -v will show the build log.

  9. rgommers commented on Feb 23, 2017

    @rgommers
    Member

    I guess one constraint is that they may break the _configtest.c stuff that Numpy uses for detecting system configuration. But maybe it's possible to tweak numpy.distutils to do the right thing here?

    Possible but nontrivial I suspect.

    Adding a limited set of explicit warnings to werrors that doesn't conflict with _configtest and making the build log visible for the rest may be a better work/reward trade-off.

  10. juliantaylor commented on Feb 23, 2017

    @juliantaylor
    Contributor

    we do error out on warnings, the issue is only on our 32 bit build and on 32 bit intp == int so we miss warnings about this.
    We can probably add the warning checker to all builds but they use much older versions of gcc so they may be less good. Besides false positives not a big issue as we still have the one build with a new gcc.

  11. juliantaylor commented on Feb 23, 2017

    @juliantaylor
    Contributor

    but in any case -Wincompatible-pointer-types is probably a good choice for a fatal warning on all builds.

  12. eric-wieser commented on Feb 28, 2017

    @eric-wieser
    Member

    Presumably this can be closed, since #8672 is merged, and discussion about warnings continues at #8676

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions