You are not logged in.

#1 Yesterday 07:55:27

trylukas
Member
Registered: 2024-09-27
Posts: 21

Matlab segfaults with OMP Errors

Hi everyone,

we are a university lab running 4 local workstations with up-to-date arch linux lts. After recent pacman updates we are now seeing the same Matlab crashes when running completely different scripts. 
In the terminal running Matlab, we always get:

OMP: Error #29: Unable to set OMP thread stack size to 525440:
OMP: System error #22: Invalid argument
OMP: Hint Try increasing OMP_STACKSIZE or the shell stack limit.
Segmentation fault                     (core dumped) ./matlab

I have searched the web and the arch forums but could not find anything about this problem but for us it is happening across workstations and Matlab distros between 2021a and 2024b.

The Matlab crash report and stack trace are:

OMP: Error #29: Unable to set OMP thread stack size to 525440 bytes:
OMP: System error #22: Invalid argument
OMP: Hint Try increasing OMP_STACKSIZE or the shell stack limit.

MATLAB Log File: /home/$username/matlab_crash_dump.1602-1

------------------------------------------------
MATLAB Log File
------------------------------------------------ 


--------------------------------------------------------------------------------
                 abort() detected at 2025-10-18 04:20:05 +0200
--------------------------------------------------------------------------------

Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : UTF-8
  Deployed                 : false
  GNU C Library            : 2.42 stable
  Graphics Driver          : Unknown software 
  Graphics card 1          : 0x10de ( 0x10de ) 0x2204 Version 580.95.5.0 (0-0-0)
  Java Version             : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : glnxa64
  MATLAB Entitlement ID    : 1971833
  MATLAB Root              : /usr/local/MATLAB/R2021b
  MATLAB Version           : 9.11.0.2179507 (R2021b) Update 5
  OpenGL                   : software
  Operating System         : Linux 6.12.53-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 15 Oct 2025 11:05:48 +0000 x86_64
  Process ID               : 1602
  Processor ID             : x86 Family 143 Model 113 Stepping 0, AuthenticAMD
  Session Key              : dbcb8a74-44ab-46a5-96da-511734bf8746
  Static TLS mitigation    : Enabled: Full
  Window System            : The X.Org Foundation (12101015), display redqueen:11.0

Fault Count: 1


Abnormal termination:
abort()

Current Thread: 'MCR 0 interpret' id 139753454302912

Register State (from fault):
  RAX = 0000000000000000  RBX = 000000000000068b
  RCX = 00007f1b2429894c  RDX = 0000000000000006
  RSP = 00007f1ae2fe25e0  RBP = 00007f1ae2fe2620
  RSI = 000000000000068b  RDI = 0000000000000642

   R8 = 0000000000000018   R9 = 0000000000000000
  R10 = 0000000000000000  R11 = 0000000000000246
  R12 = 00007f1b033d3a78  R13 = 00007f19ae5b6400
  R14 = 0000000000000006  R15 = 00007f1b033d3988

  RIP = 00007f1b2429894c  EFL = 0000000000000246

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00007f1b2429894c                                 /usr/lib/libc.so.6+00624972
[  1] 0x00007f1b2423e410                                 /usr/lib/libc.so.6+00254992 gsignal+00000032
[  2] 0x00007f1b2422557a                                 /usr/lib/libc.so.6+00152954 abort+00000038
[  3] 0x00007f1b030bd7f7 /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00776183
[  4] 0x00007f1b030a7abb /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00686779
[  5] 0x00007f1b031314dc /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+01250524
[  6] 0x00007f1b030b15fa /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00726522
[  7] 0x00007f1b030b7efd /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00753405
[  8] 0x00007f1b030b562f /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00742959 __kmp_fork_call+00004335
[  9] 0x00007f1b03078533 /usr/local/MATLAB/R2021b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00492851 __kmpc_fork_call+00000387
[ 10] 0x00007f0ddf55f56b        /usr/local/MATLAB/R2021b/bin/glnxa64/mkl.so+05633387 mkl_lapack_dgeqrf_pfnr+00000587
[ 11] 0x00007f0ddf7e5b10        /usr/local/MATLAB/R2021b/bin/glnxa64/mkl.so+08280848 mkl_lapack_xdgeqrf+00000576
[ 12] 0x00007f0ddf5484a4        /usr/local/MATLAB/R2021b/bin/glnxa64/mkl.so+05538980 mkl_lapack_dgeqrf+00005428
[ 13] 0x00007f0ddf399a6c        /usr/local/MATLAB/R2021b/bin/glnxa64/mkl.so+03775084 DGEQRF+00000220
[ 14] 0x00007f1b04e75705 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmathlinalg.so+02578181
[ 15] 0x00007f1b04e6e8bf /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmathlinalg.so+02549951 _Z15mathlinalgQRFcniPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPKS0_+00000175
[ 16] 0x00007f18f29f66f0 /usr/local/MATLAB/R2021b/bin/glnxa64/builtins/mathlinalg/mwlibmwmathlinalg_builtinimpl.so+00337648
[ 17] 0x00007f1b1b65e8fa /usr/local/MATLAB/R2021b/bin/glnxa64/libmwbuiltin.so+00076026 _ZNK9MathWorks7builtin10BuiltinFcn6invokeEiPP11mxArray_tagiS4_NS1_18VariantsToConsiderE+00000106
[ 18] 0x00007f1b1a323b4e /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_dispatcher.so+00764750
[ 19] 0x00007f1b1a326938 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_dispatcher.so+00776504
[ 20] 0x00007f1b07e080ee /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+12615918
[ 21] 0x00007f1b07f58c91 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13995153
[ 22] 0x00007f1b07f58f86 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13995910
[ 23] 0x00007f1b07ee3f3d /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13516605
[ 24] 0x00007f1b07eec030 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13549616
[ 25] 0x00007f1b079abdc0 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08043968
[ 26] 0x00007f1b079adde4 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08052196
[ 27] 0x00007f1b079aae71 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08040049
[ 28] 0x00007f1b079a0d25 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+07998757
[ 29] 0x00007f1b079a1211 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08000017
[ 30] 0x00007f1b079aa6ba /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08038074
[ 31] 0x00007f1b079aa7b6 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08038326
[ 32] 0x00007f1b07ad8e1b /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+09276955
[ 33] 0x00007f1b07adbd40 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+09289024
[ 34] 0x00007f1b07d0b8b6 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11581622
[ 35] 0x00007f1b07df5da2 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+12541346
[ 36] 0x00007f1b07df6264 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+12542564
[ 37] 0x00007f1b07df637d /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+12542845
[ 38] 0x00007f1b1a396df0 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_dispatcher.so+01236464 _ZN8Mfh_file20dispatch_file_commonEMS_FviPP11mxArray_tagiS2_EiS2_iS2_+00000208
[ 39] 0x00007f1b1a398a02 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_dispatcher.so+01243650 _ZN8Mfh_file19dispatch_with_reuseEiPP11mxArray_tagiS2_+00000306
[ 40] 0x00007f1ae1ee41ca /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+05128650
[ 41] 0x00007f1ae1e640cf /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+04604111
[ 42] 0x00007f1ae1e668ec /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+04614380
[ 43] 0x00007f1ae1e6cc49 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+04639817
[ 44] 0x00007f1ae1e650d5 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+04608213
[ 45] 0x00007f1ae1fb528f /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+05984911
[ 46] 0x00007f1ae1fb1872 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcos_impl.so+05970034
[ 47] 0x00007f1b1a3069da /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_dispatcher.so+00645594 _ZN18Mfh_MATLAB_fn_impl19dispatch_with_reuseEiPP11mxArray_tagiS2_+00000266
[ 48] 0x00007f1b07f7cd9e /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+14142878
[ 49] 0x00007f1b07f81125 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+14160165
[ 50] 0x00007f1b07f7cef5 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+14143221
[ 51] 0x00007f1b07f8687f /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+14182527
[ 52] 0x00007f1b07e097d8 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+12621784
[ 53] 0x00007f1b07f548eb /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13977835
[ 54] 0x00007f1b07ee3f3d /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13516605
[ 55] 0x00007f1b07ee5eb0 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+13524656
[ 56] 0x00007f1b079abdc0 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08043968
[ 57] 0x00007f1b079adde4 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08052196
[ 58] 0x00007f1b079aae71 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08040049
[ 59] 0x00007f1b079a0d25 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+07998757
[ 60] 0x00007f1b079a1211 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08000017
[ 61] 0x00007f1b079aa6ba /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08038074
[ 62] 0x00007f1b079aa7b6 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+08038326
[ 63] 0x00007f1b07ad8e1b /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+09276955
[ 64] 0x00007f1b07adbd40 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+09289024
[ 65] 0x00007f1b07d0b8b6 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11581622
[ 66] 0x00007f1b07cb784c /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11237452
[ 67] 0x00007f1b07cb850c /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11240716
[ 68] 0x00007f1b07d59a64 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11901540
[ 69] 0x00007f1b07d59c29 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwm_lxe.so+11901993
[ 70] 0x00007f1b1bb53489   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00595081
[ 71] 0x00007f1b1bbb3762   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00989026 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000642
[ 72] 0x00007f1a91b6f31c /usr/local/MATLAB/R2021b/bin/glnxa64/libnativejmi.so+01008412 _ZN9nativejmi17JmiUserEvalPlugin7executeEP15inWorkSpace_tag+00000028
[ 73] 0x00007f1b1bb8ebdf   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00838623
[ 74] 0x00007f1b1bb9a846   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00886854
[ 75] 0x00007f1b1bb5e516   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00640278
[ 76] 0x00007f1b1c9ccc02 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwbridge.so+00302082
[ 77] 0x00007f1b1c9cd543 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwbridge.so+00304451
[ 78] 0x00007f1b1c9d37f2 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwbridge.so+00329714 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEES4_EE+00000274
[ 79] 0x00007f1b1c9d3a92 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwbridge.so+00330386 _Z8mnParserv+00000482
[ 80] 0x00007f1b1b774307   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcr.so+00946951
[ 81] 0x00007f1b256b3bd0   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmvm.so+02833360 _ZNK7mwboost9function0IvEclEv+00000032
[ 82] 0x00007f1b256bba10   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmvm.so+02865680 _ZN14cmddistributor15PackagedTaskIIP10invokeFuncIN7mwboost8functionIFvvEEEEENS2_10shared_ptrINS2_13unique_futureIDTclfp_EEEEEERKT_+00000048
[ 83] 0x00007f1b256bbab8   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmvm.so+02865848 _ZNSt17_Function_handlerIFN7mwboost3anyEvEZN14cmddistributor15PackagedTaskIIP10createFuncINS0_8functionIFvvEEEEESt8functionIS2_ET_EUlvE_E9_M_invokeERKSt9_Any_data+00000024
[ 84] 0x00007f1b1bbaf14b   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00971083 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000091
[ 85] 0x00007f1b1b771f65   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcr.so+00937829
[ 86] 0x00007f1b1bb8ebdf   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00838623
[ 87] 0x00007f1b1bb5c3cc   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00631756
[ 88] 0x00007f1b1bb5ce60   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwiqm.so+00634464
[ 89] 0x00007f1b1b75c30e   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcr.so+00848654
[ 90] 0x00007f1b1b75c92c   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcr.so+00850220
[ 91] 0x00007f1b1b75cba2   /usr/local/MATLAB/R2021b/bin/glnxa64/libmwmcr.so+00850850
[ 92] 0x00007f1b2360f8a7 /usr/local/MATLAB/R2021b/bin/glnxa64/libmwboost_thread.so.1.72.0+00063655
[ 93] 0x00007f1b242969cb                                 /usr/lib/libc.so.6+00616907
[ 94] 0x00007f1b2431aa0c                                 /usr/lib/libc.so.6+01157644

I did not try to increase OMP_STACKSIZE because I don't know how.
Could it be that this is another one of the problems where the system libraries don't play nice with the libraries that have been shipped with matlab?

Thanks a lot for the help!

Offline

#3 Yesterday 12:16:40

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

Hi Seth,

thanks a lot for the quick reply. We tried your suggestion in multiple ways, both from the shell as well as using Matlab's functionality directly (see details below). Unfortunately, no success. Whenever Matlab decides it should do some computation in parallel (not just parfor loops but also just any matrix computation), it crashes with the described error. To me, it looks like the used libraries might be the problem?

Details on what we tried, all resulting in the same crash report:

export KMP_STACKSIZE=1G
ulimit -s unlimited
matlab -nodesktop -nosplash
  getenv("KMP_STACKSIZE")

ans =

    '512k
  setenv("KMP_STACKSIZE", "1G")  
  MSOT_navigation  
export KMP_STACKSIZE=1G
  matlab -nodesktop -nosplash
  getenv("KMP_STACKSIZE")

ans =

    '512k'
matlab -nodesktop -nosplash
  setenv("KMP_STACKSIZE", "1G")
  MSOT_navigation
matlab -nodesktop -nosplash
  setenv("OMP_STACKSIZE", "525440B")
  getenv("OMP_STACKSIZE")           

  ans =

      '525440B'

  MSOT_navigation
matlab -nodesktop -nosplash
  getenv("OMP_STACKSIZE")
  ans =

    0x0 empty char array

  >> getenv("KMP_STACKSIZE")

    ans =

        '512k'

matlab -nodesktop -nosplash
  MSOT_navigation

informed from: https://hpc-tutorials.llnl.gov/openmp/t … d_binding/

bash
  export OMP_STACKSIZE=525440B
  export KMP_STACKSIZE=525440B
  ulimit -s unlimited
  matlab -nodesktop -nosplash
    OMP: Warning #182: OMP_STACKSIZE: ignored because KMP_STACKSIZE has been defined
    >> getenv("OMP_STACKSIZE")

    ans =

    '525440B'

    >> getenv("KMP_STACKSIZE")

    ans =

      '512k'
    setenv("KMP_STACKSIZE", "525440B")
    MSOT_navigation
bash
  export OMP_STACKSIZE=525440B
  ulimit -s unlimited
  matlab -nodesktop -nosplash
    OMP: Warning #182: OMP_STACKSIZE: ignored because KMP_STACKSIZE has been defined
    >> getenv("OMP_STACKSIZE")

    ans =

    '525440B'

    >> getenv("KMP_STACKSIZE")

    ans =

      '512k'
    MSOT_navigation
bash
  export KMP_STACKSIZE=525440B
  matlab -nodesktop -nosplash
    MSOT_navigation
      matlab crashed anyways


matlab -nodesktop -nosplash
  setenv("KMP_STACKSIZE", "525440B")
  MSOT_navigation
  matlab crashed anyways

getenv('KMP_STACKSIZE')
512k

bash
  export OMP_STACKSIZE=12000000
  ulimit -s unlimited
  matlab -nodesktop -nosplash
    MSOT_navigation
bash
  export KMP_STACKSIZE=12000000
  ulimit -s unlimited
  matlab -nodesktop -nosplash
    MSOT_navigation
      

__________________________________________________________________________________
Edit:
I found that my system does not have its own libiomp5.so but that one non-matlab one exists in

/opt/intel/oneapi/compiler/2025.0/lib/libiomp5.so

So I tried to use that one instead of the matlab one using

LD_PRELOAD=/opt/intel/oneapi/compiler/2025.0/lib/libiomp5.so

but this also results in the crash with the crash report correctly indicating the use of the library file defined via LD_PRELOAD.
I also did not find a better way to get the libiomp5.so from somewhere else. the oneapi pacman package was the only thing I found that supplies it.

Potentially related to the recent glibc changes (and other problems with matlab)?

Last edited by trylukas (Yesterday 14:07:40)

Offline

#4 Yesterday 15:01:50

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

unset KMP_STACKSIZE
export OMP_STACKSIZE=1048576
ulimit -s unlimited
matlab -nodesktop -nosplash

Does matlab then still complain about OMP_STACKSIZE or ulimit??

Offline

#5 Yesterday 15:17:58

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

Thanks for the help but yes, same error.

interestingly though a new complaint before is

OMP: Warning #181 OMP_STACKSIZE: ignored because KMP_STACKSIZE has been defined

Not sure where this is set because it is not in the matlab script (searched for both STACKSIZE terms).
I've definitely never touched the stacksize so it must be defined by matlab somehow.

I can change it in Matlab using

setenv('KMP_STACKSIZE','$value')

but that might be too late? In any case, I tried that without success.

Offline

#6 Yesterday 18:36:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

Did you "unset KMP_STACKSIZE" before running matlab?
Idk how matlab is implemented, but otherwise try

unsetenv('KMP_STACKSIZE')

It's weird that it complains about the shell stack and tells you to increase OMP_STACKSIZE but then goes to ignore both…

Offline

#7 Yesterday 18:55:28

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

yes, I tried "unset KMP_STACKSIZE" and matlab happily ignores it:

getenv('KMP_STACKSIZE')

ans =

    '512k'

meanwhile

unsetenv('KMP_STACKSIZE')

works as intended:

 unsetenv('KMP_STACKSIZE')
>> getenv('KMP_STACKSIZE')

ans =

  0×0 empty char array

but minimal example of a simple QR decomposition still crashes.
Unfortunately there's not much hope from the Matlab/MathWorks side due to the unsupported distro.
This also used to work until the recent update that is why I think it might be related to some glibc upgrade.
I can try a temporary roll-back but know this is not a permanent solution, especially for such important libraries.

Offline

#8 Yesterday 19:55:06

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

setenv('KMP_STACKSIZE','8192k)

?

This also used to work until the recent update that is why I think it might be related to some glibc upgrade.

There've been several matlab-threads over the past months, but they're all about TLS (and registering the version)

Offline

#9 Today 06:20:47

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

setenv('KMP_STACKSIZE','8192k')

also results in the segfault.

There've been several matlab-threads over the past months, but they're all about TLS (and registering the version)

Yes, I'm aware of those and that's how I got this idea, together with seeing that the stack trace includes some references to

/usr/lib/libc.so.6

but this is just an idea and if you don't see a connection I certainly believe it!

Offline

#10 Today 07:09:21

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

/usr/lib/libc.so.6+00152954 abort+00000038

Something in sys/os/glnxa64/libiomp5.so called https://man.archlinux.org/man/abort.3 - that's why you're ending in libc and it's a "controlled crash™" - and it's unlikely to be the remaining issue because that's the "Hint Try increasing OMP_STACKSIZE or the shell stack limit." thing.
Can you post the updated stack trace?

Offline

#11 Today 07:28:05

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

Something in sys/os/glnxa64/libiomp5.so called https://man.archlinux.org/man/abort.3 - that's why you're ending in libc and it's a "controlled crash™"

Ah I see, thanks for the explanation!

Setting KMP_STACKSIZE within Matlab

setenv('KMP_STACKSIZE','8192k')
getenv('KMP_STACKSIZE')
ans =

    '8192k'

gives the stack trace

MATLAB Log File: /home/glandorfl/matlab_crash_dump.65990-1

------------------------------------------------
MATLAB Log File
------------------------------------------------ 


--------------------------------------------------------------------------------
                 abort() detected at 2025-10-21 09:33:04 +0200
--------------------------------------------------------------------------------

Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : UTF-8
  Deployed                 : false
  GNU C Library            : 2.42 stable
  Graphics Driver          : Uninitialized software 
  Graphics card 1          : 0x10de ( 0x10de ) 0x2204 Version 580.95.5.0 (0-0-0)
  Java Version             : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : glnxa64
  MATLAB Entitlement ID    : 1971833
  MATLAB Root              : /usr/local/MATLAB/R2022b
  MATLAB Version           : 9.13.0.2049777 (R2022b)
  OpenGL                   : software
  Operating System         : Linux 6.12.53-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 15 Oct 2025 11:05:48 +0000 x86_64
  Process ID               : 65990
  Processor ID             : x86 Family 23 Model 113 Stepping 0, AuthenticAMD
  Session Key              : 80fb8941-a223-4f8c-a5d2-1fb31bdb255c
  Window System            : The X.Org Foundation (12101015), display redqueen:15.0

Fault Count: 1


Abnormal termination:
abort()

Current Thread: 'MCR 0 interpret' id 12071877998272

Register State (from fault):
  RAX = 0000000000000000  RBX = 000000000001020c
  RCX = 00000afafd09894c  RDX = 0000000000000006
  RSP = 00000afab3fe5900  RBP = 00000afab3fe5940
  RSI = 000000000001020c  RDI = 00000000000101c6

   R8 = 0000000000000018   R9 = 0000000000000000
  R10 = 0000000000000000  R11 = 0000000000000246
  R12 = 00000afad95d3a78  R13 = 00000afaaca42400
  R14 = 0000000000000006  R15 = 00000afad95d3988

  RIP = 00000afafd09894c  EFL = 0000000000000246

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00000afafd09894c                                 /usr/lib/libc.so.6+00624972
[  1] 0x00000afafd03e410                                 /usr/lib/libc.so.6+00254992 gsignal+00000032
[  2] 0x00000afafd02557a                                 /usr/lib/libc.so.6+00152954 abort+00000038
[  3] 0x00000afad92bd7f7 /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00776183
[  4] 0x00000afad92a7abb /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00686779
[  5] 0x00000afad93314dc /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+01250524
[  6] 0x00000afad92b15fa /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00726522
[  7] 0x00000afad92b7efd /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00753405
[  8] 0x00000afad92b562f /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00742959 __kmp_fork_call+00004335
[  9] 0x00000afad9278533 /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00492851 __kmpc_fork_call+00000387
[ 10] 0x00000af76a15d96b        /usr/local/MATLAB/R2022b/bin/glnxa64/mkl.so+05626219 mkl_lapack_dgeqrf+00006635
[ 11] 0x00000af769fb5b64        /usr/local/MATLAB/R2022b/bin/glnxa64/mkl.so+03890020 DGEQRF+00000196
[ 12] 0x00000afae0494c50 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02706512
[ 13] 0x00000afae04956d2 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02709202
[ 14] 0x00000afae048e658 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02680408 _Z15mathlinalgQRFcniPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPKS0_+00000344
[ 15] 0x00000af7cdb9ffef /usr/local/MATLAB/R2022b/bin/glnxa64/builtins/mathlinalg/mwlibmwmathlinalg_builtinimpl.so+00778223
[ 16] 0x00000afaf4302da4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_dispatcher.so+00785828
[ 17] 0x00000afaf4305aa8 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_dispatcher.so+00797352
[ 18] 0x00000afaf28225e4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02237924
[ 19] 0x00000afae11e4a9a /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+10373786
[ 20] 0x00000afae11e4dd3 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+10374611
[ 21] 0x00000afae11747d2 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+09914322
[ 22] 0x00000afae0edd3c0 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07197632
[ 23] 0x00000afae0edf6b4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07206580
[ 24] 0x00000afae0edcbf9 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195641
[ 25] 0x00000afae0eee55f /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07267679
[ 26] 0x00000afae0eeefd9 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07270361
[ 27] 0x00000afae0edca14 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195156
[ 28] 0x00000afae0edcb06 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195398
[ 29] 0x00000afae100b4ee /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+08434926
[ 30] 0x00000afae100f461 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+08451169
[ 31] 0x00000afaf2978688 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03638920
[ 32] 0x00000afaf287bebf /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02604735
[ 33] 0x00000afaf2882bf7 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02632695
[ 34] 0x00000afaf2928685 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03311237
[ 35] 0x00000afaf2928aee /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03312366
[ 36] 0x00000afaf4fb49a2   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+01005986 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000754
[ 37] 0x00000af9f5a6d51c /usr/local/MATLAB/R2022b/bin/glnxa64/libnativejmi.so+00996636 _ZN9nativejmi17JmiUserEvalPlugin7executeEP15inWorkSpace_tag+00000028
[ 38] 0x00000afaf4f8f44e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00853070
[ 39] 0x00000afaf4f5bce2   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00642274
[ 40] 0x00000afaf3ea86f1 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00493297
[ 41] 0x00000afaf3ea8af3 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00494323
[ 42] 0x00000afaf3ec3c32 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00605234 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEES4_EE+00000210
[ 43] 0x00000afaf3ec3e73 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00605811 _Z8mnParserv+00000435
[ 44] 0x00000afaf4770baf   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00879535
[ 45] 0x00000afafe4b523d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmvm.so+02839101 _ZN14cmddistributor15PackagedTaskIIP10invokeFuncIN7mwboost8functionIFvvEEEEENS2_10shared_ptrINS2_13unique_futureIDTclfp_EEEEEERKT_+00000061
[ 46] 0x00000afafe4b5339   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmvm.so+02839353 _ZNSt17_Function_handlerIFN7mwboost3anyEvEZN14cmddistributor15PackagedTaskIIP10createFuncINS0_8functionIFvvEEEEESt8functionIS2_ET_EUlvE_E9_M_invokeERKSt9_Any_data+00000025
[ 47] 0x00000afaf4fae99d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00981405 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000093
[ 48] 0x00000afaf476c3b5   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00861109
[ 49] 0x00000afaf4f8f44e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00853070
[ 50] 0x00000afaf4f5a052   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00634962
[ 51] 0x00000afaf4f5a9c3   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00637379
[ 52] 0x00000afaf475ba3e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00793150
[ 53] 0x00000afaf475b635   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00792117
[ 54] 0x00000afaf475b88d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00792717
[ 55] 0x00000afafc00942f /usr/local/MATLAB/R2022b/bin/glnxa64/libmwboost_thread.so.1.75.0+00037935
[ 56] 0x00000afafd0969cb                                 /usr/lib/libc.so.6+00616907
[ 57] 0x00000afafd11aa0c                                 /usr/lib/libc.so.6+01157644

Offline

#12 Today 09:37:44

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

Aborts out of the exact same stack position as in the OP - you're no longer getting any errors from that??
What if you raise the KMP_STACKSIZE (and OMP_STACKSIZE) to  32768k ?

Offline

#13 Today 10:27:47

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

Aborts out of the exact same stack position as in the OP - you're no longer getting any errors from that??

not 100% sure what you mean but I do still get the OMP: Error #29... from that exactly as before. Not sure why matlab didn't put it in the crash report but it still outputs in in the console that I run matlab from.

What if you raise the KMP_STACKSIZE (and OMP_STACKSIZE) to  32768k ?

setting OMP_STACKSIZE in the terminal via export OMP_STACKSIZE=32768k (and unsetting KMP_STACKSIZE) still results in the same warning that OMP_STACKSIZE is ignored. After starting Matlab, setting KMP_STACKSIZE and then running QR decomposition still results in the same error (with the same stack trace and the same OMP Error #29, System Error #22 and Hint to increase OMP_STACKSIZE.

Offline

#14 Today 13:16:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,242

Re: Matlab segfaults with OMP Errors

The idea was to

setenv('OMP_STACKSIZE','32768k')
setenv('KMP_STACKSIZE','32768k')

in matlab
525440 is btw. only 513.125k …

Alternative path:
Did "unsetenv('KMP_STACKSIZE')" still get you the original error (and stack trace)?
Matlab might just end up insufficiently raising OMP_STACKSIZE (when it previously tries and fails to set that to 525440) - so change that and replace 525440 (or the variable) w/ a randomly huge value (after unsetting KMP_STACKSIZE to pave the way for OMP_STACKSIZE

Are you sure this has started with an update (glibc or otherwise) and not a system/config change?
Maybe the intel oneapi installation?

Offline

#15 Today 13:45:40

trylukas
Member
Registered: 2024-09-27
Posts: 21

Re: Matlab segfaults with OMP Errors

in matlab
525440 is btw. only 513.125k …

oh damn, sorry about that! Tried the correct way and still the same problem:

getenv('KMP_STACKSIZE')

ans =

    '512k'

unsetenv('KMP_STACKSIZE')
getenv('KMP_STACKSIZE')

ans =

  0×0 empty char array

getenv('OMP_STACKSIZE')

ans =

    '32.768k'

results in the same OMP error #29 (but the correct OMP_STACKSIZE as set in the terminal):

MATLAB Log File: /home/glandorfl/matlab_crash_dump.81514-1

------------------------------------------------
MATLAB Log File
------------------------------------------------ 


--------------------------------------------------------------------------------
                 abort() detected at 2025-10-21 15:32:38 +0200
--------------------------------------------------------------------------------

Configuration:
  Crash Decoding           : Disabled - No sandbox or build area path
  Crash Mode               : continue (default)
  Default Encoding         : UTF-8
  Deployed                 : false
  GNU C Library            : 2.42 stable
  Graphics Driver          : Uninitialized software 
  Graphics card 1          : 0x10de ( 0x10de ) 0x2204 Version 580.95.5.0 (0-0-0)
  Java Version             : Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  MATLAB Architecture      : glnxa64
  MATLAB Entitlement ID    : 1971833
  MATLAB Root              : /usr/local/MATLAB/R2022b
  MATLAB Version           : 9.13.0.2049777 (R2022b)
  OpenGL                   : software
  Operating System         : Linux 6.12.53-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 15 Oct 2025 11:05:48 +0000 x86_64
  Process ID               : 81514
  Processor ID             : x86 Family 23 Model 113 Stepping 0, AuthenticAMD
  Session Key              : 97c65589-f2a9-43bd-9afc-62fbf57d327b
  Window System            : The X.Org Foundation (12101015), display redqueen:15.0

Fault Count: 1


Abnormal termination:
abort()

Current Thread: 'MCR 0 interpret' id 15058692208320

Register State (from fault):
  RAX = 0000000000000000  RBX = 0000000000013eae
  RCX = 00000db26849894c  RDX = 0000000000000006
  RSP = 00000db21ffe5900  RBP = 00000db21ffe5940
  RSI = 0000000000013eae  RDI = 0000000000013e6a

   R8 = 0000000000000018   R9 = 0000000000000000
  R10 = 0000000000000000  R11 = 0000000000000246
  R12 = 00000db2447d3a78  R13 = 00000db260c4e400
  R14 = 0000000000000006  R15 = 00000db2447d3988

  RIP = 00000db26849894c  EFL = 0000000000000246

   CS = 0033   FS = 0000   GS = 0000

Stack Trace (from fault):
[  0] 0x00000db26849894c                                 /usr/lib/libc.so.6+00624972
[  1] 0x00000db26843e410                                 /usr/lib/libc.so.6+00254992 gsignal+00000032
[  2] 0x00000db26842557a                                 /usr/lib/libc.so.6+00152954 abort+00000038
[  3] 0x00000db2444bd7f7 /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00776183
[  4] 0x00000db2444a7abb /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00686779
[  5] 0x00000db2445314dc /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+01250524
[  6] 0x00000db2444b15fa /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00726522
[  7] 0x00000db2444b7efd /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00753405
[  8] 0x00000db2444b562f /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00742959 __kmp_fork_call+00004335
[  9] 0x00000db244478533 /usr/local/MATLAB/R2022b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00492851 __kmpc_fork_call+00000387
[ 10] 0x00000daed295d96b        /usr/local/MATLAB/R2022b/bin/glnxa64/mkl.so+05626219 mkl_lapack_dgeqrf+00006635
[ 11] 0x00000daed27b5b64        /usr/local/MATLAB/R2022b/bin/glnxa64/mkl.so+03890020 DGEQRF+00000196
[ 12] 0x00000db246294c50 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02706512
[ 13] 0x00000db2462956d2 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02709202
[ 14] 0x00000db24628e658 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmathlinalg.so+02680408 _Z15mathlinalgQRFcniPSt10unique_ptrI11mxArray_tagN6matrix6detail17mxDestroy_deleterEEiPPKS0_+00000344
[ 15] 0x00000db0000dafef /usr/local/MATLAB/R2022b/bin/glnxa64/builtins/mathlinalg/mwlibmwmathlinalg_builtinimpl.so+00778223
[ 16] 0x00000db25f302da4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_dispatcher.so+00785828
[ 17] 0x00000db25f305aa8 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_dispatcher.so+00797352
[ 18] 0x00000db25dc225e4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02237924
[ 19] 0x00000db24d1e4a9a /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+10373786
[ 20] 0x00000db24d1e4dd3 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+10374611
[ 21] 0x00000db24d1747d2 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+09914322
[ 22] 0x00000db24cedd3c0 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07197632
[ 23] 0x00000db24cedf6b4 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07206580
[ 24] 0x00000db24cedcbf9 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195641
[ 25] 0x00000db24ceee55f /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07267679
[ 26] 0x00000db24ceeefd9 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07270361
[ 27] 0x00000db24cedca14 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195156
[ 28] 0x00000db24cedcb06 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+07195398
[ 29] 0x00000db24d00b4ee /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+08434926
[ 30] 0x00000db24d00f461 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwm_lxe.so+08451169
[ 31] 0x00000db25dd78688 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03638920
[ 32] 0x00000db25dc7bebf /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02604735
[ 33] 0x00000db25dc82bf7 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+02632695
[ 34] 0x00000db25dd28685 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03311237
[ 35] 0x00000db25dd28aee /usr/local/MATLAB/R2022b/bin/glnxa64/libmwlxemainservices.so+03312366
[ 36] 0x00000db25fbb49a2   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+01005986 _ZN3iqm14UserEvalPlugin7executeEP15inWorkSpace_tag+00000754
[ 37] 0x00000db18039251c /usr/local/MATLAB/R2022b/bin/glnxa64/libnativejmi.so+00996636 _ZN9nativejmi17JmiUserEvalPlugin7executeEP15inWorkSpace_tag+00000028
[ 38] 0x00000db25fb8f44e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00853070
[ 39] 0x00000db25fb5bce2   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00642274
[ 40] 0x00000db25e2ab6f1 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00493297
[ 41] 0x00000db25e2abaf3 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00494323
[ 42] 0x00000db25e2c6c32 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00605234 _Z22mnGetCommandLineBufferbRbN7mwboost8optionalIKP15inWorkSpace_tagEEbRKNS0_9function2IN6mlutil14cmddistributor17inExecutionStatusERKNSt7__cxx1112basic_stringIDsSt11char_traitsIDsESaIDsEEES4_EE+00000210
[ 43] 0x00000db25e2c6e73 /usr/local/MATLAB/R2022b/bin/glnxa64/libmwbridge.so+00605811 _Z8mnParserv+00000435
[ 44] 0x00000db25f770baf   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00879535
[ 45] 0x00000db2698b523d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmvm.so+02839101 _ZN14cmddistributor15PackagedTaskIIP10invokeFuncIN7mwboost8functionIFvvEEEEENS2_10shared_ptrINS2_13unique_futureIDTclfp_EEEEEERKT_+00000061
[ 46] 0x00000db2698b5339   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmvm.so+02839353 _ZNSt17_Function_handlerIFN7mwboost3anyEvEZN14cmddistributor15PackagedTaskIIP10createFuncINS0_8functionIFvvEEEEESt8functionIS2_ET_EUlvE_E9_M_invokeERKSt9_Any_data+00000025
[ 47] 0x00000db25fbae99d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00981405 _ZN3iqm18PackagedTaskPlugin7executeEP15inWorkSpace_tag+00000093
[ 48] 0x00000db25f76c3b5   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00861109
[ 49] 0x00000db25fb8f44e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00853070
[ 50] 0x00000db25fb5a052   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00634962
[ 51] 0x00000db25fb5a9c3   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwiqm.so+00637379
[ 52] 0x00000db25f75ba3e   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00793150
[ 53] 0x00000db25f75b635   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00792117
[ 54] 0x00000db25f75b88d   /usr/local/MATLAB/R2022b/bin/glnxa64/libmwmcr.so+00792717
[ 55] 0x00000db26740942f /usr/local/MATLAB/R2022b/bin/glnxa64/libmwboost_thread.so.1.75.0+00037935
[ 56] 0x00000db2684969cb                                 /usr/lib/libc.so.6+00616907
[ 57] 0x00000db26851aa0c                                 /usr/lib/libc.so.6+01157644

Did "unsetenv('KMP_STACKSIZE')" still get you the original error (and stack trace)?
Matlab might just end up insufficiently raising OMP_STACKSIZE (when it previously tries and fails to set that to 525440) - so change that and replace 525440 (or the variable) w/ a randomly huge value (after unsetting KMP_STACKSIZE to pave the way for OMP_STACKSIZE

unfortunately, that also fails with the large number below being the OMP_STACKSIZE as set in the terminal:

unsetenv('KMP_STACKSIZE')
getenv('KMP_STACKSIZE')
getenv('OMP_STACKSIZE')

ans =

  0×0 empty char array


ans =

    '3276845655'

Maybe the intel oneapi installation?

uninstalled the intel oneapi, still same problem. Also, the 3 other workstations with the same problem don't have it installed.

Are you sure this has started with an update (glibc or otherwise) and not a system/config change?

Yes, I am sure because the problem is persistent through all 4 workstations (all up-to-date linux-lts) and across users. I also know that for the one I am using everything was working, I did a pacman -Syu update and restart - that's when the problems started. So unless the pacman update can also ship system/config changes, I don't see how it could be so persistent across machines.


--------------------------------------------------------------------
Edit: Just got an email from MathWorks support that gives some initial tips (but nothing I haven't tried) but importantly should give better openMP debug output

As far as I see this could be caused by OMP or KMP environment variables which are set before starting MATLAB. These can unexpectedly overwrite the MATLAB settings and cause unexpected issues.

Can you please check the environment variables and remove these and see if this fixes the issue?

If you want to get OpenMP debug info you can set this environment variable:
KMP_SETTINGS=1

and share the info with me if the above steps to remove the environment variables do not help.

I will try everything as suggested later and report back. No need to make new suggestions until then! Thanks again for the help so far

Last edited by trylukas (Today 15:33:07)

Offline

Board footer

Powered by FluxBB