Opened 3 years ago
Last modified 3 months ago
#28383 new defect
Random failure in src/sage/schemes/elliptic_curves/ell_field.py
Reported by: | vbraun | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.7 |
Component: | elliptic curves | Keywords: | random_fail |
Cc: | jdemeyer, slelievre | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
File "src/sage/schemes/elliptic_curves/ell_field.py", line 988, in sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.isogenies_prime_degree Failed example: E.isogenies_prime_degree(max_l=3) Exception raised: Traceback (most recent call last): File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run self.compile_and_execute(example, compiler, test.globs) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute exec(compiled, globs) File "<doctest sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.isogenies_prime_degree[15]>", line 1, in <module> E.isogenies_prime_degree(max_l=Integer(3)) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_field.py", line 1091, in isogenies_prime_degree return sum([isogenies_prime_degree(self, d) for d in L], []) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/isogeny_small_degree.py", line 2340, in isogenies_prime_degree return isogenies_2(E, minimal_models=minimal_models) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/isogeny_small_degree.py", line 708, in isogenies_2 isogs = [E.isogeny(f, model=model) for f in ff] File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_field.py", line 878, in isogeny return EllipticCurveIsogeny(self, kernel, codomain, degree, model, check=check) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 983, in __init__ if not isinstance(kernel, list) and kernel in E : File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_generic.py", line 423, in __contains__ P = self(P) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_generic.py", line 549, in __call__ return plane_curve.ProjectivePlaneCurve.__call__(self, *args, **kwds) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/generic/scheme.py", line 266, in __call__ return self.point(args) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/projective/projective_subscheme.py", line 120, in point return self._point(self, v, check=check) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/schemes/elliptic_curves/ell_point.py", line 275, in __init__ raise TypeError("v (=%s) must have %s components" % (v, d)) File "sage/structure/sage_object.pyx", line 191, in sage.structure.sage_object.SageObject.__repr__ (build/cythonized/sage/structure/sage_object.c:2428) result = reprfunc() File "sage/rings/polynomial/polynomial_element.pyx", line 2589, in sage.rings.polynomial.polynomial_element.Polynomial._repr_ (build/cythonized/sage/rings/polynomial/polynomial_element.c:26822) return self._repr() File "sage/rings/polynomial/polynomial_element.pyx", line 2541, in sage.rings.polynomial.polynomial_element.Polynomial._repr (build/cythonized/sage/rings/polynomial/polynomial_element.c:26025) coeffs = self.list(copy=False) File "sage/rings/polynomial/polynomial_zz_pex.pyx", line 191, in sage.rings.polynomial.polynomial_zz_pex.Polynomial_ZZ_pEX.list (build/cythonized/sage/rings/polynomial/polynomial_zz_pex.cpp:15301) return [K(ZZ_pE_c_to_list(ZZ_pEX_coeff(self.x, i))) File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9197) return mor._call_(x) File "sage/structure/coerce_maps.pyx", line 162, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4556) raise File "sage/structure/coerce_maps.pyx", line 157, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (build/cythonized/sage/structure/coerce_maps.c:4448) return C._element_constructor(x) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/categories/sets_cat.py", line 994, in _element_constructor_from_element_class return self.element_class(self, *args, **keywords) File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 336, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.__init__ (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:3414) self.construct_from(x) File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 504, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.construct_from (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:5493) self.construct_from(self._parent.polynomial_ring()([Fp(y) for y in x])) File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 494, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.construct_from (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:5172) self.construct_from(x.substitute(self._parent.gen())) File "sage/rings/polynomial/polynomial_element.pyx", line 452, in sage.rings.polynomial.polynomial_element.Polynomial.subs (build/cythonized/sage/rings/polynomial/polynomial_element.c:8543) return self(*x, **kwds) File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 321, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint.__call__ (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:15655) return Polynomial.__call__(self, *x, **kwds) File "sage/rings/polynomial/polynomial_element.pyx", line 775, in sage.rings.polynomial.polynomial_element.Polynomial.__call__ (build/cythonized/sage/rings/polynomial/polynomial_element.c:9340) cst, aa = coercion_model.canonical_coercion(cst, a) File "sage/structure/coerce.pyx", line 1270, in sage.structure.coerce.CoercionModel.canonical_coercion (build/cythonized/sage/structure/coerce.c:11302) x_elt = (<Map>x_map)._call_(x) File "sage/rings/finite_rings/hom_prime_finite_field.pyx", line 95, in sage.rings.finite_rings.hom_prime_finite_field.FiniteFieldHomomorphism_prime._call_ (build/cythonized/sage/rings/finite_rings/hom_prime_finite_field.c:3590) return self._codomain._element_constructor(x) File "/home/buildbot/slave/sage_git/build/local/lib/python2.7/site-packages/sage/categories/sets_cat.py", line 994, in _element_constructor_from_element_class return self.element_class(self, *args, **keywords) File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 336, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.__init__ (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:3414) self.construct_from(x) File "sage/rings/finite_rings/element_pari_ffelt.pyx", line 410, in sage.rings.finite_rings.element_pari_ffelt.FiniteFieldElement_pari_ffelt.construct_from (build/cythonized/sage/rings/finite_rings/element_pari_ffelt.c:3985) sig_on() SystemError: calling remove_from_pari_stack() inside sig_on() ********************************************************************** 1 item had failures: 1 of 43 in sage.schemes.elliptic_curves.ell_field.EllipticCurve_field.isogenies_prime_degree [219 tests, 1 failure, 3.54 s] ---------------------------------------------------------------------- sage -t --long src/sage/schemes/elliptic_curves/ell_field.py # 1 doctest failed ----------------------------------------------------------------------
Change History (9)
comment:1 Changed 3 years ago by
- Milestone changed from sage-8.9 to sage-9.1
comment:2 Changed 2 years ago by
- Milestone changed from sage-9.1 to sage-9.2
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.
comment:3 Changed 22 months ago by
- Milestone changed from sage-9.2 to sage-9.3
comment:4 Changed 17 months ago by
- Cc slelievre added
- Component changed from PLEASE CHANGE to elliptic curves
comment:5 Changed 17 months ago by
I am not sure how to debug this at the Sage level. The test asks for all isogenies of the curve E of degree up to 3, and the error is raised when computing 2-isogenies, of which there are three. These are computed by constructing a EllipticCurveIsogeny? object using EllipticCurveIsogeny?(E, ker) where ker is a degree 1 polynomial of the form x-x0 over the base field. Since ker is a polynomial it should the 'kohel' algorithm, but the test in line 982 of ell_curve_isogeny tests whether ker is a point using "kernel in E", which attempts to construct a point via E(ker), and that is causing the error. There should be a better way to determine whether the caller has provided a point of E generating the kernel, and not a polynomial.
The file ell_curve_isogeny is over 4000 lines long, mostly not written by me but I have spent many hours in it debugging (though not recently). I would have written it *very* differently.
I can try replacing the test "kernel in E" with something like
sage: from sage.schemes.elliptic_curves.ell_point import EllipticCurvePoint_field sage: isinstance(P, EllipticCurvePoint_field) and P.curve() is E
but how to test whether the sporadic error has gone away?
comment:6 Changed 15 months ago by
- Milestone changed from sage-9.3 to sage-9.4
Moving to 9.4, as 9.3 has been released.
comment:7 Changed 12 months ago by
- Milestone changed from sage-9.4 to sage-9.5
comment:8 Changed 8 months ago by
- Milestone changed from sage-9.5 to sage-9.6
comment:9 Changed 3 months ago by
- Milestone changed from sage-9.6 to sage-9.7
Ticket retargeted after milestone closed