Skip to content

Random segfault in two_descent_by_two_isogeny #36949

@mkoeppe

Description

@mkoeppe

seen in the Conda CI on macOS https://github.com/sagemath/sage/actions/runs/7292520159/job/19873683012?pr=36938#step:11:8303

sage -t --random-seed=286371755053755923293623875053116362741 src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx
    Killed due to illegal instruction
**********************************************************************
Tests run before process (pid=31310) failed:
sage: from sage.schemes.elliptic_curves.descent_two_isogeny import test_valuation as tv ## line 59 ##
sage: for i in [1..20]:
    print('{:>10} {} {} {}'.format(str(factor(i)), tv(i,2), tv(i,3), tv(i,5))) ## line 60 ##
         1 0 0 0
         2 1 0 0
         3 0 1 0
       2^2 2 0 0
         5 0 0 1
     2 * 3 1 1 0
         7 0 0 0
       2^3 3 0 0
       3^2 0 2 0
     2 * 5 1 0 1
        11 0 0 0
   2^2 * 3 2 1 0
        13 0 0 0
     2 * 7 1 0 0
     3 * 5 0 1 1
       2^4 4 0 0
        17 0 0 0
   2 * 3^2 1 2 0
        19 0 0 0
   2^2 * 5 2 0 1
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 82 ##
0
sage: from sage.schemes.elliptic_curves.descent_two_isogeny import test_padic_square as ps ## line 121 ##
sage: for i in [1..300]:
    for p in prime_range(100):
         if Qp(p)(i).is_square() != bool(ps(i,p)):
             print(i, p) ## line 122 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 126 ##
0
sage: from sage.schemes.elliptic_curves.descent_two_isogeny import test_qpls as tq ## line 918 ##
sage: tq(1,2,3,4,5,7) ## line 919 ##
1
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 921 ##
0
sage: from sage.schemes.elliptic_curves.descent_two_isogeny import test_els ## line 994 ##
sage: for _ in range(1000):
    a,b,c,d,e = randint(1,1000), randint(1,1000), randint(1,1000), randint(1,1000), randint(1,1000)
    if pari.Pol([a,b,c,d,e]).hyperellratpoints(1000, 1):
        try:
            if not test_els(a,b,c,d,e):
                print("This never happened", a, b, c, d, e)
        except ValueError:
            continue ## line 995 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 1003 ##
0
sage: from sage.schemes.elliptic_curves.descent_two_isogeny import two_descent_by_two_isogeny ## line 1145 ##
sage: E = EllipticCurve('14a') ## line 1146 ##
sage: n1, n2, n1_prime, n2_prime = two_descent_by_two_isogeny(E) ## line 1147 ##
sage: log(n1,2) + log(n1_prime,2) - 2 # the rank ## line 1148 ##
0
sage: E = EllipticCurve('65a') ## line 1150 ##
sage: n1, n2, n1_prime, n2_prime = two_descent_by_two_isogeny(E) ## line 1151 ##
sage: log(n1,2) + log(n1_prime,2) - 2 # the rank ## line 1152 ##
1
sage: x,y = var('x,y') ## line 1156 ##
sage: E = EllipticCurve(y^2 == x^3 + x^2 - 25*x + 39) ## line 1157 ##
sage: n1, n2, n1_prime, n2_prime = two_descent_by_two_isogeny(E) ## line 1158 ##
------------------------------------------------------------------------
0   signals.cpython-310-darwin.so       0x0000000109906fda print_backtrace + 58
1   signals.cpython-310-darwin.so       0x000000010990a373 sigdie + 67
2   signals.cpython-310-darwin.so       0x000000010990a173 cysigs_signal_handler + 259
3   libsystem_platform.dylib            0x00007ff8177a7dfd _sigtramp + 29
4   python3.10                          0x0000000108b86a30 _Py_TrueStruct + 0
5   libsystem_malloc.dylib              0x00007ff8175ae2ec rack_region_insert + 52
6   libsystem_malloc.dylib              0x00007ff8175aec62 tiny_malloc_should_clear + 1204
7   libsystem_malloc.dylib              0x00007ff8175ad7d2 szone_malloc_should_clear + 66
8   libsystem_malloc.dylib              0x00007ff8175c8abb _malloc_zone_malloc + 125
9   python3.10                          0x0000000108904fbf _PyObject_Malloc + 1631
10  python3.10                          0x000000010891f43c PyType_GenericAlloc + 124
11  python3.10                          0x000000010891c87e type_new + 334
12  python3.10                          0x000000010891b7a5 type_call + 69
13  python3.10                          0x00000001089db3a3 call_function + 611
14  python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
15  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
16  cachefunc.cpython-310-darwin.so     0x000000010983a46b __pyx_pw_4sage_4misc_9cachefunc_14CachedFunction_15__call__ + 1595
17  python3.10                          0x00000001089db3a3 call_function + 611
18  python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
19  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
20  python3.10                          0x000000010889703c PyVectorcall_Call + 156
21  parent.cpython-310-darwin.so        0x00000001099c4989 __pyx_pw_4sage_9structure_6parent_6Parent_5_init_category_ + 1161
22  python3.10                          0x00000001088f6f31 cfunction_vectorcall_FASTCALL_KEYWORDS + 97
23  category_object.cpython-310-darwin. 0x00000001097a4ea4 __pyx_pw_4sage_9structure_15category_object_14CategoryObject_1__init__ + 692
24  python3.10                          0x000000010892753c wrap_init + 12
25  python3.10                          0x00000001088a4f95 wrapperdescr_call + 597
26  python3.10                          0x00000001088966f8 _PyObject_MakeTpCall + 312
27  parent.cpython-310-darwin.so        0x00000001099bffa1 __pyx_pw_4sage_9structure_6parent_6Parent_3__init__ + 2449
28  python3.10                          0x000000010892753c wrap_init + 12
29  python3.10                          0x00000001088a4f95 wrapperdescr_call + 597
30  python3.10                          0x00000001089db3a3 call_function + 611
31  python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
32  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
33  python3.10                          0x00000001089db1f3 call_function + 179
34  python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
35  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
36  python3.10                          0x00000001089db1f3 call_function + 179
37  python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
38  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
39  python3.10                          0x000000010892707c slot_tp_init + 556
40  python3.10                          0x000000010891b86b type_call + 267
41  python3.10                          0x00000001089b907a _PyEval_EvalFrameDefault + 46650
42  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
43  python3.10                          0x000000010889c6c7 method_vectorcall + 151
44  python3.10                          0x00000001089bd30d _PyEval_EvalFrameDefault + 63693
45  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
46  python3.10                          0x000000010889c6c7 method_vectorcall + 151
47  python3.10                          0x000000010889703c PyVectorcall_Call + 156
48  factory.cpython-310-darwin.so       0x00000001113045cd __pyx_f_4sage_9structure_7factory_13UniqueFactory_get_object + 2317
49  factory.cpython-310-darwin.so       0x0000000111307939 __pyx_pw_4sage_9structure_7factory_13UniqueFactory_5__call__ + 409
50  python3.10                          0x00000001089db3a3 call_function + 611
51  python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
52  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
53  cachefunc.cpython-310-darwin.so     0x0000000109848a35 __pyx_pw_4sage_4misc_9cachefunc_18CachedMethodCaller_5_instance_call + 197
54  python3.10                          0x00000001088f6298 cfunction_call + 56
55  cachefunc.cpython-310-darwin.so     0x0000000109846761 __pyx_pw_4sage_4misc_9cachefunc_18CachedMethodCaller_7__call__ + 2897
56  python3.10                          0x00000001089bf2bf _PyEval_EvalFrameDefault + 71807
57  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
58  python3.10                          0x000000010889c6c7 method_vectorcall + 151
59  python3.10                          0x00000001089b8ce9 _PyEval_EvalFrameDefault + 45737
60  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
61  python3.10                          0x00000001089b7ba0 _PyEval_EvalFrameDefault + 41312
62  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
63  python3.10                          0x00000001088998d9 _PyObject_Call_Prepend + 185
64  python3.10                          0x0000000108924daa slot_tp_call + 202
65  python3.10                          0x00000001089bf2bf _PyEval_EvalFrameDefault + 71807
66  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
67  python3.10                          0x00000001089db1f3 call_function + 179
68  python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
69  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
70  python3.10                          0x0000000108926fb1 slot_tp_init + 353
71  python3.10                          0x000000010891b86b type_call + 267
72  python3.10                          0x00000001089bf2bf _PyEval_EvalFrameDefault + 71807
73  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
74  python3.10                          0x000000010889c6c7 method_vectorcall + 151
75  python3.10                          0x00000001089b8ce9 _PyEval_EvalFrameDefault + 45737
76  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
77  descent_two_isogeny.cpython-310-dar 0x000000016dbdd144 __pyx_pw_4sage_7schemes_15elliptic_curves_19descent_two_isogeny_9two_descent_by_two_isogeny + 4580
78  python3.10                          0x00000001088f6f31 cfunction_vectorcall_FASTCALL_KEYWORDS + 97
79  python3.10                          0x00000001089db1f3 call_function + 179
80  python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
81  python3.10                          0x00000001089abc00 _PyEval_Vector + 544
82  python3.10                          0x00000001089a6903 builtin_exec + 339
83  python3.10                          0x00000001088f6fc7 cfunction_vectorcall_FASTCALL + 103
84  python3.10                          0x00000001089db1f3 call_function + 179
85  python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
86  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
87  python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
88  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
89  python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
90  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
91  python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
92  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
93  python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
94  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
95  python3.10                          0x000000010889996e _PyObject_Call_Prepend + 334
96  python3.10                          0x0000000108924daa slot_tp_call + 202
97  python3.10                          0x00000001089db3a3 call_function + 611
98  python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
99  python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
100 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
101 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
102 python3.10                          0x000000010889c6c7 method_vectorcall + 151
103 python3.10                          0x00000001089db1f3 call_function + 179
104 python3.10                          0x00000001089b66df _PyEval_EvalFrameDefault + 35999
105 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
106 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
107 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
108 python3.10                          0x0000000108926fb1 slot_tp_init + 353
109 python3.10                          0x000000010891b86b type_call + 267
110 python3.10                          0x00000001089db3a3 call_function + 611
111 python3.10                          0x00000001089b663e _PyEval_EvalFrameDefault + 35838
112 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
113 python3.10                          0x00000001089b8ce9 _PyEval_EvalFrameDefault + 45737
114 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
115 python3.10                          0x00000001089b8ce9 _PyEval_EvalFrameDefault + 45737
116 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
117 python3.10                          0x000000010889c6c7 method_vectorcall + 151
118 python3.10                          0x00000001089b8ce9 _PyEval_EvalFrameDefault + 45737
119 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
120 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
121 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
122 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
123 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
124 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
125 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
126 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
127 python3.10                          0x0000000108897b50 _PyFunction_Vectorcall + 560
128 python3.10                          0x00000001089b65e2 _PyEval_EvalFrameDefault + 35746
129 python3.10                          0x00000001089abc00 _PyEval_Vector + 544
130 python3.10                          0x0000000108a30b70 run_mod + 240
131 python3.10                          0x0000000108a30935 pyrun_file + 133
132 python3.10                          0x0000000108a3043f _PyRun_SimpleFileObject + 319
133 python3.10                          0x0000000108a2fdbf _PyRun_AnyFileObject + 143
134 python3.10                          0x0000000108a55478 pymain_run_file_obj + 216
135 python3.10                          0x0000000108a54f05 pymain_run_file + 85
136 python3.10                          0x0000000108a54648 pymain_run_python + 376
137 python3.10                          0x0000000108a54485 Py_RunMain + 37
138 python3.10                          0x0000000108[8337](https://github.com/sagemath/sage/actions/runs/7292520159/job/19873683012?pr=36938#step:11:8338)08 main + 56
139 dyld                                0x000000010d22452e start + 462
------------------------------------------------------------------------
Unhandled SIGILL: An illegal instruction occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

**********************************************************************

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions