Closed sapetnioc closed 3 years ago
There are some circular symlinks in the image :
Singularity> ls -l /dev/shm
lrwxrwxrwx 1 root root 8 Jan 26 11:43 /dev/shm -> /run/shm
Singularity> ls -l /run/shm
lrwxrwxrwx 1 root root 8 Dec 14 13:13 /run/shm -> /dev/shm
I do not really know yet where the problem comes from and how to fix it. On my running container, there is a /host/run/shm
this is a candidate for the symlink /run/shm
.
I have perhaps an idea: the web browser in Axon, used to display the docs. It is using QtWebEngine, which is kind of special, has to be started in a given order, etc.
You can try disabling it somewhere in axon/master/python/soma/qt4gui/text.py
, to see itf it makes any difference.
I tried with QyWebkit
instead of QtWebEngine
but there is an error later in the code.
Traceback (most recent call last):
File "<string>", line 32, in <module>
File "/casa/host/build/brainvisa/neuro.py", line 245, in <module>
main() File
"/casa/host/build/brainvisa/neuro.py", line 194, in main
showMainWindow()
File "/casa/host/build/python/brainvisa/processing/qt4gui/neuroProcessesGUI.py", line 4837, in showMainWindow
_mainWindow = ProcessSelectionWidget()
File "/casa/host/build/python/brainvisa/processing/qt4gui/neuroProcessesGUI.py", line 4089, in __init__
self.info = HTMLBrowser(self)
File "/casa/host/build/python/brainvisa/processing/qt4gui/neuroProcessesGUI.py", line 1150, in __init__
btnForward.setDefaultAction(browser.pageAction(QWebEnginePage.Forward))
TypeError: pageAction(self, QWebPage.WebAction): argument 1 has unexpected type 'WebAction'
Anyway, I will try to see what happen with /dev/shm
under a barebone Linux. It would be better to fix that, it could cause problems elsewhere. It is just an in-memory file system device.
There is a kernel difference between Windows/WSL2 and GNU/Linux for /dev/shm
(AFAIK this is a directory like device that is stored in memory). Under GNU/Linux, Singularity mount it as the host device. Under WSL2, there is no such device on host, /dev/shm
is a symlink to /run/shm
that is kept as-is by Singularity. On the run image, /run/shm
does not exist but on the dev image, it is a symnlink to /dev/shm
(creating a symlinks loop).
On WSL2, if /run/shm
or /dev/shm
is replaced by a writable directory, BrainVISA does not crash anymore. To solve this issue, I plan to modify casa_distro to detect if it is running under WSL2 using a WSL_DISTRO_NAME
env var and then mount /tmp
to /run/shm
.
My fix proposal can work but the symlink /run/shm
must not exist in the image. I would have to modify dev image to remove it. But I do not know where it is created, it is not in a system package. If it is required for GNU/Linux (I doubt since it is not in the run image), I would modify casa_distro to mount it from host.
I found another problem with running brainvisa that is finally a good news. BrainVISA cannot be used with XMing X server nor with VcXsrv using default options. It only starts with VcXsrv if I uncheck the "Native OpenGL" option (this options means "use native Windows OpenGL (wgl)"). But, with that configuration, I was able to do volume rendering in Anatomist in full screen. Ok, speed was close to frame per second but with a smaller windows it is ok. I suppose it means that all features can be used with an X server whose development is still active.
I can start Anatomist and open a window but BrainVISA main window cannot be displayed (tried wit two X servers : VcXsrv and Xming):