[SERVER-79] global 'ports' variable is not used in a thread safe manner Created: 29/May/09 Updated: 12/Jul/16 Resolved: 01/Jun/09 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Stability |
| Affects Version/s: | None |
| Fix Version/s: | 0.9.4 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Aaron Staple | Assignee: | Dwight Merriman |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Whenever we create a new MessagingPort, its address gets added to a global ports object. We may create MessagingPort objects in Listener::listen() or in DBClientConnection::connect(), and the db mutex need not be held in either context. It looks like the MessagingPort objects created by Listener are never destroyed, but the ones created by DBClientConnection get destroyed when the connection is destroyed. On destruction MessagingPort objects are removed from the 'ports' set, and this isn't done in a thread safe manner either. Resulted in a seg fault here: |
| Comments |
| Comment by Aaron Staple [ 29/May/09 ] |
|
Do you want Eliot to fix this by adding a new mutex to protect the global 'ports' object? |
| Comment by Aaron Staple [ 29/May/09 ] |
|
Do you want me to fix this by adding a new mutex to protect the global 'ports' object? |