Matlab app does not work on Rocky 9.4

Hi,

I am working on deploy Rocky Linux 9.4 for OOD nodes to run Matlab.

It does not work. (The desktop app works fine). I can even manually ssh to the node to start to run matlab. But the Matlab app keeps failing:

Generating connection YAML file…

  • xsetroot -solid ‘#D3D3D3
    xsetroot: unable to open display ‘:1’
  • xfsettingsd --sm-client-disable
    MATLAB is selecting SOFTWARE OPENGL rendering.

~/ondemand/data/sys/dashboard/batch_connect/dev/bc_matlab/output/737b141c-2abe-4282-9204-6ac2125bca19/script.sh: line 30: 572048 Trace/breakpoint trap (core dumped) xfsettingsd --sm-client-disable

                        < M A T L A B (R) >
              Copyright 1984-2023 The MathWorks, Inc.
         R2023a Update 3 (9.14.0.2286388) 64-bit (glnxa64)
                            May 25, 2023

To get started, type doc.
For product information, visit www.mathworks.com.

Cleaning up…
Killing Xvnc process ID 571923
Xvnc process ID 571923 already killed

I could midify the script.sh.erb to start a “xfce4-session”, instead of matlab.

Looks like it is related to the newer xfce and x on the Rocky 9.4. Not sure how to let it work.

Thanks

Feng

Looks very strange:

  1. SSH to the node, run matlab fine.
  2. start Desktop app, then from there run matlab, crashed.
    Relive that the matlab app experiences the same issue, since it starts a XFCE env and run matlab.

Does matlab works with the new XFCE 4.18, Rocky Linux 9.4?

The output.log:

Desktop ‘xfce’ ended…
Cleaning up…
Killing Xvnc process ID 624776
Xvnc process ID 624776 already killed

===================

The VNC log:

02/02/2025 09:33:22 Got connection from client 127.0.0.1
02/02/2025 09:33:22 Using protocol version 3.8
02/02/2025 09:33:22 Enabling TightVNC protocol extensions
02/02/2025 09:33:22 Advertising Tight auth cap ‘VENCRYPT’
02/02/2025 09:33:22 Advertising Tight auth cap ‘VNCAUTH_’
02/02/2025 09:33:22 Advertising Tight auth cap ‘ULGNAUTH’
02/02/2025 09:33:22 Full-control authentication enabled for 127.0.0.1
02/02/2025 09:33:22 Pixel format for client 127.0.0.1:
02/02/2025 09:33:22 32 bpp, depth 24, little endian
02/02/2025 09:33:22 true colour: max r 255 g 255 b 255, shift r 0 g 8 b 16
02/02/2025 09:33:22 Using tight encoding for client 127.0.0.1
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding -260 (fffffefc)
02/02/2025 09:33:22 Using JPEG subsampling 1, Q41 for client 127.0.0.1
02/02/2025 09:33:22 Interframe comparison enabled
02/02/2025 09:33:22 Enabling Desktop Size protocol extension for client 127.0.0.1
02/02/2025 09:33:22 Enabling LastRect protocol extension for client 127.0.0.1
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding -258 (fffffefe)
02/02/2025 09:33:22 Enabling Extended Desktop Size protocol extension for client 127.0.0.1
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding -309 (fffffecb)
02/02/2025 09:33:22 Enabling Fence protocol extension for client 127.0.0.1
02/02/2025 09:33:22 Enabling Continuous Updates protocol extension for client 127.0.0.1
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding -307 (fffffecd)
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding -1063131698 (c0a1e5ce)
02/02/2025 09:33:22 rfbProcessClientNormalMessage: ignoring unknown encoding 1464686180 (574d5664)
02/02/2025 09:33:22 Enabling full-color cursor updates for client 127.0.0.1
02/02/2025 09:33:22 Using Tight compression level 1 for client 127.0.0.1
02/02/2025 09:33:22 Using 4 threads for Tight encoding
02/02/2025 09:33:22 Continuous updates enabled
02/02/2025 09:33:22 New desktop size: 1628 x 867
02/02/2025 09:33:22 Interframe comparison disabled
02/02/2025 09:33:22 Interframe comparison enabled
02/02/2025 09:33:22 New screen layout:
02/02/2025 09:33:22 0x00000000 (output 0x00000040): 1628x867+0+0
02/02/2025 09:33:22 Continuous updates enabled
02/02/2025 09:33:22 Continuous updates enabled
02/02/2025 09:33:22 Continuous updates enabled
(EE) Bus error at address 0x0
(EE)
Fatal server error:
(EE) Caught signal 7 (Bus error). Server aborting
(EE)

Thanks!

Turned out if add “-nodisplay” option in the script.sh.erb file:

matlab -nosiplay -desktop

Then it works.

Not sure root reason though.

Check here: Comparing OSC:master...prod-feng:master · OSC/bc_osc_matlab · GitHub

Glad you found the fix. I would also say it’s due to XFCE changes in el7 to el8 and the fact that it doesn’t background anymore. Here are the updates I made to MATLAB as well to resolve this issue.

You may also want to look into https://github.com/mathworks/matlab-proxy. This has become my preferred way to deploy Matlab as long as other GUI apps aren’t needed which would necessitate a full desktop.

Thanks, Jeff!

It looks like your new script.sh still does not work for our environment. I had to also add -nodisplay option to let it work.

While this solution still will crash when I click “Add more apps” menu item:

(xfsettingsd:784674): xfsettingsd-WARNING **: 10:57:08.227: Failed to get the _NET_NUMBER_OF_DESKTOPS property.
Fontconfig warning: “/usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf”, line 6: unknown element “reset-dirs”
Setting VNC password…
Generating connection YAML file…
Nativewindow X11 IOError: Display 0x15526c282f80 (:1): Resource temporarily unavailable
Nativewindow X11 IOError: Display 0x15526c282f80 (:1): Resource temporarily unavailable
Opening log file: /xxxxxxx/java.log.63785
MATLAB: javainit.cpp:1458: void {anonymous}::mwJavaAbort(): Assertion `Fatal Java Exception. See this file for details: /xxxxxxxx/hs_error_pid63785.log’ failed.
qt.qpa.xcb: could not connect to display :1
qt.qpa.plugin: Could not load the Qt platform plugin “xcb” in “” even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.


            Assertion detected at 2025-02-03 10:57:33 -0500

Configuration:
Crash Decoding : Disabled - No sandbox or build area path
Crash Mode : continue (default)
Default Encoding : UTF-8
Deployed : false
GNU C Library : 2.34 stable
Graphics Driver : Brian Paul Mesa X11 Version 2.1 Mesa 17.1.3
Graphics card 1 : 0x102b ( 0x102b ) 0x538 Version 0.0.0.0 (0-0-0)
Java Version : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot™ 64-Bit Server VM mixed mode
MATLAB Architecture : glnxa64
MATLAB Entitlement ID : 1986215
MATLAB Root : /software/MatLab2023a
MATLAB Version : 9.14.0.2286388 (R2023a) Update 3
OpenGL : hardware
Operating System : Linux 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Oct 31 14:01:51 UTC 2024 x86_64
Process ID : 784681
Processor ID : x86 Family 25 Model 1 Stepping 1, AuthenticAMD
Session Key : 1e26951a-73d6-4b45-a92e-025970d8b488
Window System : The X.Org Foundation (11906000), display :1

Fault Count: 1

Additional Log Files:
Java Crash Report : /xxxxxxx/hs_error_pid63785.log
Java Log : /xxxxxx/java.log.63785

Assertion in void {anonymous}::mwJavaAbort() at javainit.cpp line 1458:
Fatal Java Exception. See this file for details: /xxxxxxxx/hs_error_pid63785.log

Current Thread: ‘MCR 0 interpret’ id 23447840400960

Register State (captured):
RAX = 0000000000000000 RBX = 0000155532c987e8
RCX = 0000000000000000 RDX = 000015555545eec0
RSP = 0000155360328530 RBP = 0000155360328910
RSI = 0000155555445705 RDI = 0000155360328540

R8 = 0000000000000000 R9 = 0000155360328820
R10 = 0000000000000000 R11 = 0000000000000000
R12 = 00001555554652c8 R13 = 0000155555475348
R14 = 0000155532c9b566 R15 = 00001553603291f0

RIP = 00001555553f2d9f EFL = 0000000000000000

CS = 0000 FS = 0000 GS = 0000

Stack Trace (captured):
[ 0] 0x00001555553ec0e3 /gpfs/software/MatLab2023a/bin/glnxa64/libmwfl.so+00319715
[ 1] 0x00001555553ec2dc /gpfs/software/MatLab2023a/bin/glnxa64/libmwfl.so+00320220 _ZN10foundation4core4diag15stacktrace_base7captureEm+00000028
[ 2] 0x00001555553f11a1 /gpfs/software/MatLab2023a/bin/glnxa64/libmwfl.so+00340385
[ 3] 0x00001555553f1260 /gpfs/software/MatLab2023a/bin/glnxa64/libmwfl.so+00340576
[ 4] 0x0000155532c1d52a /gpfs/software/MatLab2023a/bin/glnxa64/matlab_startup_plugins/jmi/…/…/…/…/bin/glnxa64/libmwjmi.so+01520938
[ 5] 0x0000155419d1e700 /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+09496320
[ 6] 0x0000155419ad573b /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+07100219
[ 7] 0x00001552dc139b77 /gpfs/software/MatLab2023a/bin/glnxa64/libnativewindow_x11.so+00011127 NativewindowCommon_FatalError+00000268
[ 8] 0x00001552dc13a8bd /gpfs/software/MatLab2023a/bin/glnxa64/libnativewindow_x11.so+00014525
[ 9] 0x000015554cb61f9f /gpfs/software/MatLab2023a/bin/glnxa64/libX11.so.6+00278431 _XIOError+00000095
[ 10] 0x000015554cb5f8f5 /gpfs/software/MatLab2023a/bin/glnxa64/libX11.so.6+00268533 _XEventsQueued+00000149
[ 11] 0x000015554cb517bb /gpfs/software/MatLab2023a/bin/glnxa64/libX11.so.6+00210875 XEventsQueued+00000075
[ 12] 0x00001552fde49a4d +00000000
[ 13] 0x00001552fd007d20 +00000000
[ 14] 0x00001552fd0082dd +00000000
[ 15] 0x00001552fd008322 +00000000
[ 16] 0x00001552fd0007cb +00000000
[ 17] 0x0000155419a9839b /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06849435
[ 18] 0x0000155419a95c63 /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06839395
[ 19] 0x0000155419a96227 /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+06840871
[ 20] 0x0000155419b0239c /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+07283612
[ 21] 0x0000155419e8b9eb /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+10992107
[ 22] 0x0000155419e8bcf1 /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+10992881
[ 23] 0x0000155419d1d8c2 /gpfs/software/MatLab2023a/sys/java/jre/glnxa64/jre/lib/amd64/server/libjvm.so+09492674
[ 24] 0x000015555424ac02 /lib64/libc.so.6+00564226
[ 25] 0x00001555542cfc40 /lib64/libc.so.6+01109056

** This crash report has been saved to disk as /xxxxxxxxxx/matlab_crash_dump.784681-1 **

MATLAB is exiting because of fatal error
/xxxxxxondemand/data/sys/dashboard/batch_connect/dev/bc_matlab/output/8c6db487-b068-4549-b0c1-0bce279b5637/script.sh: line 47: 784681 Killed matlab -nodisplay -desktop
Cleaning up…
Killing Xvnc process ID 784639
Xvnc process ID 784639 already killed

Besides the OOD, do we need to re-install Malab? But I could actually ssh to the OOD Rocky 9.4 node, and start Matlab there without any issue.

Thanks, Morgan! It is interesting, I will have a look into it later.

For context, did MATLAB run as expected through the XFCE-based app before Rocky Linux 9.4 was deployed to the OOD nodes?

It would be interesting to see whether MATLAB also crashes if you access it using the matlab-proxy package that Morgan mentioned because this could indicate whether the issue is XFCE-specific or not (the package enables you to access MATLAB in your browser without needing to use XFCE).

In any case, since MATLAB is generating a crash log, I’d recommend contacting MathWorks Technical Support to help investigate the root cause of the crash.

Thanks, Nick!

The matlab ood app works fine on our older compute nodes, with Rocky Linux 8.

Also, I could ssh -Y login to this Rocky Linux 9 node, from my macbook, using XQuarz, and matlab works fine too.

So I reinstalled all the XFCE, turboVNC packages, and now it seems it works. Strange.

One difference during the installation processes I saw is: this time the package dbus-x11 was installed by default with the XFCE+X. In the first time, I had to install it manually. Not sure why.