-
Notifications
You must be signed in to change notification settings - Fork 49
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
sound/pipewire: add truncated exp backoff to tests and fork them #789
sound/pipewire: add truncated exp backoff to tests and fork them #789
Conversation
1b54b42
to
480536b
Compare
@stefano-garzarella can we retry the CI jobs a few times manually to see if they don't hangup indefinitely? (since there is no max try limit in this version of the code) |
sure, let me restart it! |
@epilys is there any log messages I should check if the retry worked? (not yet looked at the PR, sorry) |
@stefano-garzarella the CI seems to capture test output by default, so it'd only show up if something failed unfortunately |
I see, BTW 3 pipeline rebuilds so far without issues ;-) I'll arrive at least at 10 and report here! |
480536b
to
d091bd3
Compare
Mentioning that this is related to #647, but since we cannot know for sure if this PR fixes it we cannot close it yet at least if this is merged. |
Ok so the problem is not solved by retrying, since this job https://buildkite.com/rust-vmm/vhost-device-ci/builds/2868#019387cd-8337-4fc4-a24f-ab6d701d4bb4/46-726 managed to hang:
Some other idea to debug this (posting them here as notes for the future):
|
yeah, this is a good point! I agree on doing that. |
6138fdc
to
2dc4a76
Compare
Ok that's interesting, my latest change to panic if dbus/pipewire process don't exist triggered a new test failure:
I'm beginning to suspect tests running in threads is at play here; setting environment variables is not thread safe. Perhaps this could be the source of errors... Maybe all tests using alsa/pipewire stuff should be run with the |
2f43e03
to
dd41a0c
Compare
ecaa4f1
to
d8e7224
Compare
Goooood point!
Cool, this can help. Can we also have other concurrency issues? |
d8e7224
to
ce07529
Compare
Updated to run all process environment-modifying tests under forks using the |
Not sure, we're not dealing with any |
dbad659
to
3dec5a3
Compare
Change Error::UnexpectedAudioBackendError variant to take a boxed `dyn Error` value instead of a String. In the following commits we will use the error variant for errors from the pipewire backend as well. Signed-off-by: Manos Pitsidianakis <[email protected]>
Add a pipewire-specific error enum and make the backend's new() method return a Result instead of panicking with expect() on error. Signed-off-by: Manos Pitsidianakis <[email protected]>
3dec5a3
to
941f882
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I just saw some really minor things, feel free to ignore them.
Sometimes pw backend creation on CI fails with errors like for example: thread 'audio_backends::pipewire::tests::test_pipewire_backend_invalid_stream' panicked at vhost-device-sound/src/audio_backends/pipewire.rs:98:42: Failed to connect to core: CreationFailed Add a simple kind of truncated exponential backoff retry wrapper to PwBackend::new(). Signed-off-by: Manos Pitsidianakis <[email protected]>
If dbus-daemon or pipewire daemon exit with an error, panic. This might help us debug CI failures down the road, hopefully. This commit also changes the `println!`s to `eprintln!`s since the messages purpose is better suited to stderr. Signed-off-by: Manos Pitsidianakis <[email protected]>
Alsa and Pipewire tests modify their process environment (as part of setting up their test harnesses), which is incorrect because tests run on a multi-thread test runner by default. Use the rusty_fork crate to run those tests in a forked process. Signed-off-by: Manos Pitsidianakis <[email protected]>
941f882
to
6b05b48
Compare
Sometimes pw backend creation on CI fails with errors like for example:
Add a simple kind of truncated exponential backoff retry wrapper to
PwBackend::new().
Also, run all tests that modify their process environment under a fork using the
rusty_fork
crate.Signed-off-by: Manos Pitsidianakis [email protected]
Depends on #788 which fixes lint warnings