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

DISPLAY environment variable race condition when checking GPU support #906

Closed
Crola1702 opened this issue Apr 11, 2023 · 0 comments · Fixed by #916
Closed

DISPLAY environment variable race condition when checking GPU support #906

Crola1702 opened this issue Apr 11, 2023 · 0 comments · Fixed by #916

Comments

@Crola1702
Copy link
Contributor

Reference build: https://build.osrfoundation.org/job/_test_ignition_gazebo-ci-gz-sim7-focal-amd64/1/ (Test job)

Log output:

++++ echo 'GPU support needed by the script but DISPLAY var is empty'
GPU support needed by the script but DISPLAY var is empty
++++ sudo service lightdm restart
++++ export_display_variable
+++++ ls /tmp/.X11-unix/
+++++ sed -e 's@^X@:@'
++++ [[ '' == '' ]]
++++ echo 'Imposible to get DISPLAY variable. Check your system'
Imposible to get DISPLAY variable. Check your system
++++ exit 1
Build step 'Execute shell' marked build as failure

When debugging jobs in the new cloud linux agents. We faced an issue with the DISPLAY environment variable. It seems it's caused when we restart lightdm service using sudo service lightdm restart and then running export_display_variable.

In a conversation with @nuclearsandwich he mentioned that this issue could be because of a race condition in the lightdm restart scripts mainly because it needs to wait an extra few seconds for X11 to come up. This could make the first build of an agent fail sometimes.

Reference lines:

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

Successfully merging a pull request may close this issue.

1 participant