Skip to content

Instantly share code, notes, and snippets.

@edgarcosta
Created June 10, 2021 20:57
Show Gist options
  • Save edgarcosta/55870bd5df1ac2f326931a2068a9c775 to your computer and use it in GitHub Desktop.
Save edgarcosta/55870bd5df1ac2f326931a2068a9c775 to your computer and use it in GitHub Desktop.
sudo sage -gdb
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin19.6.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...
(No debugging symbols found in python)
Traceback (most recent call last):
File "<string>", line 11, in <module>
ModuleNotFoundError: No module named 'Cython'
/tmp/tmplt3b693b:19: Error in sourced command file:
Error while executing Python code.
[New Thread 0x2503 of process 11786]
[New Thread 0x2303 of process 11786]
warning: unhandled dyld version (16)
[New Thread 0x1d03 of process 11786]
--Type <RET> for more, q to quit, c to continue without paging--
Thread 3 received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x1d03 of process 11786]
0x000000010000e000 in ?? ()
(gdb) c
Continuing.
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 9.3, Release Date: 2021-05-09 │
│ Using Python 3.9.5. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
[New Thread 0x250f of process 11786]
sage: import cypari2
....: pari = cypari2.Pari()
....: pari.issquarefree(15)
....:
....: from concurrent.futures import ThreadPoolExecutor
....: with ThreadPoolExecutor() as e:
....: j = e.submit(pari.issquarefree, 15)
....:
....: j.result()
1
[New Thread 0x230f of process 11786]
Thread 5 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x230f of process 11786]
0x000000053d512090 in ?? ()
(gdb) c
Continuing.
---------------------------------------------------------------------------
SignalError Traceback (most recent call last)
<ipython-input-1-70014784c72d> in <module>
7 j = e.submit(pari.issquarefree, Integer(15))
8
----> 9 j.result()
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py in result(self, timeout)
436 raise CancelledError()
437 elif self._state == FINISHED:
--> 438 return self.__get_result()
439
440 self._condition.wait(timeout)
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py in __get_result(self)
388 if self._exception:
389 try:
--> 390 raise self._exception
391 finally:
392 # Break a reference cycle with the exception in self._exception
/usr/local/Cellar/python@3.9/3.9.5/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/thread.py in run(self)
50
51 try:
---> 52 result = self.fn(*self.args, **self.kwargs)
53 except BaseException as exc:
54 self.future.set_exception(exc)
cypari2/auto_instance.pxi in cypari2.pari_instance.Pari_auto.issquarefree()
cypari2/gen.pyx in cypari2.gen.objtogen()
/Applications/sage-dev/local/lib/python3.9/site-packages/sage/rings/integer.pyx in sage.rings.integer.Integer.__pari__ (build/cythonized/sage/rings/integer.c:37806)()
6000 return self.__pari__().issquarefree()
6001
-> 6002 cpdef __pari__(self):
6003 """
6004 Returns the PARI version of this integer.
/Applications/sage-dev/local/lib/python3.9/site-packages/sage/rings/integer.pyx in sage.rings.integer.Integer.__pari__ (build/cythonized/sage/rings/integer.c:37755)()
6020
6021 """
-> 6022 return new_gen_from_mpz_t(self.value)
6023
6024 def _interface_init_(self, I=None):
/Applications/sage-dev/local/lib/python3.9/site-packages/sage/libs/pari/convert_gmp.pyx in sage.libs.pari.convert_gmp.new_gen_from_mpz_t (build/cythonized/sage/libs/pari/convert_gmp.c:1298)()
50 True
51 """
---> 52 sig_on()
53 return new_gen(_new_GEN_from_mpz_t(value))
54
SignalError: Segmentation fault
sage:
Exiting Sage (CPU time 0m0.39s, Wall time 0m15.35s).
[Inferior 1 (process 11786) exited normally]
(gdb) bt
No stack.
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment