Opened 3 years ago

Closed 3 years ago

#24999 closed defect (invalid)

alarm broken on 32-bit

Reported by: vbraun Owned by:
Priority: blocker Milestone: sage-duplicate/invalid/wontfix
Component: c_lib Keywords:
Cc: jdemeyer Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

I'm getting lots of segfaults in 32-bit builds, all in tests related to alarm / cysignals. The stackframe says that cysignals is calling back into python, this looks wrong:

sage: alarm(0.5); pol.any_root() ## line 1910 ##
------------------------------------------------------------------------
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4602)[0xf6ae1602]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x46ac)[0xf6ae16ac]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x6ee1)[0xf6ae3ee1]
linux-gate.so.1(__kernel_sigreturn+0x0)[0xf771acb0]
/lib/i386-linux-gnu/libc.so.6(gsignal+0x3c)[0xf7336e2c]
/lib/i386-linux-gnu/libc.so.6(abort+0x143)[0xf73384b3]
/lib/i386-linux-gnu/libc.so.6(+0x6c528)[0xf7375528]
/lib/i386-linux-gnu/libc.so.6(+0x725a3)[0xf737b5a3]
/lib/i386-linux-gnu/libc.so.6(realloc+0x257)[0xf737f1c7]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyMem_Realloc+0x2b)[0xf757590b]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4c64)[0xf6ae1c64]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(sig_raise_exception+0x269)[0xf6ae3679]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0xa970)[0xf6ae7970]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/sage_object.so(+0x64ab)[0xf6c4b4ab]
/home/buildbot/slave/sage_git/bu
ild/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x4c)[0xf75d921c]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyErr_CheckSignals+0xaf)[0xf76242af]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x139334)[0xf7624334]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(Py_MakePendingCalls+0xa3)[0xf75d8cc3]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x524a)[0xf75deaea]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_givaro.so(+0x1298e)[0xd0d2598e]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_givaro.so(+0x13f30)[0xd0d26f30]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_givaro.so(+0x35ef6)[0xd0d48ef6]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/element_givaro.so(+0x36e6f)[0xd0d49e6f]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6a37)[0xf75e02d7]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so(+0x7f4e)[0xf4660f4e]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/coerce_maps.so(+0xa2d2)[0xf46632d2]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/structure/parent.so(+0xa20f)[0xf4a6020f]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_zz_pex.so(+0xb653)[0xc49de653]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_zz_pex.so(+0x29244)[0xc49fc244]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_zz_pex.so(+0x13012)[0xc49e6012]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x10b)[0xf7570fdb]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/misc/derivative.so(+0x2bfd)[0xd113cbfd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x10b)[0xf7570fdb]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so(+0x3306c)[0xd189d06c]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x10b)[0xf7570fdb]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/finite_field_base.so(+0x9241)[0xd1ae0241]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/finite_rings/finite_field_base.so(+0x22831)[0xd1af9831]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so(+0x1b128)[0xd1885128]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so(+0x84beb)[0xd18eebeb]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so(+0x1ae55)[0xd1884e55]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/rings/polynomial/polynomial_element.so(+0xe25f4)[0xd194c5f4]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyCFunction_Call+0x10b)[0xf7570fdb]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6b4c)[0xf75e03ec]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xf75e3c5e]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x8
aa7)[0xf75e2347]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x6c5b1)[0xf75575b1]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x4617a)[0xf753117a]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0xa9cfa)[0xf7594cfa]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5a51)[0xf75df2f1]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7652)[0xf75e0ef2]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x6c5b1)[0xf75575b1]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x4617a)[0xf753117a]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0xa9f23)[0xf7594f23]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0xa6b9d)[0xf7591b9d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75214dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x5a51)[0xf75df2f1]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7652)[0xf75e0ef2]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x703d)[0xf75e08dd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7dd)[0xf75e3b2d]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xf75e3c5e]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0x77)[0xf7607647]
/home/buildbot/slave/sage_git/b
uild/local/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xe0)[0xf7608dc0]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyRun_AnyFileExFlags+0x5f)[0xf760930f]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(Py_Main+0xca2)[0xf761fef2]
/home/buildbot/slave/sage_git/build/local/bin/python2(main+0x27)[0x8048577]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf7322723]
/home/buildbot/slave/sage_git/build/local/bin/python2[0x80485a5]
------------------------------------------------------------------------
Attaching gdb to process id 28408.
Cannot find gdb installed
GDB is not installed.
Install gdb for enhanced tracebacks.
------------------------------------------------------------------------
Unhandled SIGABRT: An abort() occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

Another one for comparison:

sage: for i in range(20):  # long time
    try:
        alarm(RDF.random_element(1e-3, 0.5))
        _ = n.divisors()
        cancel_alarm()  # we never get here
    except AlarmInterrupt:
        pass ## line 2966 ##
------------------------------------------------------------------------
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4722)[0xf6a41722]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x47cc)[0xf6a417cc]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x7041)[0xf6a44041]
linux-gate.so.1(__kernel_sigreturn+0x0)[0xf7791cb0]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyDict_GetItem+0x1d)[0xf75ecb6d]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(sig_raise_exception+0x6d)[0xf6a435ed]
/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0xa0f0)[0xf6a470f0]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x4d)[0xf75a26cd]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_CallObjectWithKeywords+0x4c)[0xf765661c]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyErr_CheckSignals+0xc1)[0xf76a1031]
/home/buildbot/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1350a4)[0xf76a10a4]

Change History (8)

comment:1 Changed 3 years ago by jdemeyer

With or without #21509?

comment:2 Changed 3 years ago by jdemeyer

Just for completeness, I assume you mean Linux i386?

comment:3 Changed 3 years ago by jdemeyer

And is this on every Linux i386 system, or one in particular?

comment:4 Changed 3 years ago by jdemeyer

The strange thing is that I don't see why cysignals would depend on the CPU type in the first place. It's not doing fancy arithmetic, only syscalls. So I would expect that 32-bit Linux would behave the same as 64-bit Linux.

comment:5 Changed 3 years ago by vbraun

This is with #21509. Fails on all 32-bit linux buildbots.

comment:6 Changed 3 years ago by jdemeyer

From a few tests that I did so far, it seems that cysignals-1.6.8 is indeed problematic, but cysignals-1.6.9 seems to work. I don't have an explanation for this, I did not intentionally make changes related to 32-bit Linux in between those releases. I have updated #21509 with the latest release of cysignals, could you try that?

comment:7 Changed 3 years ago by jdemeyer

Also the cysignals-1.6.8 testsuite fails on 32-bit Linux, so consider that release broken.

comment:8 Changed 3 years ago by jdemeyer

  • Milestone changed from sage-8.2 to sage-duplicate/invalid/wontfix
  • Resolution set to invalid
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.