Matlab throws Java errors when opening help or internal browser

Steps to reproduce: (1) Open Matlab (from Applications menu or from command line inside/outside business development environment) (2) Start help or other browser by - clicking on the ?-button - writing text into the search box and hitting return - launching help via "doc" command - launching Matlab browser via "web" command (3) be patient (4) observe java error in Matlab command window (first two lines copied in comments below.
JAVA Errors
Exception in thread "IPC Process Thread" java.lang.UnsatisfiedLinkError: /tmp/jxbrowser-chromium-43.0.2357.52.5.4.2/data/Temp/libjxbrowser-common-bb1e7de8-881a-4116-9d68-bbf84270f365.so: /tmp/jxbrowser-chromium-43.0.2357.52.5.4.2/data/Temp/libjxbrowser-common-bb1e7de8-881a-4116-9d68-bbf84270f365.so: failed to map segment from shared object: Operation not permitted

3 Comments

I have this problem too, failed to map segment from shared object: Operation not permitted.
There are two suggestions from this thread that helped: Changing the webrenderer to basic solves the problem, but then the help doc isn't as nice (It doesn't have a pane to limit searches just to Matlab and not all the toolboxes and simulink).
webutils.htmlrenderer(basic);
Changing the version of the renderer works and still looks pretty:
com.mathworks.mlwidgets.html.HtmlComponentFactory.setDefaultType('HTMLPANEL');
I don't think this is entirely a problem about permissions. If I don't change these variables thus causing the problem to display, then ensuring that the /tmp directory is writable by everybody does not solve the problem. I looked in the /tmp directory and see /tmp/jxbrowser-chromium-bunchofnumbers and it has permissions for me and my group to read and write to it (and I also tried changing so everybody could read/write to it and that does not solve the problem). Every time I run the help function (while my rendering engine is chromium) it creates a new shared object, /tmp/jxbrowser-chromium-bunch.of.numbers/data/Temp/libjxbrowser-common-bunch-of-hex-numbers.so. The new object has permissions when made that give the owner (me) read and write access to it. The group has read but not write access to it. Nobody else has access to it.
On a newer computer where the documentation works fine, Directories called "Cache" and "Memory" get made in /tmp/jxbrowser.../data, in addition to the directory "Temp" that gets made by the older computer, and they are readable and writable by all without me doing anything. So there are some slight differences in the permissions, but messing with them doesn't seem to be the answer.
This is an older computer, and I also get the message when I start up that its using software OpenGL rendering, so maybe this is related? When I run matlab on the newer machine I get neither the software rendering message nor the problem with the help documentation browser.
If it helps anyone, this error occurs when /tmp is mounted noexec, as it should be for security reasons.
It's the same reason the installer fails with default arguments: it tries to execute the installer from /tmp after copying it there from the CD.
I have this problem on Linux, and it does appear to be permissions, even though it's not obvious (since /tmp is open to all). I made a little tmp directory in my home area for matlab to use and this worked. See the linked thread for how to do this.

Sign in to comment.

Answers (1)

Hi George,
Based on the exception, it seems likely this is being caused by you not having write permission for your temp directory.
JxBrowser (which MATLAB uses for internal browser displays, including the Doc) needs permission to write to your temp directory in order to function properly.
Try changing your permissions for your temp directory (/tmp) to include write permission, and then see if you can use the Documentation properly.

1 Comment

You are asking folks to explicilty violate defined corporate security parameters and policies. That's a problem.

Sign in to comment.

Categories

Tags

Asked:

on 14 Nov 2017

Commented:

on 17 Feb 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!