-
Notifications
You must be signed in to change notification settings - Fork 533
nosetest fails when X-server not present #1178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'll try to look at it tomorrow. It must be related to the interfaces redirecting X, don't you think? |
i think so. i'm trying to debug a situation where tests are consuming a lot of memory on my cluster, so i just wanted to put the issue here. it would be great if you can take a look. |
narrowed it to this:
|
Ok, great. That's a lot to start with it. Thanks. |
After #1156, this problem was greatly narrowed down by using the However, for interfaces deriving directly from BaseInterface this was not possible. [It is important to say that before that PR those interfaces just did not work]. Before that PR, nipype had copied code from xvfbwrapper. So I removed the copied code, imported xvfbwrapper and manually set the display in the environment variable of the runtime (https://github.com/oesteban/nipype/blob/1b6b88bcb991e252b843a603a532f5e6d04bf9e5/nipype/interfaces/base.py#L972). I guess that the problem is related to the following: xvfbwrapper modifies the 'DISPLAY' environment variable at system level. However, when the node is run some other process may have changed the display. I couldn't reproduce this in my settings (and tested in one headless system with debian). |
indeed -- boils down to
on my debian system it comes from
at least other imports seems to be not at the level of the module
so it is safe to assume that such failures wouldn't typically happen when someone runs headless an actual pipeline (unless one using mesh stuff), so for my issue #1217 I will just wrap nosetests call to be ran under xvfb |
That should work, but anyways these interfaces should work in headless runs. Let me see if I can find a solution. EDIT: IMHO, everything points to opening just one virtual display in the beginning if no $DISPLAY is set OR if $DISPLAY is set but no X-server is listening, as suggested in #1156. Alternatively/additionally, we could have the special value 'auto' in DISPLAY, that would force opening a virtual server. |
Executing I'm afraid I should retake #973, ensuring that ETS_TOOLKIT environment variable is set to null before any nipype code tries to import tvtk for first. |
The text was updated successfully, but these errors were encountered: