lirios / docker-lirios

:dvd: Docker image to test Liri OS
6 stars 0 forks source link

Error when launching the container #1

Open plfiorini opened 6 years ago

plfiorini commented 6 years ago
    This application failed to start because it could not find or load the Qt platform plugin "xcb"
    in "".

    Reinstalling the application may fix this problem.

Looks like other people are having the same issue: https://forum.qt.io/topic/92783/qt-doesn-t-work-in-my-archlinux-docker

Running with QT_DEBUG_PLUGINS=1 shows:

/usr/lib64/qt5/plugins/platforms/liblirieglfs.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqeglfs.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqlinuxfb.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqminimal.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqminimalegl.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqoffscreen.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqvnc.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqwayland-egl.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqwayland-generic.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-egl.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqwayland-xcomposite-glx.so: Cannot allocate memory
/usr/lib64/qt5/plugins/platforms/libqxcb.so: Cannot allocate memory
plfiorini commented 6 years ago

Looks like the issue is either with Docker or Qt itself. Tested with Arch Linux and Fedora 28 bases.

mviereck commented 6 years ago

I assume it is a QT5 issue. It appears with several QT applications on debian buster, too. Same applications run fine on debian stretch. (All in docker).

An old related thread with also some recent answers that may help to track down the issue: https://stackoverflow.com/questions/17106315/failed-to-load-platform-plugin-xcb-while-launching-qt5-app-on-linux-without

mviereck commented 6 years ago

The issue is solved (citing from https://github.com/mviereck/x11docker/issues/76):

It turns out to be an issue with statx syscall. It is already whitelisted in recent docker versions, but did not reach the distributions yet. It is fixed in docker-ce 18.06, but not in 18.03.

This PR added statx to docker seccomp whitelist: https://github.com/moby/moby/pull/36417 Related SO thread: https://stackoverflow.com/questions/48995826/which-capabilities-are-needed-for-statx-to-stop-giving-eperm

Compare QT5 bug report: https://bugreports.qt.io/browse/QTBUG-70447

Possible solutions for docker versions before 18.06:


I tried to run lirios/unstable with whitelisted statx syscall and it succeeds!

If you are interested, I am running it with my project mviereck/x11docker

x11docker --gpu lirios/unstable

If you have weston and Xwayland installed, or if you run from tty, you can use:

x11docker --gpu --desktop lirios/unstable

To fix statx issue:

x11docker --gpu -- --security-opt seccomp=unconfined -- lirios/unstable