Opened 2 years ago

Last modified 20 months ago

#26714 new defect

primecount crashes Sage on 32bit system

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-8.5
Component: packages: optional Keywords: sdl
Cc: vdelecroix, vklein, fbissey, jdemeyer Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Preparing 8.4 release of SDL (32bit system), i noticed that the following crashes Sage when primecount package is installed:

sage: from sage.interfaces.primecount import prime_pi
sage: prime_pi(1000)
------------------------------------------------------------------------
/opt/sagemath/sage-8.4/local/lib/python2.7/site-packages/cysignals/signals.so(+0x5192)[0xb6bba192]
/opt/sagemath/sage-8.4/local/lib/python2.7/site-packages/cysignals/signals.so(+0x523c)[0xb6bba23c]
/opt/sagemath/sage-8.4/local/lib/python2.7/site-packages/cysignals/signals.so(+0x8680)[0xb6bbd680]
linux-gate.so.1(__kernel_sigreturn+0x0)[0xb7730d04]
/opt/sagemath/sage-8.4/local/lib/libprimecount.so.4(_ZNK10primecount5Sieve5countEyy+0x2e8)[0x87db0368]
/opt/sagemath/sage-8.4/local/lib/libprimecount.so.4(_ZN10primecount7pi_lmo5Ex+0xcf1)[0x87dcbbd1]
/opt/sagemath/sage-8.4/local/lib/libprimecount.so.4(_ZN10primecount2piExi+0x4b)[0x87dbadbb]
/opt/sagemath/sage-8.4/local/lib/libprimecount.so.4(_ZN10primecount2piEx+0x26)[0x87dbb7e6]
/opt/sagemath/sage-8.4/local/lib/python2.7/site-packages/sage/interfaces/primecount.so(+0x4c2b)[0x87decc2b]
/opt/sagemath/sage-8.4/local/lib/python2.7/site-packages/sage/interfaces/primecount.so(+0x5cc1)[0x87dedcc1]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x632a)[0xb75fc0ca]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xb75fff0e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7395)[0xb75fd135]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x7077)[0xb75fce17]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x7fe)[0xb75ffd9e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x2e)[0xb75fff0e]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0x77)[0xb76234a7]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0xdd)[0xb7624a0d]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(PyRun_AnyFileExFlags+0x67)[0xb7625137]
/opt/sagemath/sage-8.4/local/lib/libpython2.7.so.1.0(Py_Main+0xcfd)[0xb763c05d]
/opt/sagemath/sage-8.4/local/bin/python2(main+0x27)[0x4a3607]
/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6)[0xb72cf286]
/opt/sagemath/sage-8.4/local/bin/python2(+0x645)[0x4a3645]
------------------------------------------------------------------------
Attaching gdb to process id 24794.

I attach the corresponding gdb trace as well as the related doctest log.

Attachments (2)

primecount.gdb.crash.trace (83.6 KB) - added by tmonteil 2 years ago.
primecount.doctest.log (152.3 KB) - added by tmonteil 2 years ago.

Download all attachments as: .zip

Change History (8)

Changed 2 years ago by tmonteil

Changed 2 years ago by tmonteil

comment:1 Changed 2 years ago by tmonteil

  • Cc vdelecroix vklein fbissey jdemeyer added

comment:2 follow-up: Changed 2 years ago by vdelecroix

It would be more appropriate to reproduce outside of Sage and make a report upstream.

comment:3 Changed 2 years ago by vdelecroix

And BTW, primecount 4.4 is out.

comment:4 in reply to: ↑ 2 Changed 2 years ago by vdelecroix

Replying to vdelecroix:

It would be more appropriate to reproduce outside of Sage and make a report upstream.

@thierry: could you try the following in a Sage shell (sage -sh)

$ primecount 1000

comment:5 Changed 2 years ago by vdelecroix

And the trace is irrelevant since primecount has not been compiled with gdb support. We only see Cython stuff. Apparently, running cmake with the additional option -DCMAKE_BUILD_TYPE=Debug should set the compiler flag properly. Could you try it?

comment:6 Changed 20 months ago by tmonteil

  • Keywords sdl added
Note: See TracTickets for help on using tickets.