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

Race condition in Queue.Protect #1202

Open
eGavr opened this issue Mar 23, 2022 · 0 comments
Open

Race condition in Queue.Protect #1202

eGavr opened this issue Mar 23, 2022 · 0 comments
Labels

Comments

@eGavr
Copy link

eGavr commented Mar 23, 2022

Selenoid version: 1.10.7
Docker version: 20.10.7, build f0df350
Selenoid config:

{"firefox":{"versions":{"95.0":{"image":"selenoid/firefox:95.0","path":"/wd/hub","port":"4444","tmpfs":{"/tmp":"size=128m"}}}}}

Selenoid run:

docker run -it --rm -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v <DIR_WITH_CONFIG>:/etc/selenoid/:ro aerokube/selenoid:1.10.7 -disable-queue -limit 5

Test script:

for i in $(seq 1 10);
do
  curl --connect-timeout 30 --header "Content-Type: application/json" http://127.0.0.1:4444/wd/hub/session -d '{"desiredCapabilities":{"browserName":"firefox","browserVersion":"95.0"}}' & 
done

wait

Current behaviour (this behaviour is flaky, so you probably need run test script several times to reproduce the bug):

- less than 5 requests "immediately" fail with error "Queue is Full"
- Selenoid returns 5 browser sessions
- the remaining requests fail after 'curl' timeout exceeds

Expected behaviour:

- 5 requests "immediately" fail with error "Queue Is Full"
- Selenoid returns 5 browser sessions

JFYI. In our team we've hacked the problem this way.

@vania-pooh vania-pooh added the bug label Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants