Open Bug 1919196 Opened 3 days ago Updated 2 days ago

FATAL - AttributeError: 'NoneType' object has no attribute 'splitlines' on linux gtest tasks with interactive feature enabled

Categories

(Taskcluster :: Workers, defect)

defect

Tracking

(Not tracked)

People

(Reporter: glandium, Unassigned)

References

Details

STR:

  • Take a gtest linux task.
  • Edit it and enable the interactive feature.
  • Create the task.
  • When the task is running, open shell.html

Result:
The task fails with:

[task 2024-09-17T06:15:41.571Z] 06:15:41     INFO - Running command: pactl load-module module-null-sink
[task 2024-09-17T06:15:41.589Z] 06:15:41     INFO -  Connection failure: Connection refused
[task 2024-09-17T06:15:41.589Z] 06:15:41     INFO -  pa_context_connect() failed: Connection refused
[task 2024-09-17T06:15:41.589Z] 06:15:41     INFO - Return code: 1
[task 2024-09-17T06:15:41.589Z] 06:15:41     INFO - Getting output from command: pactl list modules short
[task 2024-09-17T06:15:41.606Z] 06:15:41     INFO - Reading from file tmpfile_stderr
[task 2024-09-17T06:15:41.606Z] 06:15:41    ERROR - Errors received:
[task 2024-09-17T06:15:41.607Z] 06:15:41    ERROR -  Connection failure: Connection refused
[task 2024-09-17T06:15:41.607Z] 06:15:41    ERROR -  pa_context_connect() failed: Connection refused
[task 2024-09-17T06:15:41.607Z] 06:15:41     INFO - Return code: 1
[task 2024-09-17T06:15:41.607Z] 06:15:41     INFO - Running post-action listener: _resource_record_post_action
[task 2024-09-17T06:15:41.608Z] 06:15:41     INFO - [mozharness: 2024-09-17 06:15:41.607446Z] Finished start-pulseaudio step (failed)
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL - Uncaught exception: Traceback (most recent call last):
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2384, in run
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -     self.run_action(action)
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2318, in run_action
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -     self._possibly_run_method(method_name, error_if_missing=True)
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -   File "/builds/worker/workspace/mozharness/mozharness/base/script.py", line 2270, in _possibly_run_method
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -     return getattr(self, method_name)()
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -   File "/builds/worker/workspace/mozharness/scripts/desktop_unittest.py", line 959, in start_pulseaudio
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL -     if not [l for l in modules.splitlines() if "module-x11" in l]:
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL - AttributeError: 'NoneType' object has no attribute 'splitlines'
[task 2024-09-17T06:15:41.608Z] 06:15:41    FATAL - Running post_fatal callback...

When the task is running, open shell.html

Opening shell.html may not even be required.

FATAL - AttributeError: 'NoneType' object has no attribute 'splitlines' is kind of a red herring. Even if the python code handled the situation correctly, what it means to do in this case would end the task and ask TC to trigger a new run.

It seems like interactive tasks don't run the docker image's entrypoint, so we end up without a dbus system bus, and various things explode from there, including pulseaudio and gnome-session.
Not yet sure how that's going wrong, https://github.com/taskcluster/taskcluster/blob/a40936bea1a6eecf8fb7fd7e37842b8a9b1fffc0/workers/docker-worker/src/task.js#L443-L456 looks like it does want to preserve the old entrypoint while prepending its own script, but in practice we end up with pid 1 as something like /.taskclusterutils/busybox sh -e /.taskclusterutils/interactive_wrapper_run.sh /builds/worker/bin/run-task -- /builds/worker/bin/test-linux.sh --disable-e10s --disable-fission --gtest-suite=gtest --allow-software-gl-layers --download-symbols=ondemand.

(In reply to Julien Cristau [:jcristau] from comment #3)

https://github.com/taskcluster/taskcluster/blob/a40936bea1a6eecf8fb7fd7e37842b8a9b1fffc0/workers/docker-worker/src/task.js#L443-L456

//TODO: test with things that aren't undefined

Looks like this might never have been tested and never worked, suggesting that the thing that gets the entry point from the docker image is broken.

Which also means it's a taskcluster worker issue.

Component: General → Workers
Product: Testing → Taskcluster

I also means that a workaround is to edit the payload to add /usr/local/bin/dbus.sh before run-task.

You need to log in before you can comment on or make changes to this bug.