Opened 4 years ago

Closed 7 months ago

#26714 closed defect (invalid)

primecount crashes Sage on 32bit system

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: optional Keywords: sdl
Cc: vdelecroix, vklein, fbissey, jdemeyer, dimpase Merged in:
Authors: Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: #25009 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 4 years ago.
primecount.doctest.log (152.3 KB) - added by tmonteil 4 years ago.

Download all attachments as: .zip

Change History (16)

Changed 4 years ago by tmonteil

Changed 4 years ago by tmonteil

comment:1 Changed 4 years ago by tmonteil

  • Cc vdelecroix vklein fbissey jdemeyer added

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

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

comment:3 Changed 4 years ago by vdelecroix

And BTW, primecount 4.4 is out.

comment:4 in reply to: ↑ 2 Changed 4 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 4 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 3 years ago by tmonteil

  • Keywords sdl added

comment:7 Changed 8 months ago by mkoeppe

  • Cc dimpase added
  • Milestone changed from sage-8.5 to sage-9.5

comment:8 Changed 8 months ago by dimpase

at least this works at the command line now (from the git version of primecount):

$ uname -a
Linux arando 4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:00:48 UTC 2020 i686 i686 i686 GNU/Linux
$ primecount 1000
168

comment:9 Changed 8 months ago by dimpase

I'll check that the interface works, too - it will take a while to build on this old box.

comment:10 Changed 8 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

Let's close it as outdated in view of the update ticket #25009.

Portability testing (TBD) of #25009 also includes tests on several 32bit platforms.

comment:11 Changed 8 months ago by mkoeppe

  • Dependencies set to #25009

comment:12 Changed 8 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

comment:13 Changed 7 months ago by dimpase

testing on #25009 shows that it's all good now on 32-bit, and this may be closed.

comment:14 Changed 7 months ago by mkoeppe

  • Resolution set to invalid
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.