Skip to content
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

XStartTimeoutError since v2.0 #62

Closed
The-Compiler opened this issue Jan 20, 2021 · 9 comments
Closed

XStartTimeoutError since v2.0 #62

The-Compiler opened this issue Jan 20, 2021 · 9 comments

Comments

@The-Compiler
Copy link

The-Compiler commented Jan 20, 2021

Since upgrading to v2.0, I sometimes see this on GitHub Actions:

Wed, 20 Jan 2021 17:02:27 GMT py36-pyqt512 run-test: commands[1] | /home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/bin/python -bb -m pytest tests
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR> Traceback (most recent call last):
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/_pytest/main.py", line 265, in wrap_session
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     config._do_configure()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/_pytest/config/__init__.py", line 982, in _do_configure
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/hooks.py", line 308, in call_historic
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     res = self._hookexec(self, self.get_hookimpls(), kwargs)
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/manager.py", line 93, in _hookexec
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/manager.py", line 87, in <lambda>
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     return outcome.get_result()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     raise ex[1].with_traceback(ex[2])
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     res = hook_impl.function(*args)
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pytest_xvfb.py", line 93, in pytest_configure
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     config.xvfb.start()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pytest_xvfb.py", line 54, in start
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     self._virtual_display.start()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pyvirtualdisplay/display.py", line 70, in start
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     self._obj.start()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pyvirtualdisplay/abstractdisplay.py", line 152, in start
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     self._start1_has_displayfd()
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pyvirtualdisplay/abstractdisplay.py", line 200, in _start1_has_displayfd
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     self.display = int(self._wait_for_pipe_text(rfd))
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>   File "/home/runner/work/qutebrowser/qutebrowser/.tox/py36-pyqt512/lib/python3.6/site-packages/pyvirtualdisplay/abstractdisplay.py", line 295, in _wait_for_pipe_text
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR>     % (self._program, self._command,)
Wed, 20 Jan 2021 17:02:44 GMT INTERNALERROR> pyvirtualdisplay.abstractdisplay.XStartTimeoutError: No reply from program Xvfb. command:['Xvfb', '-br', '-nolisten', 'tcp', '-screen', '0', '800x600x16', '-displayfd', '10']

This is with pytest-xvfb which is a rather small wrapper around PyVirtualDisplay.

I think it only happens in the Ubuntu 18.04 environment, not with 20.04. Also it only happens one out of 10 times or so...

Any idea what could be going on there?

ponty pushed a commit that referenced this issue Jan 24, 2021
@ponty
Copy link
Owner

ponty commented Jan 24, 2021

This is a 10 sec timeout in start(), but this was present before v2.0. If the processing is very slow then it can fail. I removed this timeout on master branch.
Can you test it?

How can I see the log under https://github.com/The-Compiler/pytest-xvfb/actions? The last entry is 6 months old.

@Czaki
Copy link

Czaki commented Feb 24, 2021

@ernyigoh
Copy link

I am getting the same error as well with Ubuntu v18.04 and pyvirtualdisplay v2.0. Any idea?
image

@ponty
Copy link
Owner

ponty commented Mar 2, 2021

I removed the timeout in v2.1. Please test it.

@intruder777
Copy link

I'm afraid removing timeout is not a good option. I have experienced kind of "eternal" hang of my script with v2.2. The host system experienced high load and several scripts hung on _wait_for_pipe_text() function of PyVirtualDisplay. And even when the high load was gone, and system was idling, those scripts still were hanging. So the loop inside _wait_for_pipe_text() was running for more than 24 hours before I manually interrupted the scripts.

@Becheler
Copy link

Becheler commented Mar 2, 2022

Hello,
I have the same error being raised in a Ubuntu 20.04 LTS container:

Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.8/dist-packages/crumbs/animate.py", line 5, in <module>
    display.start()
  File "/usr/local/lib/python3.8/dist-packages/pyvirtualdisplay/display.py", line 72, in start
    self._obj.start()
  File "/usr/local/lib/python3.8/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 149, in start
    self._start1_has_displayfd()
  File "/usr/local/lib/python3.8/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 197, in _start1_has_displayfd
    self.display = int(self._wait_for_pipe_text(rfd))
  File "/usr/local/lib/python3.8/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 309, in _wait_for_pipe_text
    raise XStartTimeoutError(
pyvirtualdisplay.abstractdisplay.XStartTimeoutError: No reply from program Xvfb. command:['Xvfb', '-br', '-nolisten', 'tcp', '-screen', '0', '1280x1024x24', '-displayfd', '4']

Any idea on how to solve this?

@ponty
Copy link
Owner

ponty commented Mar 2, 2022

Do you get the timeout after 10 minutes?
Please read the previous messages and describe if your situation is the same or different than others.
Do you have high load like this? #62 (comment)

@Becheler
Copy link

Becheler commented Mar 2, 2022

Yes, the timeout seems to happen after 10 minutes.
For the load I am not sure about how to answer. The error is raised from a job I run from a singularity/docker image on an heterogeneous grid for distributed high throughput computing and I am not sure about how to pull information from there.

@ponty
Copy link
Owner

ponty commented Mar 6, 2022

I can't reproduce the timeout.
I added timeout parameter on master branch. retry parameter also works.
You can find what works for your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants