[CDRIVER-2929] Coverity analysis defect 105073: Thread deadlock Created: 17/Jan/19  Updated: 27/Oct/23  Resolved: 20/Jul/23

Status: Closed
Project: C Driver
Component/s: tests
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: CDRIVER-4575

 Description   

Threads may try to acquire two locks in different orders, potentially causing deadlock

Defect 105073 (STATIC_C)
Checker ORDER_REVERSAL (subcategory none)
File: /src/libmongoc/tests/mock_server/mock-server.c
Function main_thread
/src/libmongoc/tests/mock_server/mock-server.c, line: 1577
Calling "pthread_mutex_lock" acquires lock "_mock_server_t.mutex".

             bson_mutex_lock (&server->mutex);


Generated at Wed Feb 07 21:16:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.