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

lib("freegb.lib") sometimes make Conda build crash #39098

Open
2 tasks done
user202729 opened this issue Dec 9, 2024 · 3 comments
Open
2 tasks done

lib("freegb.lib") sometimes make Conda build crash #39098

user202729 opened this issue Dec 9, 2024 · 3 comments
Labels

Comments

@user202729
Copy link
Contributor

Steps To Reproduce

e.g.

https://github.com/sagemath/sage/actions/runs/12227176866/job/34103526826?pr=37447#step:9:7618

Expected Behavior

Actual Behavior

Additional Information

No response

Environment

  • OS: Conda on Ubuntu
  • Sage Version: 3.11

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@tobiasdiez
Copy link
Contributor

For reference (the build log will disappear in 2 months):

sage -t --warn-long 5.0 --random-seed=85049595565619788885733902960031249362 src/sage/rings/polynomial/plural.pyx
    SignalError in doctesting framework
**********************************************************************

Tests run before exception:
sage: A.<x,y,z> = FreeAlgebra(QQ, 3) ## line 50 ##
sage: P.<x,y,z> = A.g_algebra(relations={y*x:-x*y}, order = 'lex') ## line 51 ##
sage: P ## line 53 ##
Noncommutative Multivariate Polynomial Ring in x, y, z over Rational Field, nc-relations: {y*x: -x*y}
sage: y*x + 1/2 ## line 56 ##
-x*y + 1/2
sage: A.<x,y,z> = FreeAlgebra(GF(17), 3) ## line 59 ##
sage: P.<x,y,z> = A.g_algebra(relations={y*x:-x*y}, order = 'lex') ## line 60 ##
sage: P ## line 61 ##
Noncommutative Multivariate Polynomial Ring in x, y, z over Finite Field of size 17, nc-relations: {y*x: -x*y}
sage: y*x + 7 ## line 64 ##
-x*y + 7
sage: from sage.matrix.constructor import Matrix ## line 71 ##
sage: c = Matrix(3) ## line 72 ##
sage: c[0,1] = -2 ## line 73 ##
sage: c[0,2] = 1 ## line 74 ##
sage: c[1,2] = 1 ## line 75 ##
sage: d = Matrix(3) ## line 77 ##
sage: d[0, 1] = 17 ## line 78 ##
sage: P = QQ['x','y','z'] ## line 79 ##
sage: c = c.change_ring(P) ## line 80 ##
sage: d = d.change_ring(P) ## line 81 ##
sage: from sage.rings.polynomial.plural import NCPolynomialRing_plural ## line 83 ##
sage: R.<x,y,z> = NCPolynomialRing_plural(QQ, c = c, d = d, order=TermOrder('lex',3),category=Algebras(QQ)) ## line 84 ##
sage: R ## line 85 ##
Noncommutative Multivariate Polynomial Ring in x, y, z over Rational Field, nc-relations: {y*x: -2*x*y + 17}
sage: R.term_order() ## line 88 ##
Lexicographic term order
sage: a,b,c = R.gens() ## line 91 ##
sage: f = 57 * a^2*b + 43 * c + 1; f ## line 92 ##
57*x^2*y + 43*z + 1
sage: A.<x,y,z> = FreeAlgebra(QQ, 3) ## line 97 ##
sage: P = A.g_algebra(relations={y*x:-x*y}, order = 'lex') ## line 98 ##
sage: TestSuite(P).run() ## line 99 ##
sage: loads(dumps(P)) is P ## line 100 ##
True
sage: A.<x,y,z> = FreeAlgebra(QQ, 3) ## line 103 ##
sage: P = A.g_algebra(relations={y*x:-x*y}, order = 'lex') ## line 104 ##
sage: P.is_commutative() ## line 105 ##
False
sage: R.<x,y,z> = FreeAlgebra(QQ, 3) ## line 108 ##
sage: P = R.g_algebra(relations={}, order='lex') ## line 109 ##
sage: P.is_commutative() ## line 110 ##
True
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 112 ##
0
sage: A.<x,y,z> = FreeAlgebra(QQ, 3) ## line 156 ##
sage: H = A.g_algebra({y*x:x*y-z, z*x:x*z+2*x, z*y:y*z-2*y}) ## line 157 ##

**********************************************************************
Traceback (most recent call last):
  File "parent.pyx", line 895, in sage.structure.parent.Parent.__call__
  File "coerce_dict.pyx", line 650, in sage.structure.coerce_dict.MonoDict.get
KeyError: Free Algebra on 3 generators (x, y, z) over Rational Field

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "parent.pyx", line 2501, in sage.structure.parent.Parent._internal_convert_map_from
  File "coerce_dict.pyx", line 650, in sage.structure.coerce_dict.MonoDict.get
KeyError: Free Algebra on 3 generators (x, y, z) over Rational Field

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/doctest/forker.py", line 2596, in __call__
    doctests, extras = self._run(runner, options, results)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/doctest/forker.py", line 2644, in _run
    result = runner.run(test)
             ^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/doctest/forker.py", line 905, in run
    return self._run(test, compileflags, out)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/doctest/forker.py", line 716, in _run
    self.compile_and_execute(example, compiler, test.globs)
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/doctest/forker.py", line 1137, in compile_and_execute
    exec(compiled, globs)
  File "<doctest sage.rings.polynomial.plural.G_AlgFactory[1]>", line 1, in <module>
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/algebras/free_algebra.py", line 1018, in g_algebra
    dmat[v2_ind, v1_ind] = polynomial_ring(d_poly)
                           ^^^^^^^^^^^^^^^^^^^^^^^
  File "parent.pyx", line 897, in sage.structure.parent.Parent.__call__
  File "parent.pyx", line 2503, in sage.structure.parent.Parent._internal_convert_map_from
  File "parent.pyx", line 2524, in sage.structure.parent.Parent.discover_convert_map_from
  File "parent.pyx", line 2146, in sage.structure.parent.Parent._internal_coerce_map_from
  File "parent.pyx", line 2238, in sage.structure.parent.Parent._internal_coerce_map_from
  File "parent.pyx", line 2383, in sage.structure.parent.Parent.discover_coerce_map_from
  File "module.pyx", line 132, in sage.modules.module.Module._coerce_map_from_
  File "/usr/share/miniconda3/envs/sage-dev/lib/python3.11/site-packages/sage/algebras/free_algebra.py", line 771, in _coerce_map_from_
    if isinstance(R, (FreeAlgebra_generic, FreeAlgebra_letterplace)):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "lazy_import.pyx", line 966, in sage.misc.lazy_import.LazyImport.__instancecheck__
  File "lazy_import.pyx", line 224, in sage.misc.lazy_import.LazyImport.get_object
  File "lazy_import.pyx", line 259, in sage.misc.lazy_import.LazyImport._get_object
  File "free_algebra_letterplace.pyx", line 1, in init sage.algebras.letterplace.free_algebra_letterplace
  File "free_algebra_element_letterplace.pyx", line 25, in init sage.algebras.letterplace.free_algebra_element_letterplace
  File "function.pyx", line 1812, in sage.libs.singular.function.lib
cysignals.signals.SignalError: Segmentation fault

@user202729
Copy link
Contributor Author

Technically I think the bug isn't that rare so maybe there's a way to just grep through all the logs of this particular type.

… I haven't looked up whether GitHub actions have programmatic API to access it like that yet.

@tobiasdiez
Copy link
Contributor

Technically I think the bug isn't that rare so maybe there's a way to just grep through all the logs of this particular type.

… I haven't looked up whether GitHub actions have programmatic API to access it like that yet.

Have a look at #39100 if you would like to pursue this idea further.

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

No branches or pull requests

2 participants