Repository navigation
Open
Description
This is in a Prefix and it causes the failure
sage -t --long --random-seed=0 usr/lib/python3.9/site-packages/sage/rings/number_field/totallyreal.pyx # Timed out (and interrupt failed)
The failing line in totallyreal.pyx is line 221
sage: len(enumerate_totallyreal_fields_prim(2,10**4))
3043
Using gdb I see
$ sage -gdb
...
sage: len(enumerate_totallyreal_fields_prim(2,10**4))
[Thread 0x7fff937f6640 (LWP 7603) exited]
Thread 1 "python3.9" received signal SIGSEGV, Segmentation fault.
0x00007ffff7ca8b86 in _Py_Dealloc (op=<error reading variable: Cannot access memory at address 0x7fffff7feff8>) at Objects/object.c:2204
2204 Objects/object.c: No such file or directory.
(gdb) bt
#0 0x00007ffff7ca8b86 in _Py_Dealloc (op=<error reading variable: Cannot access memory at address 0x7fffff7feff8>) at Objects/object.c:2204
#1 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328540>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#2 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328540>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#3 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328630) at cypari2/stack.c:2037
#4 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328630) at cypari2/gen.c:165526
#5 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328630>) at cypari2/gen.c:165496
#6 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328630>) at cypari2/gen.c:190414
#7 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328630>) at Objects/object.c:2209
#8 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328630>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#9 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328630>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#10 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328680) at cypari2/stack.c:2037
#11 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328680) at cypari2/gen.c:165526
#12 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328680>) at cypari2/gen.c:165496
#13 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328680>) at cypari2/gen.c:190414
#14 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328680>) at Objects/object.c:2209
#15 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328680>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#16 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328680>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#17 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a3286d0) at cypari2/stack.c:2037
#18 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a3286d0) at cypari2/gen.c:165526
#19 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a3286d0>) at cypari2/gen.c:165496
#20 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a3286d0>) at cypari2/gen.c:190414
#21 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a3286d0>) at Objects/object.c:2209
#22 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3286d0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#23 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3286d0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#24 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328770) at cypari2/stack.c:2037
#25 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328770) at cypari2/gen.c:165526
#26 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328770>) at cypari2/gen.c:165496
#27 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328770>) at cypari2/gen.c:190414
#28 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328770>) at Objects/object.c:2209
#29 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328770>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#30 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328770>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#31 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328720) at cypari2/stack.c:2037
#32 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328720) at cypari2/gen.c:165526
#33 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328720>) at cypari2/gen.c:165496
#34 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328720>) at cypari2/gen.c:190414
#35 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328720>) at Objects/object.c:2209
#36 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328720>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#37 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328720>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#38 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a3287c0) at cypari2/stack.c:2037
#39 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a3287c0) at cypari2/gen.c:165526
#40 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a3287c0>) at cypari2/gen.c:165496
#41 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a3287c0>) at cypari2/gen.c:190414
#42 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a3287c0>) at Objects/object.c:2209
#43 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3287c0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#44 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3287c0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#45 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328860) at cypari2/stack.c:2037
#46 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328860) at cypari2/gen.c:165526
#47 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328860>) at cypari2/gen.c:165496
#48 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328860>) at cypari2/gen.c:190414
#49 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328860>) at Objects/object.c:2209
#50 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328860>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#51 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328860>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#52 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a3288b0) at cypari2/stack.c:2037
#53 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a3288b0) at cypari2/gen.c:165526
#54 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a3288b0>) at cypari2/gen.c:165496
#55 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a3288b0>) at cypari2/gen.c:190414
#56 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a3288b0>) at Objects/object.c:2209
#57 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3288b0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#58 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a3288b0>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#59 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328810) at cypari2/stack.c:2037
#60 0x00007fff8a8f1965 in __pyx_pf_7cypari2_3gen_3Gen_2__dealloc__ (__pyx_v_self=0x7ffb8a328810) at cypari2/gen.c:165526
#61 0x00007fff8a8f1918 in __pyx_pw_7cypari2_3gen_3Gen_3__dealloc__ (__pyx_v_self=<cypari2.gen.Gen at remote 0x7ffb8a328810>) at cypari2/gen.c:165496
#62 0x00007fff8a91cd27 in __pyx_tp_dealloc_7cypari2_3gen_Gen (o=<cypari2.gen.Gen at remote 0x7ffb8a328810>) at cypari2/gen.c:190414
#63 0x00007ffff7ca8ba7 in _Py_Dealloc (op=<cypari2.gen.Gen at remote 0x7ffb8a328810>) at Objects/object.c:2209
#64 0x00007fffec1f68bc in _Py_DECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328810>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:430
#65 0x00007fffec1f6900 in _Py_XDECREF (op=<cypari2.gen.Gen at remote 0x7ffb8a328810>) at /storage/strogdon/gentoo-rap/usr/include/python3.9/object.h:497
#66 0x00007fffec1f80e4 in __pyx_f_7cypari2_5stack_remove_from_pari_stack (__pyx_v_self=0x7ffb8a328900) at cypari2/stack.c:2037
...
Building cypari2 with CFLAGS="-march=native -O2 -pipe" does not produce the SIGSEGV and the totallyreal.pyx doctest passes.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]cypari built with CFLAGS="-march=native -O0 -pipe -g -ggdb" causes a SIGSEGV[/-][+]cypari2 built with CFLAGS="-march=native -O0 -pipe -g -ggdb" causes a SIGSEGV[/+]kiwifb commentedon Oct 4, 2021
What about
CFLAGS="-march=native -O2 -pipe -g -ggdb"? Of course that's not a recommended flag combination, but I want to know if the trigger is the debugging option or the optimisation.strogdon commentedon Oct 4, 2021
Changing just
O0toO2gives no SIGSEGV. So, it appears to be optimization.strogdon commentedon Oct 6, 2021
When I, from sage do
things look correct. However, when I exit sage there is a backtrace that hangs unless I interrupt things from the keyboard. So, I'm not sure if the issue is with
cypari2or with howenumerate_totallyreal_fields_primusescypari2.strogdon commentedon Oct 10, 2021
cypari2uses thedistutils-r1eclass, which I find a bit mystifying and almostblack boxish. Is there a way to get output so that one sees exactly what is being done? For example, with vanilla sage which usespipto installcypari2I see things like:Nothing like this is present in building
cypari2using the eclass. Is this by design or is there a way to have such things echoed to the terminal and recorded in abuild.logfile?kiwifb commentedon Oct 10, 2021
I think
pipis a black box :) I patchedcypari2because it was doing weird things between compile and install (that I would think upstream wouldn't care). I guess it may look out of order compared topipbut things should echo.strogdon commentedon Oct 10, 2021
This all I see here. Perhaps a Prefix thing?
strogdon commentedon Oct 10, 2021
I made too many assumptions. Echoed output is different between Prefix and Gentoo. Gentoo looks fine. I have the debugging enabled on the Prefix
kiwifb commentedon Oct 10, 2021
I would consider that a bug. May be worth asking on the gentoo prefix mailing list.
strogdon commentedon Oct 14, 2021
Bug report appears at https://bugs.gentoo.org/818043. The issue seems to occur whenever a
build_extis run.