MathWorks Service Host pegs CPU in a crash-loop on Ubuntu 24.04 (R2025a): libxslt undefined symbol xmlCtxtParseDocument
Ältere Kommentare anzeigen
On Ubuntu 24.04.2 LTS (kernel 6.17, x86_64) running MATLAB R2025a, the MathWorks Service Host
"companion" daemon sits in a continuous crash/respawn loop: it pegs 150-240% CPU and writes a
~5 MB log file to ~/.MathWorks/ServiceHost/<host>/logs/ roughly once per second. The MATLAB
compute engine itself works fine — it's only the companion connector that's broken.
Setup: MATLAB is launched through the MATLAB extension for Visual Studio Code
(MathWorks.language-matlab) over Remote-SSH on a headless server. The crash-looping companion
is launched by the extension's language-server MATLAB (its ServiceHost client-v1 is the parent).
To be clear, the defect is in the ServiceHost library loading (below), not the extension — the
extension is just what triggers the companion launch.
Quick check:
ps -eo pid,pcpu,args | grep 'MathWorksServiceHost service' | grep -v grep
ls -t ~/.MathWorks/ServiceHost/*/logs/*.log | head # new ~5MB log every second
ROOT CAUSE
The service log shows:
Error loading .../glnxa64/foundation/secrets_store/.../libmwflsecretsstorexmlsec.so.
.../glnxa64/libxslt.so.1: undefined symbol: xmlCtxtParseDocument
The Service Host's bundled libxslt.so.1.1.43 needs xmlCtxtParseDocument, a symbol that only
exists in libxml2 >= 2.13. MathWorks ships libxml2.so.2.13.8 in the same glnxa64 folder, but
the daemon launches with an EMPTY LD_LIBRARY_PATH, so the dynamic loader binds the SYSTEM
libxml2 instead — Ubuntu 24.04 ships 2.9.14, which lacks the symbol. So secrets_store fails
to load, the framework aborts, and it respawns forever.
Confirmed via /proc/<pid>/maps — the broken pairing is actually mapped into the daemon:
.../glnxa64/libxslt.so.1.1.43 (bundled)
/usr/lib/x86_64-linux-gnu/libxml2.so.2.9.14 (system, wrong)
Antworten (1)
Dan Stanciu
am 10 Jun. 2026
0 Stimmen
This happens because libxml2 is loaded from the OS rather than the one we provide. The workaround is to install the latest MathWorks Service Host:
- Download it from here: https://ssd.mathworks.com/supportfiles/downloads/MathWorksServiceHost/v2026.6.0.2/reinstallers/glnxa64/ReinstallMathWorksServiceHost
- Open a terminal, cd to their downloads folder and run
- chmod +x ReinstallMathWorksServiceHost
- ./ReinstallMathWorksServiceHost
Kategorien
Mehr zu Downloads finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!