MATLAB: Segmentation Violation detected on run

crashMATLAB

Hi, I get the following crash information when running MATLAB
--------------------------------------------------------------------------------
Segmentation violation detected at Mon Nov 26 16:15:19 2018 -0700
--------------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
Desktop Environment : GNOME
GNU C Library : 2.23 stable
Graphics Driver : NVIDIA Corporation GeForce GTX 970/PCIe/SSE2 Version 4.6.0 NVIDIA 387.26
Java Version : Java 1.8.0_144-b01 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 2071668
MATLAB Root : /usr/local/MATLAB/R2018a
MATLAB Version : 9.4.0.813654 (R2018a)
OpenGL : hardware
Operating System : Linux 4.4.0-139-generic #165-Ubuntu SMP Wed Oct 24 10:58:50 UTC 2018 x86_64
Process ID : 2860
Processor ID : x86 Family 6 Model 60 Stepping 3, GenuineIntel
Session Key : 0a088fe5-8915-41c9-a92e-d2cf249dc55d
Static TLS mitigation : Enabled: Full
Window System : The X.Org Foundation (11804000), display :1
Fault Count: 1
Abnormal termination
Register State (from fault):
RAX = 0000000000000001 RBX = 00007f6ba4b11640
RCX = 00007f6c972cda00 RDX = 0000000000000001
RSP = 00007f6c137ef418 RBP = 0000000000000041
RSI = 00007f6ba4b11640 RDI = 0000000000000019
R8 = 00007f6ba4876d90 R9 = 0000000000000001
R10 = 00007f6bc2925fa0 R11 = 00007f6ccb21c4f0
R12 = 00007f6baece3300 R13 = 0000000000000001
R14 = 00007f6ba4b11640 R15 = 0000000000000019
RIP = 00007f6bb914b5a0 EFL = 0000000000010202
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f6bb914b5a0 /usr/local/MATLAB/R2018a/bin/glnxa64/libOpenThreads.so.20+00021920 _ZN11OpenThreads5Mutex4lockEv+00000000

Best Answer

The crash is in OpenThreads::Mutex::lock()
When I look at https://devtalk.nvidia.com/default/topic/569847/multithreaded-graphics-app-intermittent-deadlock-with-quadro-fx3800-driver-319-32-libgl-so-1-impl/ I see that there were some reports of crashes in some NVIDIA driver versions related to that.
I notice that your Linux driver version is out of date. You have 387.26. The current version is 410.78. Upgrading might help.