MATLAB: Does MATLAB R2018a crash on startup on Red Hat 7.5 with “libLLVM” in the trace

crashlibllvmMATLABnouveaurhelswrast

Why does MATLAB R2018a crash on startup on Red Hat 7.5?
The stack trace for this crash may look like the following, with the "libLLVM" somewhere in the trace:
Stack Trace (from fault):
[ 0] 0x00007f8ba754e15e /lib64/libLLVM-5.0-rhel.so+05701982 ZNSt13_future_base16_Task_state_baseIFvvEED1Ev+00000030
[ 1] 0x000000000040c276 /home/users/chiodi/matlab/Matlab2018a/R2018a/bin/glnxa64/MATLAB+00049782 ZNSt16_Sp_counted_baseILN9_gnu_cxx12_Lock_policyE2EE10_M_releaseEv+00000102
[ 2] 0x00007f8ba35f23df bin/glnxa64/libmwsearch_path_impl.so+00455647 _ZNSt13packaged_taskIFvvEED1Ev+00000431
[ 3] 0x00007f8ba35f24a0 bin/glnxa64/libmwsearch_path_impl.so+00455840
[ 4] 0x00007f8ba35bc6c0 bin/glnxa64/libmwsearch_path_impl.so+00235200
[ 5] 0x00007f8bc0b2e65f /home/users/chiodi/matlab/Matlab2018a/R2018a/bin/glnxa64/../../sys/os/glnxa64/libstdc++.so.6+00759391
[ 6] 0x00007f8bbecdadd5 /lib64/libpthread.so.0+00032213
[ 7] 0x00007f8bc0590b3d /lib64/libc.so.6+01043261 clone+00000109
[ 8] 0x0000000000000000 <unknown-module>+00000000

Best Answer

To ensure that this is the issue, start MATLAB with the following switches:
$ /path/to/matlab -D'env LD_DEBUG=files' 2>&1 | grep 'libLLVM-5.0.*needed by'
The following text should appear in your terminal window.
nnnnn: file=libLLVM-5.0-rhel.so [0]; needed by /usr/lib64/dri/nouveau_dri.so [0]
The "nnnnn" is just an example process ID.
If running in a VMware VM, you might see:
nnnnn: file=libLLVM-5.0-rhel.so [0]; needed by /usr/lib64/dri/swrast_dri.so [0]
If you are using NVIDIA hardware, you may also consider downloading and installing the drivers provided by NVIDIA instead of using the drivers included as part of Red Hat 7.5
This crash may be linked to the issue reported for nouveau and VM graphics card drivers as outlined in the Bug Report below:
Please watch the Bug Report for updates and workarounds.
Related Question