Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV in getrf on OS X 10.8 #306

Closed
mlubin opened this issue Oct 12, 2013 · 6 comments
Closed

SIGSEGV in getrf on OS X 10.8 #306

mlubin opened this issue Oct 12, 2013 · 6 comments

Comments

@mlubin
Copy link

mlubin commented Oct 12, 2013

Moving the issue over from jump-dev/JuMP.jl#50, I get a crash in dgetrf on OS X 10.8:

* thread #1: tid = 0x5bda4, 0x00000001063e3e20 libopenblas.dylib`.L11 + 48, queue = 'com.apple.main-thread, stop reason = signal SIGSEGV
    frame #0: 0x00000001063e3e20 libopenblas.dylib`.L11 + 48
libopenblas.dylib`.L11 + 48:
-> 0x1063e3e20:  movapd 48(%rsi), %xmm7
   0x1063e3e25:  andpd  %xmm15, %xmm7
   0x1063e3e2a:  maxpd  %xmm7, %xmm3
   0x1063e3e2e:  prefetcht0 1472(%rsi)
(lldb) bt
* thread #1: tid = 0x5bda4, 0x00000001063e3e20 libopenblas.dylib`.L11 + 48, queue = 'com.apple.main-thread, stop reason = signal SIGSEGV
    frame #0: 0x00000001063e3e20 libopenblas.dylib`.L11 + 48
    frame #1: 0x0000000104df9397 libopenblas.dylib`sgetf2_k(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fb87040, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 2647 at getf2_k.c:97
    frame #2: 0x0000000104dffb11 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fb87040, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 801 at getrf_parallel.c:423
    frame #3: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fb9ad40, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #4: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fbaea40, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #5: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fbc2740, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #6: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fbd6440, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #7: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x00007fff5fbea140, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #8: 0x0000000104dffbd1 libopenblas.dylib`dgetrf_parallel(args=0x00007fff5fbea2b0, range_m=0x0000000000000000, range_n=0x0000000000000000, sa=0x000000010fd00000, sb=0x000000010fe00000, myid=0) + 993 at getrf_parallel.c:435
    frame #9: 0x0000000104829b94 libopenblas.dylib`dgetrf_(M=0x000000010d9b9d2c, N=0x000000010d9b9d2c, a=0x000000010d9bb4c0, ldA=0x000000010d9b9d2c, ipiv=0x000000010d9bb720, Info=0x00007fff5fbea40c) + 660 at getrf.c:108
    frame #10: 0x000000010f2b2c99 libCoinUtils.3.dylib`CoinDenseFactorization::factor(this=0x0000000100000000) + 201 at CoinDenseFactorization.cpp:202

Unfortunately I don't have a standalone example. Openblas (v0.2.8) is built by julia using clang with DEBUG=1.

$ system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: MacBook Pro
      Model Identifier: MacBookPro10,2
      Processor Name: Intel Core i5
      Processor Speed: 2.6 GHz
      Number of Processors: 1
      Total Number of Cores: 2
      L2 Cache (per Core): 256 KB
      L3 Cache: 3 MB
      Memory: 8 GB
      Boot ROM Version: MBP102.0106.B03
      SMC Version (system): 2.6f59
      Serial Number (system): ***
      Hardware UUID: ***
      Sudden Motion Sensor:
          State: Enabled

I can try compiling with gcc also if that would be helpful.

@xianyi
Copy link
Collaborator

xianyi commented Oct 14, 2013

Could you try to build OpenBLAS with USE_OPENMP=1?

@mlubin
Copy link
Author

mlubin commented Oct 17, 2013

On 10.8, the default compiler is clang, so USE_OPENMP=1 fails. If I force it to build with gcc, I get the following compile error:

gcc-4.8 -O2 -DEXPRECISION -m128bit-long-double -fopenmp -Wall -m64 -DF_INTERFACE_GFORT -fPIC  -DSMP_SERVER -DUSE_OPENMP -DMAX_CPU_NUMBER=4 -DASMNAME=_sgemm_otcopy -DASMFNAME=_sgemm_otcopy_ -DNAME=sgemm_otcopy_ -DCNAME=sgemm_otcopy -DCHAR_NAME=\"sgemm_otcopy_\" -DCHAR_CNAME=\"sgemm_otcopy\" -DNO_AFFINITY -I.. -UDOUBLE  -UCOMPLEX -c -UDOUBLE -UCOMPLEX ../kernel/x86_64/../generic/gemm_tcopy_8.c -o sgemm_otcopy.o
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:241:no such instruction: `vzeroupper'
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:243:no such instruction: `vmovlps %xmm0, 48(%rsp)'
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:286:no such instruction: `vxorps %ymm15, %ymm15,%ymm15'
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:288:no such instruction: `vxorps %ymm14, %ymm14,%ymm14'
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:290:no such instruction: `vxorps %ymm13, %ymm13,%ymm13'
../kernel/x86_64/sgemm_kernel_8x8_sandy.S:292:no such instruction: `vxorps %ymm12, %ymm12,%ymm12'
...
$ gcc-4.8 --version
gcc-4.8 (GCC) 4.8.1

@mlubin
Copy link
Author

mlubin commented Oct 17, 2013

I ran the build with: make CC=gcc-4.8 USE_OPENMP=1

@xianyi
Copy link
Collaborator

xianyi commented Oct 17, 2013

Please use this script to replace /usr/bin/as
https://gist.github.com/xianyi/2957847

@mlubin
Copy link
Author

mlubin commented Oct 18, 2013

It crashes as well, even when I set OMP_NUM_THREADS=1

* thread #1: tid = 0x217da1, 0x00000001044c66f5 libopenblas_sandybridgep-r0.2.8.dylib`.L11 + 69, queue = 'com.apple.main-thread, stop reason = signal SIGSEGV
    frame #0: 0x00000001044c66f5 libopenblas_sandybridgep-r0.2.8.dylib`.L11 + 69
libopenblas_sandybridgep-r0.2.8.dylib`.L11 + 69:
-> 0x1044c66f5:  movapd 64(%rsi), %xmm4
   0x1044c66fa:  andpd  %xmm15, %xmm4
   0x1044c66ff:  maxpd  %xmm4, %xmm0
   0x1044c6703:  movapd 80(%rsi), %xmm5
(lldb) bt
error: unable to find CIE at 0x00000018 for cie_id = 0x00000004 for entry at 0x00000018.
* thread #1: tid = 0x217da1, 0x00000001044c66f5 libopenblas_sandybridgep-r0.2.8.dylib`.L11 + 69, queue = 'com.apple.main-thread, stop reason = signal SIGSEGV
    frame #0: 0x00000001044c66f5 libopenblas_sandybridgep-r0.2.8.dylib`.L11 + 69
    frame #1: 0x00000001046c158f libopenblas_sandybridgep-r0.2.8.dylib`sgetf2_k(args=<unavailable>, range_m=<unavailable>, range_n=<unavailable>, sa=<unavailable>, sb=<unavailable>, myid=<unavailable>) + 2027 at getf2_k.c:97

@mlubin
Copy link
Author

mlubin commented Jun 2, 2014

This was probably a 32-/64-bit ABI mismatch. Closing

@mlubin mlubin closed this as completed Jun 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants