Deadlock in login tests
Bug #1347939 reported by
Dave Cheney
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Ian Booth | ||
1.20 |
Fix Released
|
Critical
|
Ian Booth |
Bug Description
The session copying fix triggers a deadlock in apiserver tests (login test) > 50% of the time. Fixing the deadlock will solve the problem.
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
importance: | Critical → High |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I found an unrelated deadlock in the login tests. It's very much timing related so it is plausible that underlying changes to state may lead to the deadlock occurring more frequently.
The problematic test is TestLoginRateLi mited on loginSuite. This starts N login attempts, and then starts attempt N+1. The expectation in that N+1 will error out immediately with a try again error. But, all N+1 login attempts are racing via the rpc layer to reach the login on the server. And attempt N+1 may beat one of the N attempts to get there, thus one of the N attempts is the one to get the retry error. This stuff up the tests because attempt N+1 now blocks and the code to unblock the pending login attempts is never run.