Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda: segmentation fault during doctest of crypto/mq/sr and pbori #35595

Closed
2 tasks done
Tracked by #35597
tobiasdiez opened this issue May 2, 2023 · 3 comments
Closed
2 tasks done
Tracked by #35597

conda: segmentation fault during doctest of crypto/mq/sr and pbori #35595

tobiasdiez opened this issue May 2, 2023 · 3 comments

Comments

@tobiasdiez
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.

Did you read the documentation and troubleshoot guide?

  • I have read the documentation and troubleshoot guide

Environment

- **OS**: Windows, WSL 2.0
- **Sage Version**: dev branch

Steps To Reproduce

Run ./sage -t src/sage/crypto/mq/sr.py in conda enviroment. See also github workflow: https://github.com/sagemath/sage/actions/runs/4846009227/jobs/8635274790

Expected Behavior

No error

Actual Behavior

Get error

too many failed tests, not using stored timings
Running doctests with ID 2023-05-02-20-08-00-d8b98e86.
Git branch: lin_symplectic
Git ref: 10.0.rc1-17-gb439ea140b-dirty
Running with SAGE_LOCAL='/home/tobias/miniconda3/envs/sage-dev' and SAGE_VENV='/home/tobias/miniconda3/envs/sage-dev'
Using --optional=conda,pip,sage
Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,cvxopt,cvxopt,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_cubic_hecke,database_jones_numfield,database_knotinfo,dvipng,fpylll,gfan,graphviz,imagemagick,ipython,jupymake,kenzo,latte_int,lrcalc_python,lrslib,mcqd,meataxe,mpmath,msolve,nauty,networkx,numpy,palp,pandoc,pdf2svg,pdftocairo,pexpect,phitigra,pillow,plantri,polytopes_db,polytopes_db_4d,pplpy,primecountpy,ptyprocess,pynormaliz,python_igraph,requests,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.groups,sage.libs.gap,sage.libs.pari,sage.libs.singular,sage.misc.cython,sage.modules,sage.plot,sage.rings.finite_rings,sage.rings.function_field,sage.rings.number_field,sage.rings.padics,sage.rings.real_double,sage.rings.real_mpfr,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,scipy,singular,sphinx,sympy,tdlib
Doctesting 1 file.
sage -t --random-seed=152125203327691848610921166990507833546 src/sage/crypto/mq/sr.py
    Killed due to segmentation fault
**********************************************************************
Tests run before process (pid=1361) failed:
sage: sr = mq.SR(1, 1, 1, 4) ## line 29 ##
sage: sr.n, sr.r, sr.c, sr.e ## line 37 ##
(1, 1, 1, 4)
sage: print(sr.R.repr_long()) ## line 42 ##
Polynomial Ring
  Base Ring : Finite Field in a of size 2^4
       Size : 20 Variables
   Block  0 : Ordering : deglex
              Names    : k100, k101, k102, k103, x100, x101, x102, x103, w100, w101, w102, w103, s000, s001, s002, s003, k000, k001, k002, k003

sage: sr.ShiftRows ## line 53 ##
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: sr.MixColumns ## line 61 ##
[1 0 0 0]
[0 1 0 0]
[0 0 1 0]
[0 0 0 1]
sage: sr.Lin ## line 69 ##
[          a^2 + 1                 1         a^3 + a^2           a^2 + 1]
[                a                 a                 1 a^3 + a^2 + a + 1]
[          a^3 + a               a^2               a^2                 1]
[                1               a^3             a + 1             a + 1]
sage: sr.M ## line 77 ##
[          a^2 + 1                 1         a^3 + a^2           a^2 + 1]
[                a                 a                 1 a^3 + a^2 + a + 1]
[          a^3 + a               a^2               a^2                 1]
[                1               a^3             a + 1             a + 1]
sage: sr.Mstar ## line 85 ##
[          a^2 + 1                 1         a^3 + a^2           a^2 + 1]
[                a                 a                 1 a^3 + a^2 + a + 1]
[          a^3 + a               a^2               a^2                 1]
[                1               a^3             a + 1             a + 1]
sage: sr = mq.SR(10,4,4,8) ## line 94 ##
sage: sr.Mstar == ~sr.MixColumns * sr.M ## line 95 ##
True
sage: sr = mq.SR(1,1,1,4, gf2=True, polybori=True) ## line 101 ##
sage: K = sr.base_ring() ## line 102 ##
sage: a = K.gen() ## line 103 ##
sage: K = [a] ## line 104 ##
sage: P = [1] ## line 105 ##
sage: F,s = sr.polynomial_system(P=P, K=K) ## line 106 ##
sage: F.groebner_basis() ## line 107 ##
------------------------------------------------------------------------
/home/tobias/miniconda3/envs/sage-dev/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x76cd)[0x7fa350dd06cd]
/home/tobias/miniconda3/envs/sage-dev/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x778c)[0x7fa350dd078c]
/home/tobias/miniconda3/envs/sage-dev/lib/python3.10/site-packages/cysignals/signals.cpython-310-x86_64-linux-gnu.so(+0x9bc7)[0x7fa350dd2bc7]
/lib/x86_64-linux-gnu/libc.so.6(+0x42520)[0x7fa351db7520]
/home/tobias/miniconda3/envs/sage-dev/lib/libbrial_groebner.so.3(+0x39cc3)[0x7fa2fbb7bcc3]
/home/tobias/miniconda3/envs/sage-dev/lib/libbrial_groebner.so.3(+0x44669)[0x7fa2fbb86669]
/home/tobias/miniconda3/envs/sage-dev/lib/libbrial_groebner.so.3(_ZN8polybori8groebner16GroebnerStrategy16faugereStepDenseERKSt6vectorINS_15BoolePolynomialESaIS3_EE+0x136)[0x7fa2fbb81236]
/home/tobias/sage-conda/src/sage/rings/polynomial/pbori/pbori.cpython-310-x86_64-linux-gnu.so(+0x7c67a)[0x7fa2fbf4367a]
python3(+0x14012b)[0x564eff00f12b]
python3(_PyEval_EvalFrameDefault+0x4d0d)[0x564eff00423d]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x332)[0x564efefff862]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyObject_FastCallDictTstate+0x185)[0x564eff0080b5]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(PyObject_Call+0x209)[0x564eff01c209]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyObject_Call+0xb8)[0x564eff01c0b8]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(PyVectorcall_Call+0xb9)[0x564eff01c419]
/home/tobias/sage-conda/src/sage/rings/polynomial/pbori/pbori.cpython-310-x86_64-linux-gnu.so(+0x3079f)[0x7fa2fbef779f]
/home/tobias/sage-conda/src/sage/rings/polynomial/pbori/pbori.cpython-310-x86_64-linux-gnu.so(+0x88926)[0x7fa2fbf4f926]
python3(_PyObject_MakeTpCall+0x26b)[0x564eff008cdb]
python3(+0x14c874)[0x564eff01b874]
python3(PyVectorcall_Call+0xb9)[0x564eff01c419]
/home/tobias/sage-conda/src/sage/rings/polynomial/pbori/pbori.cpython-310-x86_64-linux-gnu.so(+0x3079f)[0x7fa2fbef779f]
/home/tobias/sage-conda/src/sage/rings/polynomial/pbori/pbori.cpython-310-x86_64-linux-gnu.so(+0x4b8f0)[0x7fa2fbf128f0]
python3(_PyObject_MakeTpCall+0x26b)[0x564eff008cdb]
python3(+0x14cac2)[0x564eff01bac2]
python3(_PyEval_EvalFrameDefault+0x2ec3)[0x564eff0023f3]
python3(+0x14c581)[0x564eff01b581]
python3(_PyEval_EvalFrameDefault+0x4d0d)[0x564eff00423d]
python3(+0x1db6a2)[0x564eff0aa6a2]
python3(PyEval_EvalCode+0x87)[0x564eff0aa5e7]
python3(+0x1e2c30)[0x564eff0b1c30]
python3(+0x140d14)[0x564eff00fd14]
python3(_PyEval_EvalFrameDefault+0x332)[0x564efefff862]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyObject_FastCallDictTstate+0xd1)[0x564eff008001]
python3(_PyObject_Call_Prepend+0x69)[0x564eff019ae9]
python3(+0x2177b9)[0x564eff0e67b9]
python3(_PyObject_MakeTpCall+0x26b)[0x564eff008cdb]
python3(_PyEval_EvalFrameDefault+0x4fb1)[0x564eff0044e1]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(+0x14c581)[0x564eff01b581]
python3(_PyEval_EvalFrameDefault+0x13d0)[0x564eff000900]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyObject_FastCallDictTstate+0xd1)[0x564eff008001]
python3(+0x14a0fb)[0x564eff0190fb]
python3(_PyObject_MakeTpCall+0x2bb)[0x564eff008d2b]
python3(_PyEval_EvalFrameDefault+0x4fb1)[0x564eff0044e1]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x4d0d)[0x564eff00423d]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x4d0d)[0x564eff00423d]
python3(+0x14c581)[0x564eff01b581]
python3(_PyEval_EvalFrameDefault+0x4d0d)[0x564eff00423d]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(_PyFunction_Vectorcall+0x6f)[0x564eff00fb1f]
python3(_PyEval_EvalFrameDefault+0x735)[0x564efefffc65]
python3(+0x1db6a2)[0x564eff0aa6a2]
python3(PyEval_EvalCode+0x87)[0x564eff0aa5e7]
python3(+0x20e3fc)[0x564eff0dd3fc]
python3(+0x2092d4)[0x564eff0d82d4]
python3(+0x9758d)[0x564efef6658d]
python3(_PyRun_SimpleFileObject+0x1b5)[0x564eff0d24f5]
python3(_PyRun_AnyFileObject+0x43)[0x564eff0d20a3]
python3(Py_RunMain+0x399)[0x564eff0cf279]
python3(Py_BytesMain+0x39)[0x564eff09cdc9]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90)[0x7fa351d9ed90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80)[0x7fa351d9ee40]
python3(+0x1cdcc1)[0x564eff09ccc1]

Additional Information

@isuruf @mkoeppe

(There is also #32083 but this doesn't seem to be the same issue)

Full debug log:
log.txt

@mkoeppe
Copy link
Member

mkoeppe commented May 2, 2023

That's all polybori (brial); any insights @kiwifb?

@kiwifb
Copy link
Member

kiwifb commented May 2, 2023

It looks like cschwan/sage-on-gentoo#733 which seems to be related to have compiled brial with gcc-11 and then sage with gcc-12. It is a very weird, should not happen, incompatibility if it is really the root cause.

@tobiasdiez tobiasdiez changed the title conda: segmentation fault during doctest of crypto/mq/sr conda: segmentation fault during doctest of crypto/mq/sr and pbori Oct 1, 2023
@tobiasdiez
Copy link
Contributor Author

Seems to be gone by now.

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

No branches or pull requests

3 participants