Opened 4 months ago
Last modified 3 weeks ago
#33230 new defect
Random test failure in sage.rings.integer
Reported by: | mjo | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.7 |
Component: | build | Keywords: | |
Cc: | gh-kliem | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
I've been trying to track this down for some time without luck. The important ingredients seem to be,
- compiling with
-O0
inCFLAGS
andCPPFLAGS
. - running the tests with
-p2
- the random seed
but even then it's not always reproducible (so I can't really be sure how critical the ingredients above are). This is on an unmodified 9.5.rc3.
$ sage -t -p2 --long --warn-long 0.0 --random-seed=317330528558743225605191137282347178703 src/sage/rings/integer.pyx Running doctests with ID 2022-01-25-11-12-37-a8e85da5. Git branch: develop Using --optional=build,gentoo,pip,sage,sage_spkg Features to be detected: 4ti2,benzene,bliss,buckygen,conway_polynomials,csdp,database_cremona_ellcurve,database_cremona_mini_ellcurve,database_jones_numfield,database_knotinfo,dvipng,ffmpeg,graphviz,imagemagick,jupymake,kenzo,latte_int,lrslib,mcqd,meataxe,pandoc,pdf2svg,plantri,pynormaliz,rubiks,sage.combinat,sage.geometry.polyhedron,sage.graphs,sage.plot,sage.rings.number_field,sage.rings.real_double,sage.symbolic,sage_numerical_backends_coin,sagemath_doc_html,sphinx,tdlib Doctesting 1 file using 2 threads. sage -t --long --warn-long 0.0 --random-seed=317330528558743225605191137282347178703 src/sage/rings/integer.pyx ********************************************************************** File "src/sage/rings/integer.pyx", line 3006, in sage.rings.integer.Integer.divisors Failed example: for i in range(20): # long time try: alarm(RDF.random_element(1e-3, 0.5)) _ = n.divisors() cancel_alarm() # we never get here except AlarmInterrupt: pass Exception raised: Traceback (most recent call last): File "<doctest sage.rings.integer.Integer.divisors[20]>", line 4, in <module> _ = n.divisors() File "sage/rings/integer.pyx", line 3093, in sage.rings.integer.Integer.divisors (build/cythonized/sage/rings/integer.c:20167) for p, e in f: File "/home/mjo/src/sage.git/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/structure/factorization.py", line 319, in __getitem__ def __getitem__(self, i): File "src/cysignals/signals.pyx", line 310, in cysignals.signals.python_check_interrupt cysignals.signals.AlarmInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/mjo/src/sage.git/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 694, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/mjo/src/sage.git/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute exec(compiled, globs) File "<doctest sage.rings.integer.Integer.divisors[20]>", line 4, in <module> _ = n.divisors() File "src/cysignals/signals.pyx", line 310, in cysignals.signals.python_check_interrupt cysignals.signals.AlarmInterrupt ^CKilling test src/sage/rings/integer.pyx ---------------------------------------------------------------------- Doctests interrupted: 0/1 files tested ---------------------------------------------------------------------- Total time for all tests: 77.8 seconds cpu time: 0.0 seconds cumulative wall time: 0.0 seconds Features detected for doctesting: Pytest is not installed, skip checking tests that rely on it.
Also note that the doctest is trying to catch the very exception that kills it.
Change History (3)
comment:1 Changed 4 months ago by
comment:2 Changed 4 months ago by
This might not be entirely related, but I have just seen the same test fail with another error on a patchbot:
sage -t --long --random-seed=249317294624714313432109516979551245556 src/sage/rings/integer.pyx ********************************************************************** File "src/sage/rings/integer.pyx", line 3006, in sage.rings.integer.Integer.divisors Failed example: for i in range(20): # long time try: alarm(RDF.random_element(1e-3, 0.5)) _ = n.divisors() cancel_alarm() # we never get here except AlarmInterrupt: pass Exception raised: Traceback (most recent call last): File "/home/debian/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/debian/sage/local/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute exec(compiled, globs) File "<doctest sage.rings.integer.Integer.divisors[20]>", line 4, in <module> _ = n.divisors() File "sage/rings/integer.pyx", line 3108, in sage.rings.integer.Integer.divisors (build/cythonized/sage/rings/integer.c:20364) sig_on() SystemError: calling remove_from_pari_stack() inside sig_on()
comment:3 Changed 3 weeks ago by
- Milestone changed from sage-9.6 to sage-9.7
Note: See
TracTickets for help on using
tickets.
Evidence of it randomly pass/failing, if you're into that sort of thing. Nothing happened between these commands. I just hit up and enter: