"SignalError: Illegal instruction" on calling .right_kernel() [closed]
UPDATE. I see the same problem in both Sage 9.3 and Sage 9.4 (but not in Sage 9.2), the screenlog below is for Sage 9.4.
I have a particular matrix on which computing .right_kernel()
by Sage 9.4 results in SignalError: Illegal instruction
.
How to deal with such an error?
sage: load("bug_illegal_kernel.sage")
---------------------------------------------------------------------------
SignalError Traceback (most recent call last)
<ipython-input-1-5e05d00e2706> in <module>
----> 1 load("bug_illegal_kernel.sage")
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/misc/persist.pyx in sage.misc.persist.load (build/cythonized/sage/misc/persist.c:2563)()
171
172 if sage.repl.load.is_loadable_filename(filename):
--> 173 sage.repl.load.load(filename, globals())
174 return
175
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/repl/load.py in load(filename, globals, attach)
270 add_attached_file(fpath)
271 with open(fpath) as f:
--> 272 exec(preparse_file(f.read()) + "\n", globals)
273 elif ext == '.spyx' or ext == '.pyx':
274 if attach:
<string> in <module>
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.right_kernel (build/cythonized/sage/matrix/matrix2.c:31019)()
4715
4716 # Go get the kernel matrix, this is where it all happens
-> 4717 M = self.right_kernel_matrix(*args, **kwds)
4718
4719 ambient = R**self.ncols()
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/matrix/matrix2.pyx in sage.matrix.matrix2.Matrix.right_kernel_matrix (build/cythonized/sage/matrix/matrix2.c:29656)()
4316 if M is None:
4317 try:
-> 4318 format, M = self._right_kernel_matrix(algorithm=algorithm, proof=proof)
4319 except AttributeError:
4320 pass
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._right_kernel_matrix (build/cythonized/sage/matrix/matrix_integer_dense.cpp:22522)()
2694 proof = kwds.pop('proof', None)
2695 proof = get_proof_flag(proof, "linear_algebra")
-> 2696 K = self._rational_kernel_iml().transpose().saturation(proof=proof)
2697 format = 'computed-iml-int'
2698 else:
/usr/local/SageMath.94/local/lib/python3.9/site-packages/sage/matrix/matrix_integer_dense.pyx in sage.matrix.matrix_integer_dense.Matrix_integer_dense._rational_kernel_iml (build/cythonized/sage/matrix/matrix_integer_dense.cpp:32421)()
3882 time = verbose('computing null space of %s x %s matrix using IML'%(self._nrows, self._ncols))
3883 cdef mpz_t * m = fmpz_mat_to_mpz_array(self._matrix)
-> 3884 sig_on()
3885 dim = nullspaceMP(self._nrows, self._ncols, m, &mp_N)
3886 sig_off()
SignalError: Illegal instruction
lscpu
output:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 48 bits virtual
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 10
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 62
Model name: Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
Stepping: 4
CPU MHz: 2892.940
CPU max MHz: 3300.0000
CPU min MHz: 1200.0000
BogoMIPS: 4987.83
Virtualization: VT-x
L1d cache: 640 KiB
L1i cache: 640 KiB
L2 cache: 5 MiB
L3 cache: 50 MiB
NUMA node0 CPU(s): 0-9,20-29
NUMA node1 CPU(s): 10-19,30-39
Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d
Could you please provide the code that leads to the error, e.g. the content of bug_illegal_kernel.sage ?
bug_illegal_kernel.sage is available at https://pastebin.com/WjJKR2dR
I can't reproduce this: it returns an answer for me. What OS are you using, how did you install Sage, etc.?
No error on sagecell either:
https://sagecell.sagemath.org/?z=eJy9...
It's Ubuntu 20.04.3 LTS with Sage 9.3 installed from
sage-9.3-Ubuntu_20.04-x86_64.tar.bz2
, as well as with Sage 9.4 installed fromsage-9.4-Ubuntu_20.04-x86_64.tar.bz2