You are not logged in.
Upgrading gnutls-3.8.9-1 to gnutls-3.8.10-1 breaks my installation of Matlab R2024b. I guess I have two questions
1) For a limited time, am I better off running a partially upgraded system by holding back gnutls or should I hold my entire system back?
2) The stack trace is completely uninformative to me, but does anyone see anything that might help.
Abnormal termination:
Segmentation violation
Current Thread: 'MCR 0 interpret' id 140053602891456
Register State (from fault):
RAX = 0000000000000000 RBX = 0000000000000000
RCX = 00007f603c0008e0 RDX = 00007f603ccb4c20
RSP = 00007f60c53fa760 RBP = 000000006c65746e
RSI = 0000000000000005 RDI = 00007f603ccb4b40
R8 = 0000000000000010 R9 = 0000000000000fb0
R10 = 00007f603ccd1050 R11 = ffffffffffffff08
R12 = 0000000000000000 R13 = 00007f603cb458f0
R14 = 0000000000000000 R15 = 0000000000000001
RIP = 00007f6131431d18 EFL = 0000000000010246
CS = 0033 FS = 0000 GS = 0000
Stack Trace (from fault):
[ 0] 0x00007f6131431d18 /opt/tmw/matlab-r2024b/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so+02301208 Ox3204a7d97fd297a1+00000552
[ 1] 0x00007f6131432a57 /opt/tmw/matlab-r2024b/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so+02304599 lc_init+00000055
[ 2] 0x00007f5f794646a8 /usr/lib/libgnutls.so.30+00411304
[ 3] 0x00007f5f794264ef /usr/lib/libgnutls.so.30+00156911
[ 4] 0x00007f61c51d52f7 /lib64/ld-linux-x86-64.so.2+00021239
[ 5] 0x00007f61c51d53cd /lib64/ld-linux-x86-64.so.2+00021453
[ 6] 0x00007f61c51d24b5 /lib64/ld-linux-x86-64.so.2+00009397 _dl_catch_exception+00000325
[ 7] 0x00007f61c51dc0c9 /lib64/ld-linux-x86-64.so.2+00049353
[ 8] 0x00007f61c51d2416 /lib64/ld-linux-x86-64.so.2+00009238 _dl_catch_exception+00000166
[ 9] 0x00007f61c51dc4de /lib64/ld-linux-x86-64.so.2+00050398
[ 10] 0x00007f61c36a1b34 /usr/lib/libc.so.6+00596788
[ 11] 0x00007f61c51d2416 /lib64/ld-linux-x86-64.so.2+00009238 _dl_catch_exception+00000166
[ 12] 0x00007f61c51d2569 /lib64/ld-linux-x86-64.so.2+00009577
[ 13] 0x00007f61c36a1623 /usr/lib/libc.so.6+00595491
[ 14] 0x00007f61c36a1beb /usr/lib/libc.so.6+00596971 dlopen+00000107
[ 15] 0x00007f613290e9e1 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+09497057
[ 16] 0x00007f61326fc539 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+07324985 JVM_LoadLibrary+00000153
[ 17] 0x00007f60eae0e380 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/libjava.so+00058240 Java_java_lang_ClassLoader_00024NativeLibrary_load+00000416
[ 18] 0x00007f60dba186c7 <unknown-module>+00000000
[ 19] 0x00007f60dba082bd <unknown-module>+00000000
[ 20] 0x00007f60dba07a90 <unknown-module>+00000000
[ 21] 0x00007f60dba082bd <unknown-module>+00000000
[ 22] 0x00007f60dba082bd <unknown-module>+00000000
[ 23] 0x00007f60dba082bd <unknown-module>+00000000
[ 24] 0x00007f60dba082bd <unknown-module>+00000000
[ 25] 0x00007f60dba08040 <unknown-module>+00000000
[ 26] 0x00007f60dba08040 <unknown-module>+00000000
[ 27] 0x00007f60dba082bd <unknown-module>+00000000
[ 28] 0x00007f60dba082bd <unknown-module>+00000000
[ 29] 0x00007f60dba082bd <unknown-module>+00000000
[ 30] 0x00007f60dba082bd <unknown-module>+00000000
[ 31] 0x00007f60dba082bd <unknown-module>+00000000
[ 32] 0x00007f60dba08114 <unknown-module>+00000000
[ 33] 0x00007f60dba08040 <unknown-module>+00000000
[ 34] 0x00007f60dba08040 <unknown-module>+00000000
[ 35] 0x00007f60dba08040 <unknown-module>+00000000
[ 36] 0x00007f60dba08040 <unknown-module>+00000000
[ 37] 0x00007f60dba08040 <unknown-module>+00000000
[ 38] 0x00007f60dba082bd <unknown-module>+00000000
[ 39] 0x00007f60dba08302 <unknown-module>+00000000
[ 40] 0x00007f60dc9af994 <unknown-module>+00000000
[ 41] 0x00007f613268839b /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06849435
[ 42] 0x00007f61327005e4 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+07341540 JVM_DoPrivileged+00001268
[ 43] 0x00007f60dbf88915 <unknown-module>+00000000
[ 44] 0x00007f60dc6d73f4 <unknown-module>+00000000
[ 45] 0x00007f60dba082bd <unknown-module>+00000000
[ 46] 0x00007f60dba082bd <unknown-module>+00000000
[ 47] 0x00007f60dba082bd <unknown-module>+00000000
[ 48] 0x00007f60dba082bd <unknown-module>+00000000
[ 49] 0x00007f60dba007a7 <unknown-module>+00000000
[ 50] 0x00007f613268839b /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06849435
[ 51] 0x00007f6132685c63 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06839395
[ 52] 0x00007f6132686227 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06840871
[ 53] 0x00007f61326f239c /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+07283612
[ 54] 0x00007f6132a7b9eb /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+10992107
[ 55] 0x00007f6132a7bcf1 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+10992881
[ 56] 0x00007f613290d8c2 /opt/tmw/matlab-r2024b/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+09492674
[ 57] 0x00007f61c36a57eb /usr/lib/libc.so.6+00612331
[ 58] 0x00007f61c372918c /usr/lib/libc.so.6+01151372
Last edited by daniel_shub (2025-07-18 00:33:51)
Offline
Did you try rebuilding matlab? It is common to need to rebuild an AUR package when a dependency is updated.
Offline
Did you rebuild matlab?
Edit: ninja'd
Last edited by skunktrader (2025-07-13 03:08:40)
Offline
There is nothing to rebuild. Matlab is closed source and you basically just dump a huge tarball in /opt. A recentish upgrade to glibc caused problems that could be worked around, so I am kinnda hoping that is the case here. There is nothing in the gnutls release notes that seems obvious to me, and really have no idea why Matlab is using tls during the early startup (maybe checking the license or trying to call home?)
Offline
In that case I would pay attention to the comments on the AUR page in case someone knows a solution and posts it there. But for closed source software, you generally need to wait for a new release in these cases.
You could obviously avoid updating your system for a while until a fix is available. Holding back only the gnutls package leaves your system in a partially updated state which has a high chance of causing other issues, and is also unsupported. Personally I would just avoid updating anything until a proper fix is available, at least that does not put your system in a partially updated state.
Offline
really have no idea why Matlab is using tls during the early startup (maybe checking the license or trying to call home?)
[ 1] 0x00007f6131432a57 /opt/tmw/matlab-r2024b/bin/glnxa64/matlab_startup_plugins/lmgrimpl/libmwlmgrimpl.so+02304599 lc_init+00000055
[ 6] 0x00007f61c51d24b5 /lib64/ld-linux-x86-64.so.2+00009397 _dl_catch_exception+00000325
[ 14] 0x00007f61c36a1beb /usr/lib/libc.so.6+00596971 dlopen+00000107
segfaults somehwhere loading that plugin, https://www.google.com/search?q=%22lmgrimpl%22 has quite a lot of hits, windows and linux alike, it seems to be the license check as it is the target of multiple "how to crack matlab" instructions, so your theory about phoning home for the license validation makes sense.
Matlab seems to come with A LOT of bundled libraries that seem to get loaded from /opt/tmw/matlab-r2024b - so you might just be able to drop the old gnutls somehwhere in that path (there's likely some "lib" dir) and get it loaded by matlab from there, leaving the rest of the system alone.
https://aur.archlinux.org/packages/matlab is btw. at R2025a ?
Holding back only the gnutls package leaves your system
doomed to run into a brick wall.
ftfy
Don't even remotely consider this, once stuff starts to get rebuild against the new gnutls, you'll incrementally run into more problems.
Offline
I unpacked the gnutls-3.8.9-1 package into /tmp and then added LD_LIBRARY_PATH=/tmp/gnutls-3.8.9-1-x86_64.pkg/usr/lib/ to the matlab call and it works. Apart from choosing a more permanent location, hopefully the 3.8.9 version continues to work until we upgrade Matlab or hell freezes over and Matlab releases a patch.
Offline
\o/
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
Hi @daniel_shub,
I am running into the same problem as you and tried to use your fix of putting gnutls-3.8.9 into the LD_LIBRARY_PATH but so far it is not working for me.
so far I tried:
export LD_LIBRARY_PATH=/etc/gnutls-3.8.9/usr/lib32/
/./usr/local/MATLAB/R2022b/bin/matlab -nosoftwareopengl
using https://archlinux.org/packages/multilib … 32-gnutls/
and https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/
packages both.
Could you please give more details? Such as from where you downloaded the package, how you define your LD_LIBRARY_PATH with the Matlab call?
Thanks a lot for your help!
Offline
Why did you use the lib32 version? Are you actually using a 32 bit version of MATLAB?
Offline
You're right, that probably didn't make sense. I tried that after
export LD_LIBRARY_PATH=/etc/gnutls-3.8.9/gnutls-3.8.9/lib/
downloaded from
https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/
didn't work.
Neither of them are exactly what @daniel_shub used but I didn't where he downloaded his library version from.
Offline
https://archive.archlinux.org/packages/g/gnutls/
Edit: I'll stress that you won't the entire package, usr/lib/libgnutls* will suffice and you want to put the next to matlab (not! a tmpfs) and you then probably won't even have to mess w/ LD_LIBRARY_PATH because the PKGBUILD makes it look like matlab uses /opt/MATLAB/*/lib anyway
Last edited by seth (2025-07-14 13:31:34)
Offline
@trylukas for now I have settled on
# MATLABPATH=/opt/tmw/matlab-r2024b/bin/glnxa64/
# GNUTLSPATH=/tmp/gnutls-3.8.9-1-x86_64.pkg
# wget https://archive.archlinux.org/packages/g/gnutls/gnutls-3.8.9-1-x86_64.pkg.tar.zst
# mkdir -p "${GNUTLSPATH}"
# tar -xvf gnutls-3.8.9-1-x86_64.pkg.tar.zst -C ${GNUTLSPATH}
# mkdir "${MATLABPATH}"/gnutls
# cp -a "${GNUTLSPATH}"/usr/lib/* "${MATLABPATH}"/gnutls/
# cd "${MATLABPATH}"
# ln -s gnutls/* ./
Obviously tailor the paths to your setup. You may or may not need root/sudo depending on where Matlab is installed. You could dump the libraries directly in the Matlab folder, but I decided to go with a subfolder and links. I am probably copying some extra files and creating some unneeded links,
Offline
Thank you all, that solved it!
For now I'm just using the export LD_LIBRARY_PATH, I'll now check to find a permanent solution as suggested by seth and daniel
Offline
For clarification: do you still need the LD_LIBRARY_PATH w/ the objects in /opt/tmw/matlab-r2024b/bin/glnxa64 ?
Edit, @trylukas: /tmp will be gone with the next reboot.
Last edited by seth (2025-07-14 14:31:26)
Offline
I never had them in /tmp but in some random /etc subfoldere. Anyways, thanks for the suggestion, I moved all the necessary files to the bin/glnxa64 folder in the affected Matlab folder:
cp -R /PATHTO/gnutls-3.8.9-1-x86_64.pkg/usr/lib/libgnu* /usr/local/MATLAB/R2022b/bin/glnxa64/
that I downloaded from seth's suggested link https://archive.archlinux.org/packages/g/gnutls/ into
/PATHTO/gnutls-3.8.9-1-x86_64.pkg
and now it starts without requiring any LD_LIBRARY_PATH changes in a new terminal. Looks like a good fix - THANKS!
Offline
For clarification: do you still need the LD_LIBRARY_PATH w/ the objects in /opt/tmw/matlab-r2024b/bin/glnxa64 ?
Edit, @trylukas: /tmp will be gone with the next reboot.
If the objects are directly in /opt/tmw/matlab-r2024b/bin/glnxa64 you do not need LD_LIBRARY_PATH. If the objects are linked from /opt/tmw/matlab-r2024b/bin/glnxa64 you do not need LD_LIBRARY_PATH. If the objects are in a subfolder under /opt/tmw/matlab-r2024b/bin/glnxa64, then you need LD_LIBRARY_PATH.
Yes, /tmp is an awful place to store something since it will likely be gone on the next reboot.
Offline
Thanks everyone for sharing the explanation to the issue and the solution.
I encounter the same issue with other versions of Matlab (2020b, 2021b and 2022b).
As permanent solution (how permanent depends on MathWorks), I followed the approach from above: #13
Offline
Hi,
got redirected here.
I copied the content of /usr/lib/ to MATLABPATH/gnutls/ as suggested above and made the link to /bin/glnxa64/
It works when I run
export LD_PRELOAD=/usr/lib/libstdc++.so:/usr/lib/libfreetype.so; export LD_LIBRARY_PATH=../gnutls/*:/usr/lib/dri/; export QT_QPA_PLATFORM=xcb; export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk/jre; ./matlab
Thanks a lot :-)
Last edited by BenediktHufnagl (2025-07-16 16:06:49)
Offline
MATLAB Support also suggested to use the -webui flag. This also works:
export LD_PRELOAD=/usr/lib/libstdc++.so:/usr/lib/libfreetype.so; export LD_LIBRARY_PATH=/usr/lib/dri/:; export QT_QPA_PLATFORM=xcb; export; ./matlab -webui
using Sway on Wayland.
Offline
Thanks. I also had the same issue and can confirm that this (#13) works for R2024b and Arch Linux: https://bbs.archlinux.org/post.php?tid= … id=2251599
Last edited by marcin123 (2025-07-24 03:44:20)
Offline