Why does MATLAB crash on Linux with "Inconsistency detected by ld.so: ../elf/dl-tls.c: 597: _dl_allocate_tls_init:"

665 views (last 30 days)
When running MATLAB on my Linux machine, it sometimes crashes and the following error message appears in the terminal:
Inconsistency detected by ld.so: ../elf/dl-tls.c: 597: _dl_allocate_tls_init: Assertion `listp != NULL' failed!
It doesn't appear that any crash logs are generated.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 30 Nov 2021 at 5:00
Edited: MathWorks Support Team on 30 Nov 2021 at 15:22
This crash is related to a bug in the GNU C library (glibc) in Linux. This bug does not originate in MATLAB/Simulink. The bug report for this issue can be found here: https://sourceware.org/bugzilla/show_bug.cgi?id=19329
Since this is a bug in a third-party tool integrated into the operating system itself, the crash may be resolved by reverting to a previous operating system version which uses a glibc version older than 2.22 (the version where the bug was introduced). Alternatively, there are a few patches and fixes mentioned on the bug report linked above, which you can consider.
Another workflow might be, if you can't upgrade to glibc 2.34, to open an empty MATLAB Live Script at first.
Tobias Schindler
Tobias Schindler on 1 Dec 2021 at 10:20
We face the same issue on Ubuntu 20.04 LTS, i.e., an offically supported OS (https://de.mathworks.com/support/requirements/matlab-system-requirements.html).
What is the official way to solve the issue? This post only discribes the problem.

Sign in to comment.

More Answers (1)

ed gh
ed gh on 13 Oct 2021
I had the same problem but running Matlab as root with sudo solved the problem and after that running as normal user also worked fine.
Zhaoyang Han
Zhaoyang Han on 7 Nov 2021 at 21:38
Yes. I had the same issue. It seems working after I renamed the matlab folder and run with my normal user.

Sign in to comment.


No tags entered yet.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!