You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py::test_hermitian Fatal Python error: Segmentation fault
Current thread 0x000014995f05b0c0 (most recent call first):
File "/tmp/eb-bepzws5_/tmp8_tnrtkj/lib/python3.9/site-packages/scipy/linalg/decomp.py", line 561 in eigh
File "/tmp/eb-bepzws5_/tmp8_tnrtkj/lib/python3.9/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py", line 230 in test_hermitian
GDB traceback for the segfault, with OpenBLAS built with debug info:
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
0x00007ffff6459ae0 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6459ae0 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6
#1 0x00007fffe6d24222 in zgemv_n (m=m@entry=17, n=n@entry=32, dummy1=dummy1@entry=0, alpha_r=alpha_r@entry=-1, alpha_i=alpha_i@entry=0, a=<optimized out>, a@entry=0xe0ec00, lda=100, lda@entry=50, x=x@entry=0xe5f290, inc_x=2, y=0xe5f490, inc_y=2, buffer=0x0)
at /tmp/boegelbot/OpenBLAS/0.3.18/GCC-11.2.0/OpenBLAS-0.3.18/kernel/zgemv_n_microk_haswell-4.c:276
#2 0x00007fffe6a8c037 in ztrsv_NLN (m=49, a=0xe0ea00, lda=50, b=0xe5f290, incb=1, buffer=0x0) at ztrsv_L.c:151
#3 0x00007fffe6a202e5 in ztrsv_ (UPLO=<optimized out>, TRANS=<optimized out>, DIAG=<optimized out>, N=<optimized out>, a=0xe0ea00, LDA=<optimized out>, x=0xe5f290, INCX=0x7fffe75f9330) at ztrsv.c:204
#4 0x00007fffe725d828 in zhegs2 (itype=<optimized out>, uplo=..., n=50, a=..., lda=50, b=..., ldb=50, info=0, _uplo=1) at zhegs2.f:242
#5 0x00007fffe725ddd3 in zhegst (itype=1, uplo=..., n=50, a=..., lda=50, b=..., ldb=50, info=0, _uplo=1) at zhegst.f:203
#6 0x00007fffe725f14b in zhegvd (itype=1, jobz=..., uplo=..., n=50, a=..., lda=50, b=..., ldb=50, w=..., work=..., lwork=2600, rwork=..., lrwork=5251, iwork=..., liwork=253, info=0, _jobz=140735789764400, _uplo=13834656) at zhegvd.f:363
There's no segfault with OpenBLAS 0.3.15 (but there are a handful of failing scipy tests).
The segfault also occurs when using -O2 -fno-tree-vectorize -march=native -fno-math-errno -g as compiler flags.
There is no obvious memset in the zgemv_n microkernel for Haswell, but breaking between 0.3.15 and 0.3.16 would suggest I must have overlooked a dependency on the "buffer" variable in #3252 (which would leave a wild pointer)
Activity
boegel commentedon Oct 20, 2021
@bartoldeman had a quick look at this, and he mentioned "Seems memset is called with the wrong parameters.", maybe he has more info on this already...
martin-frbg commentedon Oct 20, 2021
There is no obvious memset in the zgemv_n microkernel for Haswell, but breaking between 0.3.15 and 0.3.16 would suggest I must have overlooked a dependency on the "buffer" variable in #3252 (which would leave a wild pointer)
bartoldeman commentedon Oct 20, 2021
Perhaps the
memsetis here:kernel/x86_64/zgemv_n_4.c:276https://github.com/xianyi/OpenBLAS/blob/059d3a04c1565708bc67eb903c218e69127d13fb/kernel/x86_64/zgemv_n_4.c#L276
in any case the revert looks like the right thing to do, thanks!
boegel commentedon Oct 20, 2021
Thanks a lot for the quick fix @martin-frbg!