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

Random failure in schemes/elliptic_curves/padics.py #33003

Open
collares opened this issue Dec 9, 2021 · 4 comments
Open

Random failure in schemes/elliptic_curves/padics.py #33003

collares opened this issue Dec 9, 2021 · 4 comments

Comments

@collares
Copy link
Contributor

collares commented Dec 9, 2021

This is on Sage 9.4. I've seen it happen on amd64 and on aarch64.

File "/nix/store/qc5r48v197p8s6zdwvajbvj8nq23bylz-sage-src-9.4/src/sage/schemes/elliptic_curves/padics.py", line 1237, in sage.schemes.elliptic_curves.padics.padic_sigma_truncated
Failed example:
    for N in range(2, 10):                                        # long time
       for lamb in range(10):                                     # long time
          correct = E.padic_sigma(5, N + 3*lamb, E2=E2)           # long time
          compare = E.padic_sigma_truncated(5, N=N, lamb=lamb, E2=E2)    # long time
          assert compare == correct                               # long time
Exception raised:
    Traceback (most recent call last):
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/doctest/forker.py", line 718, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/doctest/forker.py", line 1145, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.elliptic_curves.padics.padic_sigma_truncated[5]>", line 3, in <module>
        correct = E.padic_sigma(Integer(5), N + Integer(3)*lamb, E2=E2)           # long time
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/schemes/elliptic_curves/padics.py", line 1099, in padic_sigma
        f = X.formal_group().differential(N+2)   # f = 1 + ... + O(t^{N+2})
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/schemes/elliptic_curves/formal_group.py", line 376, in differential
        x = self.x(prec+1)
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/schemes/elliptic_curves/formal_group.py", line 271, in x
        return -t*y + O(t**prec)
      File "sage/structure/element.pyx", line 1229, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:10971)
        return (<Element>left)._add_(right)
      File "sage/rings/laurent_series_ring_element.pyx", line 753, in sage.rings.laurent_series_ring_element.LaurentSeries._add_ (build/cythonized/sage/rings/laurent_series_ring_element.c:9730)
        return self.add_bigoh(right.prec())
      File "sage/rings/laurent_series_ring_element.pyx", line 843, in sage.rings.laurent_series_ring_element.LaurentSeries.add_bigoh (build/cythonized/sage/rings/laurent_series_ring_element.c:10815)
        u = self.__u.add_bigoh(prec - self.__n)
      File "sage/rings/power_series_ring_element.pyx", line 844, in sage.rings.power_series_ring_element.PowerSeries.add_bigoh (build/cythonized/sage/rings/power_series_ring_element.c:9580)
        return self._parent(v, prec)
      File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9378)
        return mor._call_with_args(x, args, kwds)
      File "sage/structure/coerce_maps.pyx", line 180, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5168)
        raise
      File "sage/structure/coerce_maps.pyx", line 173, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5008)
        return C._element_constructor(x, *args)
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/rings/power_series_ring.py", line 823, in _element_constructor_
        return self.element_class(self, f, prec, check=check)
      File "sage/rings/power_series_poly.pyx", line 67, in sage.rings.power_series_poly.PowerSeries_poly.__init__ (build/cythonized/sage/rings/power_series_poly.c:4205)
        f = R(f, check=check)
      File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9378)
        return mor._call_with_args(x, args, kwds)
      File "sage/structure/coerce_maps.pyx", line 180, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5168)
        raise
      File "sage/structure/coerce_maps.pyx", line 170, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:4958)
        return C._element_constructor(x, **kwds)
      File "/nix/store/d313hckrc753rlc1n03jmi0zalbd7nav-python3-3.9.6-env/lib/python3.9/site-packages/sage/rings/polynomial/polynomial_ring.py", line 418, in _element_constructor_
        return C(self, x, check=check, is_gen=False, construct=construct)
      File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 115, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint.__init__ (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:14073)
        self._set_list(lst)
      File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 211, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint._set_list (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:15131)
        sig_on()
    SystemError: calling remove_from_pari_stack() inside sig_on()
**********************************************************************
1 item had failures:
   1 of   7 in sage.schemes.elliptic_curves.padics.padic_sigma_truncated
    [202 tests, 1 failure, 36.85 s]

CC: @roed314

Component: elliptic curves

Keywords: random_fail

Issue created by migration from https://trac.sagemath.org/ticket/33003

@collares collares added this to the sage-9.5 milestone Dec 9, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@collares

This comment has been minimized.

@collares
Copy link
Contributor Author

comment:3

This could have to do with the fact that NixOS uses cysignals 1.11.1.

@vbraun
Copy link
Member

vbraun commented Feb 20, 2022

comment:4

I'm seeing this too, randomly (rarely) wrong values are produced. Here is a traceback that shows the actual values:

**********************************************************************
File "src/sage/schemes/elliptic_curves/padics.py", line 648, in sage.schemes.elliptic_curves.padics.padic_height
Failed example:
    h = E.padic_height(53, 10)
Exception raised:
    Traceback (most recent call last):
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.schemes.elliptic_curves.padics.padic_height[4]>", line 1, in <module>
        h = E.padic_height(Integer(53), Integer(10))
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/schemes/elliptic_curves/padics.py", line 750, in padic_height
        sigma = self.padic_sigma(p, adjusted_prec, check_hypotheses=False)
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/schemes/elliptic_curves/padics.py", line 1099, in padic_sigma
        f = X.formal_group().differential(N+2)   # f = 1 + ... + O(t^{N+2})
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/schemes/elliptic_curves/formal_group.py", line 376, in differential
        x = self.x(prec+1)
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/schemes/elliptic_curves/formal_group.py", line 271, in x
        return -t*y + O(t**prec)
      File "sage/structure/element.pyx", line 1230, in sage.structure.element.Element.__add__ (build/cythonized/sage/structure/element.c:11069)
        return (<Element>left)._add_(right)
      File "sage/rings/laurent_series_ring_element.pyx", line 753, in sage.rings.laurent_series_ring_element.LaurentSeries._add_ (build/cythonized/sage/rings/laurent_series_ring_element.c:9824)
        return self.add_bigoh(right.prec())
      File "sage/rings/laurent_series_ring_element.pyx", line 843, in sage.rings.laurent_series_ring_element.LaurentSeries.add_bigoh (build/cythonized/sage/rings/laurent_series_ring_element.c:10909)
        u = self.__u.add_bigoh(prec - self.__n)
      File "sage/rings/power_series_ring_element.pyx", line 844, in sage.rings.power_series_ring_element.PowerSeries.add_bigoh (build/cythonized/sage/rings/power_series_ring_element.c:9671)
        return self._parent(v, prec)
      File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9478)
        return mor._call_with_args(x, args, kwds)
      File "sage/structure/coerce_maps.pyx", line 180, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5259)
        raise
      File "sage/structure/coerce_maps.pyx", line 173, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5099)
        return C._element_constructor(x, *args)
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/power_series_ring.py", line 822, in _element_constructor_
        return self.element_class(self, f, prec, check=check)
      File "sage/rings/power_series_poly.pyx", line 67, in sage.rings.power_series_poly.PowerSeries_poly.__init__ (build/cythonized/sage/rings/power_series_poly.c:4296)
        f = R(f, check=check)
      File "sage/structure/parent.pyx", line 900, in sage.structure.parent.Parent.__call__ (build/cythonized/sage/structure/parent.c:9478)
        return mor._call_with_args(x, args, kwds)
      File "sage/structure/coerce_maps.pyx", line 180, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5259)
        raise
      File "sage/structure/coerce_maps.pyx", line 170, in sage.structure.coerce_maps.DefaultConvertMap_unique._call_with_args (build/cythonized/sage/structure/coerce_maps.c:5049)
        return C._element_constructor(x, **kwds)
      File "/var/lib/buildbot/slave/sage_git/build/local/var/lib/sage/venv-python3.9.9/lib/python3.9/site-packages/sage/rings/polynomial/polynomial_ring.py", line 416, in _element_constructor_
        return C(self, x, check=check, is_gen=False, construct=construct)
      File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 115, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint.__init__ (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:14166)
        self._set_list(lst)
      File "sage/rings/polynomial/polynomial_zmod_flint.pyx", line 211, in sage.rings.polynomial.polynomial_zmod_flint.Polynomial_zmod_flint._set_list (build/cythonized/sage/rings/polynomial/polynomial_zmod_flint.cpp:15224)
        sig_on()
    SystemError: calling remove_from_pari_stack() inside sig_on()
**********************************************************************
File "src/sage/schemes/elliptic_curves/padics.py", line 649, in sage.schemes.elliptic_curves.padics.padic_height
Failed example:
    h(P)
Expected:
    26*53^-1 + 30 + 20*53 + 47*53^2 + 10*53^3 + 32*53^4 + 9*53^5 + 22*53^6 + 35*53^7 + 30*53^8 + 17*53^9 + O(53^10)
Got:
    5 + 5^2 + 5^3 + 3*5^6 + 4*5^7 + 5^9 + O(5^10)
**********************************************************************
1 item had failures:
   2 of  36 in sage.schemes.elliptic_curves.padics.padic_height
    [202 tests, 2 failures, 10.19 s]
----------------------------------------------------------------------

Note: We now use cysignals 1.11.2

@vbraun
Copy link
Member

vbraun commented Feb 20, 2022

Changed keywords from none to random_fail

@mkoeppe mkoeppe modified the milestones: sage-9.6, sage-9.7 May 3, 2022
@mkoeppe mkoeppe modified the milestones: sage-9.7, sage-9.8 Sep 19, 2022
@mkoeppe mkoeppe removed this from the sage-9.8 milestone Jan 29, 2023
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