Closed Bug 53479 Opened 25 years ago Closed 15 years ago

Deadlock caused by lock ordering error in NSS/SSL

Categories

(NSS :: Libraries, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 588698
3.12.8

People

(Reporter: nelson, Assigned: wtc)

Details

The file nss/lib/ssl/notes.txt defines the intended lock aquisition ordering for SSL in NSS. ssl3_HandleRecord can, under some circumstances, attempt to aquire the handshake lock while it already holds the RecvBuf lock. The deadlock that was seen had one thread in this call stack: PR_Poll -> ssl_Poll -> SSL_DataPending holding the 1stHandshake and SSL3Handshake locks, trying to aquire the RecvBuf lock, and a second thread in this call stack: PR_Recv -> ssl_SecureRecv -> DoRecv -> ssl3_GatherAppDataRecord -> ssl3_GatherCompleteHandshake -> ssl3_HandleRecord holding the RecvBuf lock, trying to aquire the SSL3Handshake lock. It is unusual to Poll a socket while doing a read on it, and the application that did this was found to have been polling on the wrong socket. Still, it should not have deadlocked.
Target fix == 3.2.
Status: NEW → ASSIGNED
Target Milestone: --- → 3.2
Deferred to NSS 3.3
Target Milestone: 3.2 → 3.3
Target Milestone: 3.3 → 3.4
Changed the QA contact to Bishakha.
QA Contact: sonja.mirtitsch → bishakhabanerjee
Set target milestone to NSS 3.5.
Target Milestone: 3.4 → 3.5
Target Milestone: 3.5 → 3.7
Moved to target milestone 3.8 because the original NSS 3.7 release has been renamed 3.8.
Target Milestone: 3.7 → 3.8
Remove target milestone of 3.8, since these bugs didn't get into that release.
Target Milestone: 3.8 → ---
QA Contact: bishakhabanerjee → jason.m.reid
QA Contact: jason.m.reid → libraries
Assignee: nelson → nobody
A similar deadlock caused by the same locking order problem was reported in bug 588698. Although this bug was filed first, I'm marking this bug as a duplicate because bug 588698 has more info.
Assignee: nobody → wtc
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Target Milestone: --- → 3.12.8
You need to log in before you can comment on or make changes to this bug.