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

Emscripten CI does not work on ubuntu-latest #11218

Open
sezero opened this issue Oct 15, 2024 · 24 comments
Open

Emscripten CI does not work on ubuntu-latest #11218

sezero opened this issue Oct 15, 2024 · 24 comments

Comments

@sezero
Copy link
Contributor

sezero commented Oct 15, 2024

See: https://github.com/sezero/SDL/actions/runs/11342398480/job/31542840236

Something about python, which I don't know anything about.

@madebr
Copy link
Contributor

madebr commented Oct 15, 2024

This is the log:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/driver_finder.py", line 38, in get_path
    path = SeleniumManager().driver_location(options) if path is None else path
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 89, in driver_location
    args = [str(self.get_binary()), "--browser", browser]
                ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/selenium/webdriver/common/selenium_manager.py", line 73, in get_binary
    raise WebDriverException(f"Unable to obtain working Selenium Manager binary; {path}")
selenium.common.exceptions.WebDriverException: Message: Unable to obtain working Selenium Manager binary; /usr/lib/python3/dist-packages/selenium/webdriver/common/linux/selenium-manager

selenium-manager should be part of python3-selenium.
Not sure what went wrong in this run.
Re-running emscripten jobs on our ci gives no issues.

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

Re-running emscripten jobs on our ci gives no issues.

My 2nd re-run had failed, haven't done a 3rd time.

@madebr
Copy link
Contributor

madebr commented Oct 15, 2024

I think your account is (once again) one of the firsts to use Ubuntu 24.04 as ubuntu-latest instead of Ubuntu 22.04.

Can you try pinning it to 22.04 until upstream resolves the issue?

--- a/.github/workflows/create-test-plan.py
+++ b/.github/workflows/create-test-plan.py
@@ -125,7 +125,7 @@ JOB_SPECS = {
     "android-cmake-lean": JobSpec(name="Android (CMake, lean)",             os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact="SDL-lean-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, lean=True, ),
     "android-mk": JobSpec(name="Android (Android.mk)",                      os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact=None,                     no_cmake=True, android_mk=True, ),
     "android-gradle": JobSpec(name="Android (Gradle)",                      os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact=None,                     no_cmake=True, android_gradle=True, ),
-    "emscripten": JobSpec(name="Emscripten",                                os=JobOs.UbuntuLatest,  platform=SdlPlatform.Emscripten,  artifact="SDL-emscripten", ),
+    "emscripten": JobSpec(name="Emscripten",                                os=JobOs.Ubuntu22_04,   platform=SdlPlatform.Emscripten,  artifact="SDL-emscripten", ),
     "haiku": JobSpec(name="Haiku",                                          os=JobOs.UbuntuLatest,  platform=SdlPlatform.Haiku,       artifact="SDL-haiku-x64",          container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
     "loongarch64": JobSpec(name="LoongArch64",                              os=JobOs.UbuntuLatest,  platform=SdlPlatform.LoongArch64, artifact="SDL-loongarch64", ),
     "n3ds": JobSpec(name="Nintendo 3DS",                                    os=JobOs.UbuntuLatest,  platform=SdlPlatform.N3ds,        artifact="SDL-n3ds",               container="devkitpro/devkitarm:latest", ),

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

I think your account is (once again) one of the firsts to use Ubuntu 24.04 as ubuntu-latest instead of Ubuntu 22.04.

Can you try pinning it to 22.04 until upstream resolves the issue?

Created a test-11218 branch in my fork with your change.
I'll report back with the CI result.

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

Unfortunately, it still fails: https://github.com/sezero/SDL/actions/runs/11350926022/job/31570527906

It did not run on ubuntu 22.04: https://github.com/sezero/SDL/actions/runs/11350926022/job/31570527906#step:1:4
Add [sdl-ci-filter emscripten] to your commit message to only run the emscripten job.
It looks like the run has yet to finish: https://github.com/sezero/SDL/actions/runs/11351284397

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

Unfortunately, it still fails: https://github.com/sezero/SDL/actions/runs/11350926022/job/31570527906

It did not run on ubuntu 22.04: https://github.com/sezero/SDL/actions/runs/11350926022/job/31570527906#step:1:4 Add [sdl-ci-filter emscripten] to your commit message to only run the emscripten job. It looks like the run is yet to finish: https://github.com/sezero/SDL/actions/runs/11351284397

Oh, it's my screw-up: applied the patch but forgot committing it. Waiting for the actual result now.

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

Yes, seems like emscripten builder is green now: https://github.com/sezero/SDL/actions/runs/11351284397/job/31571651376

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

Yes, seems like emscripten builder is green now: https://github.com/sezero/SDL/actions/runs/11351284397/job/31571651376

Should we do anything about this here in upstream?

@madebr
Copy link
Contributor

madebr commented Oct 15, 2024

I don't know where the issue is.
I think the most appropriate location would be to open an issue with the Ubuntu packagers.
(I have no experience with Ubuntu packaging)

@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

I think the most appropriate location would be to open an issue with the Ubuntu packagers

Not something I can do.

Leave this ticket open?

@madebr
Copy link
Contributor

madebr commented Oct 15, 2024

Yes, perhaps rename the title to "Emscripten CI does not work on ubuntu-latest"

@sezero sezero changed the title Emscripten tests fail in CI Emscripten CI does not work on ubuntu-latest Oct 15, 2024
@sezero
Copy link
Contributor Author

sezero commented Oct 15, 2024

OK, title renamed as suggested.

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

That ubuntu being a debian derivative, maybe @smcv has an idea about python packaging things?

@madebr
Copy link
Contributor

madebr commented Oct 16, 2024

I think this is an issue with Ubuntu's python3-selenium because of these bug reports:

https://bugs.launchpad.net/ubuntu/+source/python-selenium/+bug/2032687
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1051368

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

Curiously though, the emscripten builder hasn't failed today my fork of SDL after several syncs with mainstream...

@smcv
Copy link
Contributor

smcv commented Oct 16, 2024

It seems that the python3-selenium in recent Debian and Ubuntu needs an external component (selenium-manager), which is not at all straightforward to package in a way that meets Debian's standards for preventing supply chain attacks, reproducibility, ensuring the presence of complete corresponding source and so on. See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1052460.

If this CI is being run in a throwaway container with no privileged access to SDL stuff (no ability to push commits, tag releases, etc.), then the concern about supply chain attacks etc. isn't relevant, and it would be OK to get Selenium or selenium-manager some other way.

@madebr
Copy link
Contributor

madebr commented Oct 16, 2024

Thanks for the explanation!
It looks like it is a rust tool. That won't make it easier to add.

@sezero
Can you try this commit?
madebr@0de078b

ci on my fork (still on 22.04)
https://github.com/madebr/SDL/actions/runs/11372722038/job/31637799783

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

@sezero Can you try this commit? madebr@0de078b

https://github.com/sezero/SDL/actions/runs/11373028367/job/31638801915

Seems to be running or 22.04, no failures so far:

Current runner version: '2.320.0'
Operating System
  Ubuntu
  22.04.5
  LTS

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

How should I make it to run under 24.04 to test ?

@madebr
Copy link
Contributor

madebr commented Oct 16, 2024

How should I make it to run under 24.04 to test ?

--- a/.github/workflows/create-test-plan.py
+++ b/.github/workflows/create-test-plan.py
@@ -125,7 +125,7 @@ JOB_SPECS = {
     "android-cmake-lean": JobSpec(name="Android (CMake, lean)",             os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact="SDL-lean-android-arm64", android_abi="arm64-v8a", android_arch="aarch64", android_platform=23, lean=True, ),
     "android-mk": JobSpec(name="Android (Android.mk)",                      os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact=None,                     no_cmake=True, android_mk=True, ),
     "android-gradle": JobSpec(name="Android (Gradle)",                      os=JobOs.UbuntuLatest,  platform=SdlPlatform.Android,     artifact=None,                     no_cmake=True, android_gradle=True, ),
-    "emscripten": JobSpec(name="Emscripten",                                os=JobOs.UbuntuLatest,  platform=SdlPlatform.Emscripten,  artifact="SDL-emscripten", ),
+    "emscripten": JobSpec(name="Emscripten",                                os=JobOs.Ubuntu24_04,   platform=SdlPlatform.Emscripten,  artifact="SDL-emscripten", ),
     "haiku": JobSpec(name="Haiku",                                          os=JobOs.UbuntuLatest,  platform=SdlPlatform.Haiku,       artifact="SDL-haiku-x64",          container="ghcr.io/haiku/cross-compiler:x86_64-r1beta5", ),
     "loongarch64": JobSpec(name="LoongArch64",                              os=JobOs.UbuntuLatest,  platform=SdlPlatform.LoongArch64, artifact="SDL-loongarch64", ),
     "n3ds": JobSpec(name="Nintendo 3DS",                                    os=JobOs.UbuntuLatest,  platform=SdlPlatform.N3ds,        artifact="SDL-n3ds",               container="devkitpro/devkitarm:latest", ),

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

https://github.com/sezero/SDL/actions/runs/11373966518/job/31641785710

Seems to have passed the 'Install PyPI packages' step. (Still running.)

@sezero
Copy link
Contributor Author

sezero commented Oct 16, 2024

Running tests fails: https://github.com/sezero/SDL/actions/runs/11373966518/job/31641785710#step:27:49
E.g.:

test 2
      Start  2: testautomation

2: Test command: /opt/hostedtoolcache/Python/3.12.7/x64/bin/python3 "/home/runner/work/SDL/SDL/test/emscripten/driver.py" "--server" "http://localhost:8080" "--browser" "chrome" "--chrome-binary" "/opt/hostedtoolcache/setup-chrome/chromium/1369562/x64/chrome" "--" "testautomation" "--trackmem"
2: Working Directory: /home/runner/work/SDL/SDL/build/test
2: Environment variables: 
2:  SDL_AUDIO_DRIVER=emscripten
2:  SDL_VIDEO_DRIVER=emscripten
2:  SDL_ASSERT=abort
2: Test timeout computed to be: 480
1: Traceback (most recent call last):
1:   File "/home/runner/work/SDL/SDL/test/emscripten/driver.py", line 183, in <module>
1:     raise SystemExit(main())
1:                      ^^^^^^
1:   File "/home/runner/work/SDL/SDL/test/emscripten/driver.py", line 160, in main
1:     sdl_test_driver = SDLSeleniumTestDriver(
1:                       ^^^^^^^^^^^^^^^^^^^^^^
1:   File "/home/runner/work/SDL/SDL/test/emscripten/driver.py", line 56, in __init__
1:     self.driver = driver_contructor(options=driver_options)
1:                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
1:     super().__init__(
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/chromium/webdriver.py", line 66, in __init__
1:     super().__init__(command_executor=executor, options=options)
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 212, in __init__
1:     self.start_session(capabilities)
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 299, in start_session
1:     response = self.execute(Command.NEW_SESSION, caps)["value"]
1:                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/remote/webdriver.py", line 354, in execute
1:     self.error_handler.check_response(response)
1:   File "/home/runner/.local/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
1:     raise exception_class(message, screen, stacktrace)
1: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
1:   (session not created: DevToolsActivePort file doesn't exist)
1:   (The process started from chrome location /opt/hostedtoolcache/setup-chrome/chromium/1369562/x64/chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
1: Stacktrace:
1: #0 0x55775f96acd2 <unknown>
1: #1 0x55775f95ca5e <unknown>
1: #2 0x55775f408f27 <unknown>
1: #3 0x55775f43eda4 <unknown>
1: #4 0x55775f4391a6 <unknown>
1: #5 0x55775f48435d <unknown>
1: #6 0x55775f483ad6 <unknown>
1: #7 0x55775f476fe3 <unknown>
1: #8 0x55775f446c41 <unknown>
1: #9 0x55775f445d39 <unknown>
1: #10 0x55775f446a1c <unknown>
1: #11 0x55775f91829f <unknown>
1: #12 0x55775f9333d3 <unknown>
1: #13 0x55775f932e3b <unknown>
1: #14 0x55775f933845 <unknown>
1: #15 0x55775f922ab3 <unknown>
1: #16 0x55775f933be0 <unknown>
1: #17 0x55775f908ee1 <unknown>
1: #18 0x55775f94d248 <unknown>
1: #19 0x55775f94d3d9 <unknown>
1: #20 0x55775f95bd65 <unknown>
1: #21 0x7fb40dc9ca94 <unknown>
1: #22 0x7fb40dd29c3c <unknown>
1: 

@madebr
Copy link
Contributor

madebr commented Oct 16, 2024

I can reproduce. It works on 22.04, but doesn't at 24.04.
I reported this upstream at SeleniumHQ/selenium#14609

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

3 participants