New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/34030#issuecomment-1002287099 Comment: Somehow it seems `abort()` is raising a `SIGSEGV` instead of a `SIGABRT`. You can see the different behaviour doing: ``` sage: from cysignals.signals import sig_print_exception sage: import signal sage: sig_print_exception(signal.SIGABRT, "matrix allocation failed") RuntimeError: matrix allocation failed sage: sig_print_exception(signal.SIGSEGV, "matrix allocation failed") cysignals.signals.SignalError: matrix allocation failed ``` Now if I comment out the `_sig_str(...)` line in `matrix_mod2_dense.pyx` this happens: ``` sage: import resource sage: resource.setrlimit(resource.RLIMIT_AS, (4*1024^3, -1)) sage: MatrixSpace(GF(2), 2^30)(1) ------------------------------------------------------------------------ /usr/lib/sage-9.5.beta9/local/var/lib/sage/venv-python3.10/bin/cysignals-CSI:42: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.spawn import find_executable Attaching gdb to process id 1026. Cannot find gdb installed GDB is not installed. Install gdb for enhanced tracebacks. ------------------------------------------------------------------------ Unhandled SIGSEGV: A segmentation fault 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. ------------------------------------------------------------------------ ``` Looking at the backtrace (after installing `gdb` and `musl-devel`) seems to imply that `posix_memalign()` never returns, instead segfaulting, so that the `abort()` in `m4ri` code is never called: ``` Stack backtrace --------------- No locals. #1 0x00007f22c9707fc1 in __syscall_cp_c (nr=61, u=1878, v=0, w=, x=, y=, z=0) at src/thread/pthread_cancel.c:33 self = 0x7f22c9751b08 r = st = #2 0x00007f22c96edf72 in waitpid (pid=, status=status@entry=0x0, options=options@entry=0) at src/process/waitpid.c:6 No locals. #3 0x00007f22c695e774 in print_enhanced_backtrace () at build/src/cysignals/implementation.c:586 parent_pid = 1813 pid = #4 0x00007f22c695e8d9 in sigdie (sig=sig@entry=11, s=s@entry=0x7f22c69660b0 "Unhandled SIGSEGV: A segmentation fault occurred.") at build/src/cysignals/implementation.c:612 No locals. #5 0x00007f22c6961e33 in sigdie_for_sig (inside=0, sig=11) at build/src/cysignals/implementation.c:179 No locals. #6 cysigs_signal_handler (sig=11) at build/src/cysignals/implementation.c:278 inside = #7 No locals. #8 get_meta (p=0x0) at src/malloc/mallocng/meta.h:132 offset = index = base = meta = area = offset = index = base = meta = area = #9 aligned_alloc (align=64, len=8589934600) at src/malloc/mallocng/aligned_alloc.c:25 p = 0x0 g = idx = stride = start = end = adj = offset = #10 0x00007f22c96cbb7a in posix_memalign (res=0x7ffdd6f1bc70, align=, len=) at src/malloc/posix_memalign.c:7 mem = #11 0x00007f223b02ddfb in m4ri_mmc_malloc () from /lib/libm4ri-0.0.20200125.so No symbol table info available. #12 0x00007f223b015a7a in mzd_init () from /lib/libm4ri-0.0.20200125.so No symbol table info available. ... ``` ```