[CDRIVER-4185] Access violation when trying to join a thread Created: 12/Oct/21 Updated: 28/Oct/23 Resolved: 22/Jun/23 |
|
| Status: | Closed |
| Project: | C Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 1.24.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Linda Qin | Assignee: | Kevin Albertson |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Epic Link: | Improve Developer Experience |
| Quarter: | FY24Q2 |
| Case: | (copied to CRM) |
| Description |
|
When a new monitor thread fails to create and returns the `EAGAIN` error, we incorrectly assume it has been created. Then when attempting to shutdown the thread later on, we cause an Access Violation in the client application. Some details: `thread_create` doesn't check if the creation succeeds or not. When we attempt to stop the server monitor thread, it is assumed that it was already running. The call on `thread_join stop` will crash It would be nice if C driver could handle this situation gracefully to avoid crashes. |
| Comments |
| Comment by Githook User [ 26/Jun/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
add `errno_out` arg to mcommon_thread_create
|
| Comment by Githook User [ 22/Jun/23 ] |
|
Author: {'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}Message:
add `errno_out` arg to mcommon_thread_create
|