Opened 3 years ago

Closed 3 years ago

#26442 closed enhancement (fixed)

Upgrade to cypari2-2.0.3

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.7
Component: packages: standard Keywords:
Cc: vdelecroix, defeo, fbissey Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix, Timo Kaufmann
Report Upstream: N/A Work issues:
Branch: cd62d45 (Commits, GitHub, GitLab) Commit: cd62d45bcef93fb4f7ed62609a46135e6de07051
Dependencies: #27060 Stopgaps:

Status badges

Attachments (1)

vincent-cypari-2.0.1.log (34.1 KB) - added by vdelecroix 3 years ago.

Download all attachments as: .zip

Change History (109)

comment:1 Changed 3 years ago by jdemeyer

  • Dependencies changed from #26396 to #25292

comment:2 Changed 3 years ago by jdemeyer

  • Dependencies changed from #25292 to #25292, #26493

comment:3 Changed 3 years ago by jdemeyer

  • Dependencies changed from #25292, #26493 to #26396, #26493

comment:4 Changed 3 years ago by jdemeyer

  • Branch set to u/jdemeyer/upgrade_to_cypari2_2_0_0

comment:5 Changed 3 years ago by jdemeyer

  • Commit set to 6b70ed05f8fbb2d78a8d50cf8c7edd5ffc881e3f
  • Dependencies #26396, #26493 deleted

New commits:

81947f6Use PARI clones instead of deepcopy_to_python_heap()
6b70ed0Upgrade to cypari2 version 2

comment:6 Changed 3 years ago by git

  • Commit changed from 6b70ed05f8fbb2d78a8d50cf8c7edd5ffc881e3f to e40bd8f28956e47f546600100452432e4049209b

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e40bd8fUpgrade to cypari2 version 2

comment:7 Changed 3 years ago by git

  • Commit changed from e40bd8f28956e47f546600100452432e4049209b to b4bcb4b3c060ce51ce5b9905fa9a25052ffbfa44

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

b4bcb4bUpgrade to cypari2 version 2

comment:8 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:9 Changed 3 years ago by git

  • Commit changed from b4bcb4b3c060ce51ce5b9905fa9a25052ffbfa44 to cec13a7b7c79b800bbbc7db543e47d26624542e7

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

cec13a7Upgrade to cypari2 version 2.0.0

comment:10 Changed 3 years ago by jdemeyer

  • Status changed from new to needs_review

comment:11 Changed 3 years ago by fbissey

  • Cc fbissey added

comment:12 Changed 3 years ago by vdelecroix

Testing integer.pyx shows a "bad" behavior

File "rings/integer.pyx", line 6767, in sage.rings.integer.Integer.binomial
Failed example:
    for i in [1..10]:  # long time (5s)
        try:
            alarm(i/11)
            (2^100).binomial(2^22, algorithm='pari')
        except AlarmInterrupt:
            pass
Expected nothing
Got:
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16b53f3c40
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16aae64038
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a1af7f88
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a1af7f88
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a1af7f88
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a8ef7f88
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a4612528
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a4b0c988
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a22f7f88
    ERROR: inconsistent avma when removing Gen from PARI stack
    Expected: 0x7f16bcaf7fc8
    Actual:   0x7f16a37a5008
**********************************************************************
1 item had failures:
   1 of  16 in sage.rings.integer.Integer.binomial
    [1121 tests, 1 failure, 18.28 s]

comment:13 Changed 3 years ago by jdemeyer

  • Status changed from needs_review to needs_work

comment:14 Changed 3 years ago by git

  • Commit changed from cec13a7b7c79b800bbbc7db543e47d26624542e7 to 486a11229c9e2abb6f6b3784f4e70ee48125b02d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

486a112Upgrade to cypari2 version 2.0.1

comment:15 Changed 3 years ago by jdemeyer

  • Description modified (diff)

comment:16 Changed 3 years ago by git

  • Commit changed from 486a11229c9e2abb6f6b3784f4e70ee48125b02d to 7905b39a510c2e09b1ebf0d4a11342bfe3c0d236

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

7905b39Upgrade to cypari2 version 2.0.1

comment:17 Changed 3 years ago by jdemeyer

  • Status changed from needs_work to needs_review
  • Summary changed from Upgrade to cypari2-2.0.0 to Upgrade to cypari2-2.0.1

comment:18 Changed 3 years ago by jdemeyer

ping?

comment:19 Changed 3 years ago by vdelecroix

  • Milestone changed from sage-8.4 to sage-8.5
  • Reviewers set to Vincent Delecroix

Good for me. Thanks for this new release of cypari2!

comment:20 Changed 3 years ago by jdemeyer

So positive review then?

comment:21 Changed 3 years ago by vdelecroix

  • Status changed from needs_review to positive_review

Indeed.

comment:22 Changed 3 years ago by jdemeyer

Thanks!

comment:23 follow-up: Changed 3 years ago by vbraun

  • Status changed from positive_review to needs_info

Is the testsuite supposed to work? (SAGE_DEBUG=yes)

[cypari-2.0.1] Testing cypari2.gen
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] 
[cypari-2.0.1] *** SIG 6 *** inside sig_on
[cypari-2.0.1] do_raise_exception(sig=6)
[cypari-2.0.1] PyErr_Occurred() = 0x11f4fb0
[cypari-2.0.1] Raising Python exception 0 ms after signal...
[cypari-2.0.1] ------------------------------------------------------------------------
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x5226)[0x7f47616ee226]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x5406)[0x7f47616ee406]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x48ae)[0x7f47616ed8ae]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cysignals/signals.so(+0x4a7f)[0x7f47616eda7f]
[cypari-2.0.1] /lib64/libpthread.so.0(+0x11fb0)[0x7f4765c6dfb0]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpari-gmp.so.6(+0x55d557)[0x7f47627fe557]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpari-gmp.so.6(+0x55d562)[0x7f47627fe562]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpari-gmp.so.6(+0x55d5c6)[0x7f47627fe5c6]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpari-gmp.so.6(gclone+0x28)[0x7f47627fe7cd]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cypari2/stack.so(+0x669c)[0x7f476190e69c]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cypari2/pari_instance.so(+0x21974d)[0x7f47630f774d]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cypari2/pari_instance.so(+0x21a203)[0x7f47630f8203]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/python2.7/site-packages/cypari2/pari_instance.so(+0x21a0dc)[0x7f47630f80dc]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0xe2aca)[0x7f4765f5daca]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyObject_Call+0x7f)[0x7f4765ecd58a]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x164f67)[0x7f4765fdff67]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1642a7)[0x7f4765fdf2a7]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xb52b)[0x7f4765fd9663]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1148)[0x7f4765fdc58f]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x41)[0x7f4765fce113]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x166ca8)[0x7f4765fe1ca8]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0x6145)[0x7f4765fd427d]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1148)[0x7f4765fdc58f]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1646c0)[0x7f4765fdf6c0]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x16428b)[0x7f4765fdf28b]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xb52b)[0x7f4765fd9663]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1148)[0x7f4765fdc58f]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1646c0)[0x7f4765fdf6c0]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x16428b)[0x7f4765fdf28b]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xb52b)[0x7f4765fd9663]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1148)[0x7f4765fdc58f]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1646c0)[0x7f4765fdf6c0]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x16428b)[0x7f4765fdf28b]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalFrameEx+0xb52b)[0x7f4765fd9663]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCodeEx+0x1148)[0x7f4765fdc58f]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyEval_EvalCode+0x41)[0x7f4765fce113]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(+0x1965a6)[0x7f47660115a6]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyRun_FileExFlags+0xb7)[0x7f476601152c]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyRun_SimpleFileExFlags+0x2e5)[0x7f476600fba1]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(PyRun_AnyFileExFlags+0x88)[0x7f476600f1db]
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/lib/libpython2.7.so.1.0(Py_Main+0xd2d)[0x7f476602b675]
[cypari-2.0.1] python(main+0x20)[0x400756]
[cypari-2.0.1] /lib64/libc.so.6(__libc_start_main+0xeb)[0x7f476512511b]
[cypari-2.0.1] python(_start+0x2a)[0x40067a]
[cypari-2.0.1] ------------------------------------------------------------------------
[cypari-2.0.1] Unhandled SIGSEGV: A segmentation fault occurred.
[cypari-2.0.1] This probably occurred because a *compiled* module has a bug
[cypari-2.0.1] in it and is not properly wrapped with sig_on(), sig_off().
[cypari-2.0.1] Python will now terminate.
[cypari-2.0.1] ------------------------------------------------------------------------
[cypari-2.0.1] make[4]: *** [Makefile:16: check] Segmentation fault (core dumped)
[cypari-2.0.1] make[4]: Leaving directory '/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/tmp/sage/build/cypari-2.0.1/src'
[cypari-2.0.1] 
[cypari-2.0.1] real	0m2.838s
[cypari-2.0.1] user	0m2.261s
[cypari-2.0.1] sys	0m0.093s
[cypari-2.0.1] ************************************************************************
[cypari-2.0.1] Error testing package cypari-2.0.1
[cypari-2.0.1] ************************************************************************
[cypari-2.0.1] Please email sage-devel (http://groups.google.com/group/sage-devel)
[cypari-2.0.1] explaining the problem and including the log file
[cypari-2.0.1]   /mnt/disk/home/buildslave-sage/slave/sage_git/build/logs/pkgs/cypari-2.0.1.log
[cypari-2.0.1] Describe your computer, operating system, etc.
[cypari-2.0.1] If you want to try to fix the problem yourself, *don't* just cd to
[cypari-2.0.1] /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/tmp/sage/build/cypari-2.0.1 and type 'make check' or whatever is appropriate.
[cypari-2.0.1] Instead, the following commands setup all environment variables
[cypari-2.0.1] correctly and load a subshell for you to debug the error:
[cypari-2.0.1]   (cd '/mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/tmp/sage/build/cypari-2.0.1' && '/mnt/disk/home/buildslave-sage/slave/sage_git/build/sage' --sh)
[cypari-2.0.1] When you are done debugging, you can type "exit" to leave the subshell.
[cypari-2.0.1] ************************************************************************
make[3]: *** [Makefile:2124: /mnt/disk/home/buildslave-sage/slave/sage_git/build/local/var/lib/sage/installed/cypari-2.0.1] Error 1
make[3]: Target 'all-sage' not remade because of errors.
make[3]: Leaving directory '/mnt/disk/home/buildslave-sage/slave/sage_git/build/build/make'
make[2]: *** [Makefile:1806: all-build] Error 2
make[2]: Target 'build-start' not remade because of errors.
make[2]: Leaving directory '/mnt/disk/home/buildslave-sage/slave/sage_git/build/build/make'

comment:24 Changed 3 years ago by fbissey

It's supposed to work. The upstream repo is tested with travis and the test suite runs here on Gentoo. Is it a one off machine or a variety of machines?

comment:25 Changed 3 years ago by jhpalmieri

For what it's worth, it passes on OS X Mojave, although with some warnings:

Running the test suite for cypari-2.0.1...
python -u tests/rundoctest.py
================================================================================
Testing cypari2.closure
================================================================================
Testing cypari2.convert
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 72 bytes on the PARI stack
  compileflags, 1) in test.globs
================================================================================
Testing cypari2.gen
================================================================================
Testing cypari2.handle_error
  ***   user warning: test
================================================================================
Testing cypari2.pari_instance
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 158187944 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 390197216 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 275990048 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 375226304 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 288216680 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 416977632 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 444596288 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 343465920 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 379927792 bytes on the PARI stack
  compileflags, 1) in test.globs
/Users/jpalmier/Desktop/Sage/git/sage/local/lib/python2.7/doctest.py:1315: RuntimeWarning: cypari2 leaked 398485936 bytes on the PARI stack
  compileflags, 1) in test.globs
================================================================================
Testing cypari2.stack
================================================================================
Testing cypari2.string_utils
================================================================================
Testing autogen.doc
================================================================================
Testing autogen.generator
================================================================================
Testing autogen.parser
================================================================================
Testing autogen.paths
================================================================================
Summary result for cypari2:
   attempted = 1291
   failed = 0

comment:26 Changed 3 years ago by fbissey

I have the warnings on linux too. Different numbers but same warnings. However nothing is fatal unlike Volker's log.

comment:27 in reply to: ↑ 23 Changed 3 years ago by jdemeyer

Replying to vbraun:

Is the testsuite supposed to work? (SAGE_DEBUG=yes)

Is that error reproducible? I cannot immediately reproduce it. If it's not reproducible, it might be a random race condition, unrelated to SAGE_DEBUG.

comment:28 Changed 3 years ago by vbraun

  • Status changed from needs_info to positive_review

lets give it another try...

comment:29 Changed 3 years ago by jdemeyer

If you do reproduce the problem, please let me login to that machine to debug.

comment:30 Changed 3 years ago by jdemeyer

  • Status changed from positive_review to needs_work

Never mind, I managed to reproduce it after building all of Sage with SAGE_DEBUG=yes.

comment:31 Changed 3 years ago by jdemeyer

Somehow the test suite runs out of memory with SAGE_DEBUG=yes. This out-of-memory condition is not processed properly, leading to a crash.

Last edited 3 years ago by jdemeyer (previous) (diff)

comment:32 Changed 3 years ago by jdemeyer

This fails whenever Python is compiled with SAGE_DEBUG=yes.

comment:33 Changed 3 years ago by gh-timokau

I assumed this was only an issue with SAGE_DEBUG, so I updated cypari2 on nix. It tested fine locally, but I see a segfault when doctesting sage on our buildserver: https://nix-cache.s3.amazonaws.com/log/f72zl576819vraijymr4dpx9kp4jim4q-sage-tests-8.4.drv

comment:34 Changed 3 years ago by jdemeyer

That does indeed look like the same problem. I have not spent much time on fixing it, but I will.

comment:35 Changed 3 years ago by git

  • Commit changed from 7905b39a510c2e09b1ebf0d4a11342bfe3c0d236 to e949ce9ac6b8f83599c15ba277e9efe2d4b907e8

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

e949ce9Upgrade to cypari2 version 2.0.1

comment:36 Changed 3 years ago by jdemeyer

  • Status changed from needs_work to positive_review

I don't know what happened, but I can no longer reproduce the problem mentioned at 23

If somebody else can, please be so kind to give me access to that machine to debug the problem.

comment:37 follow-ups: Changed 3 years ago by gh-timokau

It was a semi-random error and I was able to reproduce it once (33). I think immediately going positive_review just because it doesn't reproduce right now is a bad idea.

comment:38 Changed 3 years ago by jdemeyer

Maybe the upgrade to PARI-2.11.1 (#26725) fixed something?

comment:39 in reply to: ↑ 37 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

It was a semi-random error

I believe that the error with SAGE_DEBUG=yes was a reproducible non-random error. It may or may not be the same bug as the one you encountered on nix.

comment:40 in reply to: ↑ 37 ; follow-up: Changed 3 years ago by jdemeyer

Replying to gh-timokau:

I think immediately going positive_review just because it doesn't reproduce right now is a bad idea.

So what do you suggest instead?

comment:41 in reply to: ↑ 40 Changed 3 years ago by gh-timokau

  • Status changed from positive_review to needs_review

Replying to jdemeyer:

Maybe the upgrade to PARI-2.11.1 (#26725) fixed something?

Maybe.

Replying to jdemeyer:

Replying to gh-timokau:

It was a semi-random error

I believe that the error with SAGE_DEBUG=yes was a reproducible non-random error. It may or may not be the same bug as the one you encountered on nix.

It showed up immediately after the update though and never again after I reverted it. SAGE_DEBUG wasn't involved, but it probably had something to do with load, core count or something else thats different on a dedicated buildserver.

Replying to jdemeyer:

Replying to gh-timokau:

I think immediately going positive_review just because it doesn't reproduce right now is a bad idea.

So what do you suggest instead?

I'll try to see if I can reproduce the error. Not sure when I'll get to it though. There is no hurry for this upgrade right?

comment:42 follow-up: Changed 3 years ago by vdelecroix

build works fine but sage -f -c cypari fails

[cypari-2.0.1] Running the test suite for cypari-2.0.1...
[cypari-2.0.1] make[2]: Entering directory '/opt/sage-py3-clang/local/var/tmp/sage/build/cypari-2.0.1/src'
[cypari-2.0.1] python -u tests/rundoctest.py
[cypari-2.0.1] Traceback (most recent call last):
[cypari-2.0.1]   File "tests/rundoctest.py", line 11, in <module>
[cypari-2.0.1]     import cypari2
[cypari-2.0.1]   File "/opt/sage-py3-clang/local/var/tmp/sage/build/cypari-2.0.1/src/cypari2/__init__.py", line 1, in <module>
[cypari-2.0.1]     from .pari_instance import Pari
[cypari-2.0.1] ImportError: No module named pari_instance
[cypari-2.0.1] make[2]: *** [Makefile:16: check] Error 1
Last edited 3 years ago by vdelecroix (previous) (diff)

comment:43 in reply to: ↑ 42 Changed 3 years ago by jdemeyer

Replying to vdelecroix:

build works fine but sage -f -c cypari fails

How did that happen? Is that Sage installation broken somehow? Can you provide the full install log for cypari?

comment:44 Changed 3 years ago by jdemeyer

  • Status changed from needs_review to needs_work

I tried again to reproduce the problem and I did manage but only after make distclean. Maybe I did something wrong yesterday...

Anyway, it seems that the problem is 100% reproducible now so I can work on it.

comment:45 Changed 3 years ago by gh-timokau

Great! Thanks for re-checking. Hopefully the solution will also apply to the (probably related) problem I was seeing.

Changed 3 years ago by vdelecroix

comment:46 follow-up: Changed 3 years ago by vdelecroix

For the full log of the failures mentioned in 42 and 43 is vincent-cypari-2.0.1.log. Let me mention that it is a Python 3 build of Sage.

comment:47 Changed 3 years ago by jdemeyer

I solved the segmentation fault with SAGE_DEBUG=yes.

The underlying problem was exceptions containing pointers to PARI objects, where the exception was being kept alive after the PARI object was deallocated. This invalid exception objects then crashed Python. I solved the problem in cypari2 upstream by always making copies of PARI objects in exceptions (assuming that exceptions are exceptional, this should not affect performance). I don't know why the problem occurs only (or at least with much higher probability) with SAGE_DEBUG=yes.

I will do some more testing and then release cypari2-2.0.2

comment:48 in reply to: ↑ 46 Changed 3 years ago by jdemeyer

Replying to vdelecroix:

Let me mention that it is a Python 3 build of Sage.

Indeed. Confirmed with Python 3 but only inside Sage.

comment:49 follow-up: Changed 3 years ago by jdemeyer

OK, the problem with Python 3 is simple: the test suite is always being run with Python 2 which obviously doesn't have cypari2 installed.

comment:50 Changed 3 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Upgrade to cypari2-2.0.1 to Upgrade to cypari2-2.0.2

comment:51 Changed 3 years ago by git

  • Commit changed from e949ce9ac6b8f83599c15ba277e9efe2d4b907e8 to d754ee9bcf7c58645477370cbf72d7b554e05259

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d754ee9Upgrade to cypari2 version 2.0.2

comment:52 in reply to: ↑ 49 ; follow-up: Changed 3 years ago by vdelecroix

Replying to jdemeyer:

OK, the problem with Python 3 is simple: the test suite is always being run with Python 2 which obviously doesn't have cypari2 installed.

Why on earth python defaults to python2 on py3 build!?

comment:53 Changed 3 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:54 Changed 3 years ago by vdelecroix

  • Milestone changed from sage-8.5 to sage-8.7

sage-python23 is indeed a solution. I confirm that tests now pass with py3 build.

Last edited 3 years ago by vdelecroix (previous) (diff)

comment:55 follow-up: Changed 3 years ago by vdelecroix

The following line in the installation log looks suspicious

[cypari-2.0.2] No record that 'cypari' was ever installed; skipping uninstall

Any idea where it comes from? Is it not detected because of the discrepency cypari vs cypari2?

comment:56 in reply to: ↑ 52 ; follow-up: Changed 3 years ago by jhpalmieri

Replying to vdelecroix:

Replying to jdemeyer:

OK, the problem with Python 3 is simple: the test suite is always being run with Python 2 which obviously doesn't have cypari2 installed.

Why on earth python defaults to python2 on py3 build!?

python is always supposed to default to python2: that's a Python convention.

comment:57 in reply to: ↑ 56 Changed 3 years ago by vdelecroix

Replying to jhpalmieri:

Replying to vdelecroix:

Replying to jdemeyer:

OK, the problem with Python 3 is simple: the test suite is always being run with Python 2 which obviously doesn't have cypari2 installed.

Why on earth python defaults to python2 on py3 build!?

python is always supposed to default to python2: that's a Python convention.

Really? At least on archlinux python points to Python 3

$ ls -l /usr/bin/python
lrwxrwxrwx 1 root root 7 22 oct.  12:41 /usr/bin/python -> python3

comment:58 Changed 3 years ago by jhpalmieri

See https://www.python.org/dev/peps/pep-0394/ (which mentions Arch Linux specifically).

comment:59 Changed 3 years ago by vdelecroix

  • Status changed from needs_review to positive_review

Let's give it another try.

comment:60 in reply to: ↑ 55 Changed 3 years ago by jdemeyer

Replying to vdelecroix:

The following line in the installation log looks suspicious

[cypari-2.0.2] No record that 'cypari' was ever installed; skipping uninstall

Any idea where it comes from?

When you run ./sage -f cypari, it first uninstalls the package. So by the time you are installing again, there is "No record that 'cypari' was ever installed". I agree that the message is confusing, but it's completely normal.

comment:61 follow-ups: Changed 3 years ago by gh-timokau

I tried to update the nix package to 2.0.2 and got a segfault during ptestlong (not reproducible in isolation):

sage -t --long /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/groups/additive_abelian/all.py
    [0 tests, 0.00 s]
doctest:warning
  [...]
  File "/nix/store/351z9795scybnc45vxydpcsp3x9bc88g-python-2.7.15-env/lib/python2.7/multiprocessing/queues.py", line 268, in _feed
    send(obj)
:
RuntimeWarning: cypari2 leaked 140736969821680 bytes on the PARI stack
------------------------------------------------------------------------
/nix/store/351z9795scybnc45vxydpcsp3x9bc88g-python-2.7.15-env/lib/python2.7/site-packages/cysignals/signals.so(+0x7bfb)[0x7ffff1a2dbfb]
[...]
/nix/store/p8fyjvz3djclmndwxjfcj7zkmx89wniw-glibc-2.27/lib/libc.so.6(clone+0x3f)[0x7ffff6b231ff]
------------------------------------------------------------------------
Attaching gdb to process id 10236.
Cannot find gdb installed
GDB is not installed.
Install gdb for enhanced tracebacks.
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault 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.
------------------------------------------------------------------------
sage -t --long /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/groups/additive_abelian/additive_abelian_wrapper.py
    Killed due to segmentation fault
**********************************************************************
Tests run before process (pid=10236) failed:
sage: E = EllipticCurve('30a2') ## line 14 ##
[...]
sage: G([1,1]) ## line 270 ##
doctest:warning
  [...]
  File "/nix/store/351z9795scybnc45vxydpcsp3x9bc88g-python-2.7.15-env/lib/python2.7/site-packages/sage/misc/superseded.py", line 148, in warning
    warn(message, warning_class, stacklevel)
:
DeprecationWarning: The default behaviour changed! If you *really* want a linear combination of smith generators, use .linear_combination_of_smith_form_gens.
See http://trac.sagemath.org/16261 for details.
(6, 2)
sage: G(G([1,1])) ## line 276 ##
(6, 2)
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 278 ##
0

Full log: https://gist.github.com/timokau/62edfecf23ed96b3a5284c5d913a1643

That was with sage 8.5 with this ticket applied and pari 2.11.1.

Haven't had any time to investigate much further yet. Although I don't really know what to do besides checking how reliable this reproduces.

comment:62 in reply to: ↑ 61 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

Although I don't really know what to do besides checking how reliable this reproduces.

Running the tests with gdb installed might help.

comment:63 in reply to: ↑ 61 ; follow-up: Changed 3 years ago by jdemeyer

Replying to gh-timokau:

not reproducible in isolation

Is it reproducible when running make ptestlong?

comment:64 in reply to: ↑ 63 ; follow-up: Changed 3 years ago by gh-timokau

Replying to jdemeyer:

Replying to gh-timokau:

not reproducible in isolation

Is it reproducible when running make ptestlong?

On the second try I got a different failure:

sage -t --long /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/doctest/test.py
**********************************************************************
File "/nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/doctest/test.py", line 220, in sage.doctest.test
Failed example:
    subprocess.call(["sage", "-tp", "1000000", "--timeout=120",  # long time
         "--warn-long", "0", "99seconds.rst", "interrupt_diehard.rst"], **kwds2)
Expected:
    Running doctests...
    Doctesting 2 files using 1000000 threads.
    Killing test 99seconds.rst
    Killing test interrupt_diehard.rst
    ----------------------------------------------------------------------
    Doctests interrupted: 0/2 files tested
    ----------------------------------------------------------------------
    ...
    128
Got:
    Running doctests with ID 2019-01-12-08-52-31-cbdf1975.
    Using --optional=dochtml,gmp,memlimit,nose,sage
    Doctesting 2 files using 1000000 threads.
    Killing test 99seconds.rst
    Killing test interrupt_diehard.rst
    ------------------------------------------------------------------------
    /nix/store/351z9795scybnc45vxydpcsp3x9bc88g-python-2.7.15-env/lib/python2.7/site-packages/cysignals/signals.so(+0x7bfb)[0x7ffff1a2dbfb]
    [...]
    /nix/store/46kfixv5s95klr3wmnydcp8pc6cfgr08-python-2.7.15/lib/libpython2.7.so.1.0(Py_Main+0xb4a)[0x7ffff78f4aaa]
    /nix/store/p8fyjvz3djclmndwxjfcj7zkmx89wniw-glibc-2.27/lib/libc.so.6(__libc_start_main+0xee)[0x7ffff6a52b5e]
    /nix/store/46kfixv5s95klr3wmnydcp8pc6cfgr08-python-2.7.15/bin/python(_start+0x2a)[0x4007ba]
    ------------------------------------------------------------------------
    ----------------------------------------------------------------------
    Doctests interrupted: 0/2 files tested
    ----------------------------------------------------------------------
    Total time for all tests: 0.1 seconds
        cpu time: 0.0 seconds
        cumulative wall time: 0.0 seconds
    Attaching gdb to process id 6906.
    Cannot find gdb installed
    GDB is not installed.
    Install gdb for enhanced tracebacks.
    ------------------------------------------------------------------------
    128
**********************************************************************
1 item had failures:
   1 of  24 in sage.doctest.test
    [54 tests, 1 failure, 50.91 s]
Killing test /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/doctest/sources.py
Killing test /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/dynamics/arithmetic_dynamics/projective_ds.py
Killing test /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/dynamics/flat_surfaces/all.py
------------------------------------------------------------------------
/nix/store/351z9795scybnc45vxydpcsp3x9bc88g-python-2.7.15-env/lib/python2.7/site-packages/cysignals/signals.so(+0x7bfb)[0x7ffff1a2dbfb]
[...]
/nix/store/46kfixv5s95klr3wmnydcp8pc6cfgr08-python-2.7.15/bin/python(_start+0x2a)[0x4007ba]
------------------------------------------------------------------------
----------------------------------------------------------------------
sage -t --long /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/doctest/test.py  # 1 doctest failed
Doctests interrupted: 1384/3738 files tested

Only difference to the first run was that I passed --exitfirst. Full log: https://gist.github.com/timokau/84fa6a991119087661e3491181612727 sta To make sure this is really caused by the cypari2 update, I then reverted the update and re-ran the testsuite again. This time it succeeded.

comment:65 Changed 3 years ago by gh-timokau

  • Status changed from positive_review to needs_info

I'll try to reproduce with sage-the-distro on 8.6.rc0, but that will take a while.

comment:66 in reply to: ↑ 64 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

On the second try I got a different failure:

You already reported that as #26912. This is certainly unrelated to cypari2.

comment:67 Changed 3 years ago by gh-timokau

Right, I forgot.

comment:68 Changed 3 years ago by jdemeyer

So, how should we proceed? If I have no way to reproduce the problem, I cannot fix it.

comment:69 follow-up: Changed 3 years ago by gh-timokau

I'll try to narrow it down a bit. If all else fails, bisect cypari2 and find the commit that causes this.

That takes time, especially considering that each test requires a ptestlong. Again, is there any hurry for this? Presumably this will only make it into 8.7 either way right?

comment:70 in reply to: ↑ 69 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

If all else fails, bisect cypari2 and find the commit that causes this.

It's almost certainly https://github.com/defeo/cypari2/commit/551a5277456a3170dd690773e22f319cc1ad795a

comment:71 Changed 3 years ago by jdemeyer

(in the unlikely case that it's not caused by that commit, that would be very useful information)

comment:72 follow-up: Changed 3 years ago by gh-timokau

I'm currently trying to get vanilla sage to bulid+test to try to reproduce it there (unrelated issues with linking and python).

For the nix package it definitely reproduces very reliably (3 times in a row) so after that I'll check if the commit is responsible.

comment:73 in reply to: ↑ 72 Changed 3 years ago by jdemeyer

For the nix package it definitely reproduces very reliably (3 times in a row)

If possible, please keep all logs of all make ptestlong runs. For example, I want to know if the failures are literally identical or whether there is some random variation.

comment:74 follow-up: Changed 3 years ago by gh-timokau

Alright, I'll keep them. Kept the first 3 already. Currently running with the cypari checkout you pointed out.

Unrelated but do you have any idea why the python patched could fail to apply? I'm getting errors from the safe-directory test and the regex group index issue when testing vanilla sage. It does use sages python (the system python even has the regex thing patched). The build log does say that the patches were applied. The log also says "checking for sys/types.h... yes" which seems relevant for the sys_path_security patch.

comment:75 in reply to: ↑ 74 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

It does use sages python

Are you sure about that? Is there by chance more than 1 Python installed?

comment:76 follow-up: Changed 3 years ago by gh-timokau

Yes a system python is installed. But I did export PATH=$PWD/local/bin:$PATH, verified with which python and also tried the safe directory example manually (./local/bin/python did not complain).

comment:77 Changed 3 years ago by jdemeyer

I pushed two more relevant commits to https://github.com/defeo/cypari2/commits/master

They clean up some of the code and might by chance fix your problem.

comment:78 in reply to: ↑ 76 ; follow-up: Changed 3 years ago by jdemeyer

Replying to gh-timokau:

Yes a system python is installed. But I did export PATH=$PWD/local/bin:$PATH, verified with which python and also tried the safe directory example manually (./local/bin/python did not complain).

Could it be a Python 2 versus Python 3 problem? Just guessing...

comment:79 Changed 3 years ago by gh-timokau

Thanks, I'll do a test with latest master too.

comment:80 in reply to: ↑ 78 Changed 3 years ago by gh-timokau

Replying to jdemeyer:

Replying to gh-timokau:

Yes a system python is installed. But I did export PATH=$PWD/local/bin:$PATH, verified with which python and also tried the safe directory example manually (./local/bin/python did not complain).

Could it be a Python 2 versus Python 3 problem? Just guessing...

I don't think so:

sage-build-env-chrootenv:timo@pad:~/repos/sage$ which python
/home/timo/repos/sage/local/bin/python
sage-build-env-chrootenv:timo@pad:~/repos/sage$ python --version
Python 2.7.14
sage-build-env-chrootenv:timo@pad:~/repos/sage$ mkdir /tmp/dir
sage-build-env-chrootenv:timo@pad:~/repos/sage$ chmod 777 /tmp/dir
sage-build-env-chrootenv:timo@pad:~/repos/sage$ touch /tmp/dir/file
sage-build-env-chrootenv:timo@pad:~/repos/sage$ python /tmp/dir/file
sage-build-env-chrootenv:timo@pad:~/repos/sage$ grep Applying logs/pkgs/python2-2.7.15.p0.log 
Applying patches from ../patches...
Applying ../patches/2.6.5-FD_SETSIZE.patch
Applying ../patches/cygwin64.patch
Applying ../patches/descr_ref-issue_25750.patch
Applying ../patches/getcallargs-issue_20108.patch
Applying ../patches/hashlibfallbacks-issue_18000.patch
Applying ../patches/linux_linking_issue_25229.patch
Applying ../patches/ncurses-issue_14438.patch
Applying ../patches/ncurses-issue_9665.patch
Applying ../patches/no_strict_proto-issue_5755.patch
Applying ../patches/permissions.patch
Applying ../patches/re_match_index-issue_27177.patch
Applying ../patches/socket.patch
Applying ../patches/sys_path_security-issue_16202.patch
Applying ../patches/tinfo.patch
Applying ../patches/uuid-issue_11063.patch
sage-build-env-chrootenv:timo@pad:~/repos/sage$ 

Very weird...

comment:81 follow-up: Changed 3 years ago by jdemeyer

A library problem? Note that the python executable is really just a wrapper around a library libpython2.7.so

comment:82 Changed 3 years ago by gh-timokau

551a5277456a3170dd690773e22f319cc1ad795a actually doesn't show this problem:

sage -t --long /nix/store/rppc0jilfm84ydj405mafd8kjzqr97rp-sage-src-8.5/src/sage/groups/additive_abelian/additive_abelian_group.py
    [76 tests, 1.50 s]

Although I didn't adjust the sage patch, so there are some other failures like this:

Failed example:
    ModularSymbols(11, 4, base_ring=QuadraticField(-7,'b'),sign=1).cuspidal_submodule()._q_expansion_module(prec=5, algorithm="eigen") # indirect doctest
Expected:
    Vector space of degree 5 and dimension 2 over Number Field in b with defining polynomial x^2 + 7
    Basis matrix:
    [ 0  1  0  3 -6]
    [ 0  0  1 -4  2]
Got:
    Vector space of degree 5 and dimension 2 over Number Field in b with defining polynomial x^2 + 7
    Basis matrix:
    [ 0  1  1  0 -6]
    [ 0  0  0  1 -2]

Possible that there is some interaction.

Didn't test master yet.

comment:83 in reply to: ↑ 81 Changed 3 years ago by gh-timokau

Replying to jdemeyer:

A library problem? Note that the python executable is really just a wrapper around a library libpython2.7.so

I think that is it, at least LD_DEBUG=libs python shows

calling init: /usr/lib/libpython2.7.so.1.0

comment:84 Changed 3 years ago by jdemeyer

In the mean time, I found an unrelated serious bug in cypari2-2.0.2 so I'll need to make a new version anyway.

comment:85 Changed 3 years ago by jdemeyer

After a few make ptestlong runs with this ticket, I got

sage -t --long src/sage/modular/abvar/torsion_subgroup.py
**********************************************************************
File "src/sage/modular/abvar/torsion_subgroup.py", line 46, in sage.modular.abvar.torsion_subgroup
Failed example:
    for N in range(1,38):
       for A in J0(N).new_subvariety().decomposition():
           T = A.rational_torsion_subgroup()
           print('%-5s%-5s%-5s%-5s'%(N, A.dimension(), T.divisor_of_order(), T.multiple_of_order()))
Expected:
    11   1    5    5
    14   1    6    6
    15   1    8    8
    17   1    4    4
    19   1    3    3
    20   1    6    6
    21   1    8    8
    23   2    11   11
    24   1    8    8
    26   1    3    3
    26   1    7    7
    27   1    3    3
    29   2    7    7
    30   1    6    6
    31   2    5    5
    32   1    4    4
    33   1    4    4
    34   1    6    6
    35   1    3    3
    35   2    16   16
    36   1    6    6
    37   1    1    1
    37   1    3    3
Got:
    11   1    5    5    
    14   1    6    6    
    15   1    8    8    
    17   1    4    4    
    19   1    3    3    
    20   1    6    6    
    21   1    8    8    
    23   2    11   11   
    24   1    8    8    
    26   1    3    3    
    26   1    7    7    
    27   1    3    3    
    doctest:warning
      File "/home/jdemeyer/sage-test/src/bin/sage-runtests", line 163, in <module>
        err = DC.run()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/control.py", line 1225, in run
        self.run_doctests()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/control.py", line 929, in run_doctests
        self.dispatcher.dispatch()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1991, in dispatch
        self.parallel_dispatch()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1888, in parallel_dispatch
        w.start()  # This might take some time
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 2174, in start
        super(DocTestWorker, self).start()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/multiprocessing/process.py", line 130, in start
        self._popen = Popen(self)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/multiprocessing/forking.py", line 126, in __init__
        code = process_obj._bootstrap()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
        self.run()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 2130, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 2468, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 2515, in _run
        result = runner.run(test)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 860, in run
        return self._run(test, compileflags, out)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 671, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1086, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.modular.abvar.torsion_subgroup[9]>", line 2, in <module>
        for A in J0(N).new_subvariety().decomposition():
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/abvar/abvar.py", line 4521, in decomposition
        S = ModularAbelianVariety_abstract.decomposition(self, simple=simple, bound=bound)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/abvar/abvar.py", line 3398, in decomposition
        I_F, I_E, X = self._classify_ambient_factors(simple=simple, bound=bound)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/abvar/abvar.py", line 3531, in _classify_ambient_factors
        S   = self.vector_space()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/abvar/abvar.py", line 288, in vector_space
        self.__vector_space = self.lattice().change_ring(QQ)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/abvar/abvar.py", line 4122, in lattice
        K0 = M.integral_structure()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/modsym/space.py", line 1584, in integral_structure
        I = A.integral_structure()
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/modular/modsym/ambient.py", line 2313, in integral_structure
        B = B.echelon_form(algorithm='pari', include_zero_rows=False)
      File "/home/jdemeyer/sage-test/local/lib/python2.7/site-packages/sage/matrix/matrix_space.py", line 817, in __call__
        return self.element_class(self, entries, copy, coerce)
    :
    RuntimeWarning: cypari2 leaked 11040 bytes on the PARI stack
    29   2    7    7    
    30   1    6    6    
    31   2    5    5    
    32   1    4    4    
    33   1    4    4    
    34   1    6    6    
    35   1    3    3    
    35   2    16   16   
    36   1    6    6    
    37   1    1    1    
    37   1    3    3    
**********************************************************************
Last edited 3 years ago by jdemeyer (previous) (diff)

comment:86 Changed 3 years ago by gh-timokau

I haven't seen that particular failure yet.

comment:87 Changed 3 years ago by jdemeyer

  • Dependencies set to #27060
  • Status changed from needs_info to needs_work

comment:88 Changed 3 years ago by git

  • Commit changed from d754ee9bcf7c58645477370cbf72d7b554e05259 to 68a7babe5bd5a4092131d1554f823467347222a7

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9fffd00Fix various invalid uses of sig_on()
68a7babUpgrade to cypari2 version 2.0.2

comment:89 follow-up: Changed 3 years ago by gh-timokau

git bisect actually points me to this commit: https://github.com/defeo/cypari2/commit/b980e648648

And with that reverted on 2.0.2, the tests pass.

comment:90 in reply to: ↑ 89 Changed 3 years ago by jdemeyer

Replying to gh-timokau:

git bisect actually points me to this commit: https://github.com/defeo/cypari2/commit/b980e648648

Maybe, but that's surely not the real reason for the failing tests.

comment:91 Changed 3 years ago by gh-timokau

Why not? What does that do?

comment:92 Changed 3 years ago by git

  • Commit changed from 68a7babe5bd5a4092131d1554f823467347222a7 to a185f05263d4a0a58bf8a95fd49ba9d31df195c3

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9e1fd1eClean up HNF computation using PARI
a185f05Upgrade to cypari2 version 2.0.2

comment:93 follow-up: Changed 3 years ago by jdemeyer

After 2 days(!) of debugging, I finally found out that the problem that I was seeing in 85 was caused by a broken implementation of HNF computation. I added a new commit to fix that.

comment:94 Changed 3 years ago by jdemeyer

I added some code to cypari2 to better check for potential problems like this (and this is how I determined the problem). But then I found other issues in Sage, which are fixed by the dependency #27060.

So it remains to make a new cypari2 release and then update this ticket.

comment:95 in reply to: ↑ 93 ; follow-up: Changed 3 years ago by gh-timokau

Replying to jdemeyer:

After 2 days(!) of debugging, I finally found out that the problem that I was seeing in 85 was caused by a broken implementation of HNF computation. I added a new commit to fix that.

Thank you for your work!

Not sure if the new version will need additional sage changes, but when I run current master (cc1d51071358d9deeeff65ba83a04da9735d4abd) with the patch from this branch I get

Failed example:
    complex_plot(zeta, (-30,30), (-30,30))
Expected:
    Graphics object consisting of 1 graphics primitive
Got:
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
    ERROR: sig_on_count = 1 during remove_from_pari_stack()
[about a million more repetitions of this]

For a lot of tests.

Could you elaborate why the commit I pointed out cannot possibly be responsible for the issue I'm seeing?

comment:96 in reply to: ↑ 95 ; follow-up: Changed 3 years ago by jdemeyer

Replying to gh-timokau:

with the patch from this branch

Are you very sure about that? Please double check that you're using the right branch from this ticket (note that it has 3 commits on top of 8.6.rc1, you need to apply them all).

Last edited 3 years ago by jdemeyer (previous) (diff)

comment:98 in reply to: ↑ 96 Changed 3 years ago by gh-timokau

Replying to jdemeyer:

Replying to gh-timokau:

with the patch from this branch

Are you very sure about that? Please double check that you're using the right branch from this ticket.

Not the latest version you pushed 4hrs ago. Sorry about that.

comment:99 Changed 3 years ago by jdemeyer

Just now I updated cypari2 master. So please test with that and with the Sage patches (3 commits) from the branch here.

I won't push any additional changes until you report back.

comment:100 Changed 3 years ago by gh-timokau

Alright, testing the current version of this ticket (https://git.sagemath.org/sage.git/diff?id2=62fe3948ea8ca4c91e877290ed23529b6e6f79fe&id=a185f05263d4a0a58bf8a95fd49ba9d31df195c3) with the current cypari2 master (35e66b5ad58839b771c8acfd1fe7d7e03678cc88).

I won't push any additional changes until you report back.

That will be tomorrow though. Getting too late for another full ptestlong.

comment:101 Changed 3 years ago by gh-timokau

While updating cypari2 to latest master I also noticed that it was set to plain 2.0.2. I'm pretty sure the last ptestlong was with master, but I must've reset it at some time. So maybe the last ptestlong wasn't with master after all.

Anyways, we'll know more when the next test finishes.

comment:102 Changed 3 years ago by gh-timokau

All tests passed!
----------------------------------------------------------------------
Total time for all tests: 5378.1 seconds
    cpu time: 18224.2 seconds
    cumulative wall time: 20930.0 seconds

🎉

comment:103 Changed 3 years ago by jdemeyer

  • Description modified (diff)
  • Summary changed from Upgrade to cypari2-2.0.2 to Upgrade to cypari2-2.0.3

comment:104 Changed 3 years ago by git

  • Commit changed from a185f05263d4a0a58bf8a95fd49ba9d31df195c3 to cd62d45bcef93fb4f7ed62609a46135e6de07051

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

1894ffaClean up HNF computation using PARI
cd62d45Upgrade to cypari2 version 2.0.3

comment:105 Changed 3 years ago by jdemeyer

  • Status changed from needs_work to needs_review

comment:106 Changed 3 years ago by gh-timokau

  • Status changed from needs_review to positive_review

The latest changes are only documentation and I've run ptestlong with yesterday's version 4 times now to be sure. Lets go ahead with this.

comment:107 Changed 3 years ago by jdemeyer

  • Reviewers changed from Vincent Delecroix to Vincent Delecroix, Timo Kaufmann

Note that the dependency #27060 still needs review.

comment:108 Changed 3 years ago by vbraun

  • Branch changed from u/jdemeyer/upgrade_to_cypari2_2_0_0 to cd62d45bcef93fb4f7ed62609a46135e6de07051
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.