Coreform 202x Segmentation faults (Ubuntu 18.04)

Good morning Community,

we got every time segmentation faults when we try to run Coreform Cubit 2021.x onto Ubuntu 18.04.5 LTS.

We have tested it with minor version 3, 4 and 5 and onto two similar installed PCs with Ubuntu 18.04 and we tried the .tar.gz either the .deb package.
We have installed/ reinstalled the several packages for GUI usage named in your readme.txt.

In contrast to the PCs named above, we didn´t have problem within installing and running Cubit onto a Ubuntu 18.04 and 20.04 virtual machine. The PCs have a dedicated NVIDIA graphic card installed, the driver is the Ubuntu proprietary, so maybe there could be something with the QT and graphic card/ driver, in my opinion.

./coreform_cubit

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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Aborted (core dumped)

An older Cubit 2020.2 installation onto the same PC was working well the last time, but now it won´t work and it aborts with the same error message.

A mail to Coreform support with the trace has been already sent, but maybe you have another ideas.

If you need more information, please don´t hesitate to contact.

Thank you in advance.

Yours sincerely,
Christian Bänsch

@Christian Welcome to the forum! We’re sorry you’re having issues. I’ve looked at your strace, and this line seems to be the problem:

access("/home/iwtm009/.Xauthority", R_OK) = -1 EACCES (Permission denied)

Did you execute a GUI program as root on that machine? You’ll need to reset the owner and permissions of the .Xauthority file back to the iwtm009 user.

Hi,

thank you for your answer.Indeed I ran it as root on that machine, while logged in as another user. Today I´ve reset this configuration and recreate the .Xauthority file for the iwtm009 user.

Immediately following that I try to run Cubit 2021.5 as the iwtm009 user without success.
To test it with another user I tried to run it with a local account ltmadmin, but also without success.

Unfortunately I can´t upload the current trace files here at the moment, here´s a link to my cloud space. There are both trace files as a zip for further investigation.

https://faubox.rrze.uni-erlangen.de/getlink/fiB4FukBqJx1nTsqmd76kCxp/debug_cubit.zip

Thank you in advance.

Yours sincerely,
Christian Bänsch

@Christian It does seem likely that this has to do with your graphics card. At the end of both of these logs we’re seeing a series of errors like this:

poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="\227\7\3\0\1\0\0\0\4\0\0\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
futex(0x7fff71f2b718, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x7f7798, FUTEX_WAKE_PRIVATE, 1)  = 0
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="b\7\3\0\3\0\0\0", iov_len=8}, {iov_base="GLX", iov_len=3}, {iov_base="\0", iov_len=1}], 3) = 12
futex(0x7fff71f2b6a8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x7f7798, FUTEX_WAKE_PRIVATE, 1)  = 0
poll([{fd=4, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=4, revents=POLLOUT}])
writev(4, [{iov_base="b\7\4\0\6\0\0\0", iov_len=8}, {iov_base="NV-GLX", iov_len=6}, {iov_base="\0\0", iov_len=2}], 3) = 16
futex(0x7fff71f2b5f8, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x7f7798, FUTEX_WAKE_PRIVATE, 1)  = 0

The event names are “GLX” and “NV-GLX”, which would correspond with your graphics card.
We can double check this by running Cubit without the GUI, like this:

coreform_cubit -nographics -prompt Cubit

This should load you in to a Cubit prompt. Exit with Ctrl+C. If that succeeds, then the problem is with your graphics card setup.
Cubit is loading libGL.so.1, libGLX.so.0, libGLdispatch.so, and libGLX_nvidia.so.0 from /usr/lib/x86_64-linux-gnu/. I assume all these libraries come from your NVIDIA drivers, correct? What version are your NVIDIA drivers?

Now that you’ve fixed the .Xauthority issue, does 2020.2 run correctly now?

Dear Scot,

thanks for your post.
The double check with running Cubit without graphics works properly.

We have installed the NVIDIA proprietary driver version 460.80 (nvidia-driver-460) which seems recommended by Ubuntu 18.04 and it comes with Ubuntu repo. Tomorrow morning I want to test a newer driver.

…and we can run 2020.2 correctly, too. Unfortunately we need the newer version because of sculpt, it´s missing in 2020.2.

If you need further information, please don´t hesitate to contact.

Thank you for your time.

Yours sincerely,
Christian Bänsch

That’s odd that 2020.2 is working but the newer version isn’t, we did make some significant changes to packaging but I’m not aware of any changes that would have different graphics card requirements.
You can try forcing Cubit to run with software rendering (i.e. bypassing the NVIDIA drivers and using mesa libraries) by using the environment variable LIBGL_ALWAYS_SOFTWARE=1 or QT_XCB_FORCE_SOFTWARE_OPENGL=1 when running the coreform_cubit executable. You may already have mesa libraries installed, if you don’t you should be able to install them alongside your NVIDIA drivers.

Dear Scot,

we have downgraded the NVIDIA driver to noveau-driver and we have already reinstalled mesa libraries and installed Mesa 18.1.1 but unfortunately we didn´t get Cubit 2021.5 to run in GUI. We have tried to bypassing it with the named environment variables but either temporarely (export variable before run the binary) or permanentely in the .bashrc/.bash_aliases won´t work. Do you have another hint for me?

Yours sincerely,
Christian Bänsch

You can try running Cubit inside of a Xephyr window. Xephyr is a nested X server that only supports software rendering. It’ll pop up a separate display within your desktop, and then you would specify that display when running Cubit.
This starts a new Xephyr display labeled :1

Xephyr -br -ac -noreset -screen 800x600 :1

And then you would run Cubit with the DISPLAY environment variable set to :1

DISPLAY=:1 ./coreform_cubit

That should entirely bypass your NVIDIA drivers while still running Cubit on the same machine.

Ok, I tried your suggestion using Xephyr. I am able to open a separate window and then I can see cubit. However, several of the options are grayed out (not available) as if it was missing something in the installation.

Can you take a screenshot please?

Hi @scot

I would like to follow up on this. I was able to run the Xephyr session but as I mentioned when I open cubit within the Xephyr all the Cubit options are grayed out (not available).

I am sending you attached a screen shoot of the cubit session within Xephyr as well as the strace output.

Would you be able to help me to get cubit to work?

Thanks you

link to strace result:
https://www.dropbox.com/s/306os8zeh6fth41/debug_cubit.txt?dl=0

The problem now is the the plugins aren’t loading correctly. It looks like the missing library is libOpenGL.so.0. You should be able to install it by running sudo apt-get install libopengl0.

Hi @scot,

Thanks for the help.When I try to install libopengl0 I get the following error message. Would you know how to fix it?

Thanks

sudo apt-get install libopengl0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libopengl0 : Depends: libglvnd0 (= 1.0.0-2ubuntu2) but 1.0.0-2ubuntu2.3 is to be installed
E: Unable to correct problems, you have held broken packages.

Try following the instructions on this page: https://askubuntu.com/questions/1077595/broken-apt-cant-update-libglvnd-due-to-unmet-dependencies-nvidia

Hi @scot

The solution that you provided in the link does not work. I don’t have the files

/var/cache/apt/archives/libglvnd-dev_1.0.0-2ubuntu2.2_amd64.deb
/var/cache/apt/archives/libgles1_1.0.0-2ubuntu2.2_amd64.deb 

The only ones I have on /var/cache/apt/archives/ are the following:

duplicity_0.7.17-0ubuntu1_amd64.deb  
python-fasteners_0.12.0-3_all.deb  
python-lockfile_1%3a0.12.2-2_all.deb
librsync1_0.9.7-10build1_amd64.deb
python-gi_3.26.1-2_amd64.deb
python-monotonic_1.1-2_all.deb

Let me know if you have any other ideas.

Thanks!

Try this:

sudo apt-get purge libglvnd0
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get install libglvnd0

The blessing and curse with Linux is that you have complete control over everything on the system. This also means almost every install is custom in some way, and there’s hundreds of ways to break things. Is there an IT administrator you can talk to for help?

@scot,

Thanks. Before I try the above commands, do you foresee that it might break other packages that I already have installed? Is there any other workaround to get Coreform Cubit 2021.5 to work on my Ubuntu 18.05 LTS ?

I don’t have an IT administrator that can help me.

Thanks,
Josimar

It may break other packages, I don’t know what you have installed on your system.

If you don’t want to jeopardize your system, you can install Docker and I can give you a Dockerfile that will let you run Cubit inside a Docker container and connect to the GUI in your browser.

@scot,

Could you send me the Dockerfile so that I can run Cubit inside the Docker? This might work better for now.

Thanks,
Josimar

centos7-cubit-gui.zip (1.1 KB)
Download the Cubit 2021.5 RPM installer, name it Cubit.rpm, and place it next to the Dockerfile. Name your license file license.lic, and also place it next to the Dockerfile. Also make sure you have the included supervisord.conf next to the Dockerfile.

Build the image like this with your terminal in the Dockerfile directory:

sudo docker build --build-arg VERSION=2021.5 -t cubit_gui .

Run the container like this:

sudo docker container run -d -p 6080:6080 -p 5900:5900 -v /dev/shm:/dev/shm -v <path to a folder on your machine>:/home/coreform/data  --name cubit_gui centos_gui_1

Then open up a browser tab and connect to http://localhost:6080/#/ in your browser. That’ll show a GUI where you can then run Cubit. Save any data in /home/coreform/data and it’ll be accessible in the path you specified as a volume mount.