[SERVER-36676] Back SpinLock with a stdx::mutex in debug builds on non-windows Created: 14/Aug/18  Updated: 29/Oct/23  Resolved: 21/Aug/18

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 4.1.3

Type: New Feature Priority: Major - P3
Reporter: Mira Carey Assignee: Mira Carey
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-36628 SpinLock should remember what thread ... Closed
Backwards Compatibility: Fully Compatible
Sprint: Platforms 2018-08-27
Participants:
Linked BF Score: 0

 Description   

We have some lovely deadlock detection code built into the hang analyzer on linux which does a great job with our internal lock types as well as with mutexes. For debug builds, backing SpinLock's with mutexes gives us that deadlock detection for free.

This constrains them from being released on a different thread, but critical sections already have that property, so we can't have been relying on it



 Comments   
Comment by Githook User [ 21/Aug/18 ]

Author:

{'name': 'Jason Carey', 'email': 'jcarey@argv.me', 'username': 'hanumantmk'}

Message: SERVER-36676 spinlock as mutex in dbg builds linux

We have some lovely deadlock detection code built into the hang analyzer
on linux which does a great job with our internal lock types as well as
with mutexes. For debug builds, backing SpinLock's with mutexes gives us
that deadlock detection for free.

This constrains them from being released on a different thread, but
critical sections already have that property, so we can't have been
relying on it.
Branch: master
https://github.com/mongodb/mongo/commit/e5fd0cd67b6eabb44fbaa00a0b202eb17f7b09f8

Comment by Githook User [ 16/Aug/18 ]

Author:

{'name': 'Siyuan Zhou', 'email': 'siyuan.zhou@mongodb.com', 'username': 'visualzhou'}

Message: Revert "SERVER-36676 spinlock as mutex in dbg builds linux"

This reverts commit db1535d7e9094fd444609ade9bf0fb725d611f85.
Branch: master
https://github.com/mongodb/mongo/commit/57be1f7097ceed41b156a826c541aa276f35dd61

Comment by Githook User [ 16/Aug/18 ]

Author:

{'name': 'Jason Carey', 'email': 'jcarey@argv.me', 'username': 'hanumantmk'}

Message: SERVER-36676 spinlock as mutex in dbg builds linux

We have some lovely deadlock detection code built into the hang analyzer
on linux which does a great job with our internal lock types as well as
with mutexes. For debug builds, backing SpinLock's with mutexes gives us
that deadlock detection for free.

This constrains them from being released on a different thread, but
critical sections already have that property, so we can't have been
relying on it.
Branch: master
https://github.com/mongodb/mongo/commit/db1535d7e9094fd444609ade9bf0fb725d611f85

Generated at Thu Feb 08 04:43:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.