Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIntermittent "session is already started" error for bluetooth tests #22619
Comments
Reduce bluetooth test parallelism. This might work around #22619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22662) <!-- Reviewable:end -->
Reduce bluetooth test parallelism. This might work around #22619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22662) <!-- Reviewable:end -->
Reduce bluetooth test parallelism. This might work around #22619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22662) <!-- Reviewable:end -->
Reduce bluetooth test parallelism. This might work around #22619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22662) <!-- Reviewable:end -->
Reduce bluetooth test parallelism. This might work around #22619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22662) <!-- Reviewable:end -->
|
Hey @jdm I was looking at the issue, have you figured out why this is being caused? Why is a new session being created when a session already exists? |
|
I have not figured out why yet. I believe it should be possible to add support for multiple sessions to the server, though. |
|
I tried to replicate this error locally but instead of the
|
|
It should be possible to reproduce by running |
|
@jdm , i couldnt reproduce this error all my tests ran as expected , can this error be system specific? |
|
@aditj Try modifying the test's expectation to |
Oh !I am now getting the |
Adding multiple sessions to the server probably isn't that easy in the sense that the Possibly this just means "shutting down a session and starting a new one without quitting servo", which I think is much more reasonable. However in this case I guess there's some race condition in shutting down the session which allows us to try to start a new one before the previous one is finished. |
|
As I can see whenever any test function runs it calls a fixture which tries to create a new session and if gets |
|
I managed to reproduce the error locally and I noticed that two different processes attempted to start WebDriver on the same port: A few lines down in the log there are two attempts to starting a WebDriver session on the same port: Next, the error was raised. From what I investigated, the ports are chosen here and that code is vulnerable to race conditions. |
|
That looks extremely suspicious! |
…th_tests, r=jdm Reintroduce parallelism in the bluetooth tests <!-- Please describe your changes on the following line: --> With web-platform-tests/wpt#16819 in place, #22619 should be fixed, so the changes introduced by #22662 can be reverted. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23407) <!-- Reviewable:end -->
|
Is this issue fixed now? |
|
The issue is fixed for the bluetooth tests, but it's still there in the new_session wdspec tests. |
|
So, I further investigated what causes the Although the port retrieval in |
|
So, after lots of debugging, I finally managed to understand the real cause of the error in the wdspec When running the wdspec tests in parallel, Why didn't this also happen in the other occurrences of I thought about several possible solutions:
|
|
Good news! Once we update |
|
This can be closed now! |



I recall seeing this in #21370 as well.