[SERVER-28239] Fix double ticket holder release in transport layer legacy during primary step down Created: 07/Mar/17 Updated: 25/Jun/18 Resolved: 08/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | 3.4.0, 3.5.1 |
| Fix Version/s: | 3.4.3, 3.5.5 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Mira Carey | Assignee: | Mira Carey |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Backport Requested: |
v3.4
|
||||||||||||
| Sprint: | Platforms 2017-03-27 | ||||||||||||
| Participants: | |||||||||||||
| Case: | (copied to CRM) | ||||||||||||
| Description |
|
During a primary step down, we call _closeConnection on all matching sessions. This kicks those sessions out of sourceMessage, which causes them to explicitly call end(), which calls _closeConnection. _closeConnection calls globalTicketHolder.release(). This causes us to double release on primary step down, which causes us to increase the effective number of tickets in the system. This behavior is most noticeable when looking at the 'now open' number of connections in the main init and listen thread, where the 'outof' param stays steady at the desired number of connections, but the 'available' amount increases. This causes us to report negative numbers of open connections. |
| Comments |
| Comment by Githook User [ 08/Mar/17 ] |
|
Author: {u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}Message: Disabling test until we can allocate port numbers safely for unit tests (cherry picked from commit f8f26d50a9a14e7d269f878e239991d73ff4864a) |
| Comment by Githook User [ 08/Mar/17 ] |
|
Author: {u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}Message: The legacy transport layer allowed end() to be called multiple times on Fix involves a mutex per connection and a check for _closed in (cherry picked from commit b1ec4cfbb535ddc7ee741a76132fee67a3ab1d1e) |
| Comment by Githook User [ 08/Mar/17 ] |
|
Author: {u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}Message: Disabling test until we can allocate port numbers safely for unit tests |
| Comment by Githook User [ 08/Mar/17 ] |
|
Author: {u'username': u'hanumantmk', u'name': u'Jason Carey', u'email': u'jcarey@argv.me'}Message: The legacy transport layer allowed end() to be called multiple times on Fix involves a mutex per connection and a check for _closed in |