"library initialization failed - unable to allocate file descriptor table - out of memory MATLAB is exiting because of fatal error"
Show older comments
Hi!
I'm a Linux user and today I started receiving the following error message when launching MATLAB:
MATLAB is selecting SOFTWARE OPENGL rendering.
library initialization failed - unable to allocate file descriptor table - out of memory
MATLAB is exiting because of fatal error
[1] 10520 killed matlab
It was working correctly until now, not sure it could have something to do with a software update. However, if I execute matlab with the -nojvm flag it opens the console properly.
I'm using MATLAB R2023a in Debian trixie kernel version 6.7.12.
Thanks for your help!
Accepted Answer
More Answers (3)
Adailton Júnior
on 11 Jun 2024
1 vote
The same here.
Until last week it worked fine. I tried to open it today and got the same error.
OS: Debian GNU/Linux trixie/sid x86_64
Host: G3 3500
Kernel: 6.7.12-amd64
Uptime: 11 hours, 48 mins
Packages: 4131 (dpkg), 17 (flatpak), 15 (snap)
Shell: bash 5.2.21
Resolution: 1920x1080
DE: Plasma 5.27.11
WM: kwin
Theme: [Plasma], Breeze [GTK2/3]
Icons: [Plasma], breeze [GTK2/3]
Terminal: terminator
CPU: Intel i5-10300H (8) @ 4.500GHz
GPU: NVIDIA GeForce GTX 1650 Ti Mobile
GPU: Intel CometLake-H GT2 [UHD Graphics]
Memory: 4237MiB / 7742MiB
2 Comments
alberto maurizi
on 14 Jun 2024
It also happened here. It must be related to some debian/sid upgrade. But which one?
What seems clear enough is that it is related to java. But from the @Alberto Fernández Pena solution it is not clear enough (to me, at least) what to do .
Adailton Júnior
on 14 Jun 2024
Shivani
on 11 Jun 2024
0 votes
You may be encountering this issue due to a recognized bug in the software. This bug has been resolved starting with MATLAB R2016b. However, as part of your troubleshooting efforts, it might be beneficial to explore the workarounds provided in the External Bug Report. You can access the External Bug Report via the following link: https://www.mathworks.com/support/bugreports/1297894?s_tid=mwa_osa_a
Additionally, you can refer to the following MATLAB Answer thread that addresses a similar issue: https://www.mathworks.com/matlabcentral/answers/337113-error-matlab-is-selecting-software-opengl-rendering
If the workarounds provided in the above links do not resolve the issue, then please contact the MathWorks Technical Support Team through the following link, as they will be able to provide an accurate resolution for this error.
1 Comment
Alberto Fernández Pena
on 11 Jun 2024
Calum
on 15 Oct 2024
0 votes
Coming back because I couldn't figure out an elegant fix. The problem isn't (contrary to what you might think with ulimit) a lack of file descriptors. Rather, it is an excess. Matlab apparently 1) raises the soft limit of file descriptors to whatever the hard limit is (a lot), and then 2) attempts to allocate a table of every single one of those descriptors that is available.
On my system, the hard limit for file descriptors is 1,073,741,816. Obviously, that is too many for matlab to use. They should probably look at fixing this bug.
The ulimit -n solution works because ulimit changes both the hard and soft limits by default. You just need to make sure it is run every time Matlab is, for instance by putting it in the matlab shell file.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!