[SERVER-5867] Cannot use SRWLocks on Windows Server 2003 Created: 17/May/12  Updated: 11/Jul/16  Resolved: 18/May/12

Status: Closed
Project: Core Server
Component/s: Build, Internal Code, Packaging
Affects Version/s: 2.1.1
Fix Version/s: 2.1.2

Type: Bug Priority: Major - P3
Reporter: Andy Schwerin Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: Windows
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

windows server 2003, windows xp


Operating System: Windows
Participants:

 Description   

We had temporarily changed the source code to always build the 2008+ version for Windows, but this version doesn't work on Windows XP or Windows Server 2003. Since we support those OS versions, we need to go back to building both 2008+ and non-2008+ versions.



 Comments   
Comment by auto [ 19/May/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-5867 Use CRITICAL_SECTION for non-SRW Windows locks

Also related to SERVER-2942. The non-2008plus Windows builds was using
the Microsoft Concurrency Runtime for the SimpleMutex class, but this
interacts badly with the Windows memory hooking code added for SERVER-2942.
A call to VirtualAlloc during thread creation would take out the SimpleMutex
for RemapLock, which (through the Concurrency Runtime) make another call
into VirtualAlloc, deadlocking the thread. I changed SimpleMutex to use
the Win32 CRITICAL_SECTION APIs, which do not allocate memory when taking
the critical section.
Branch: master
https://github.com/mongodb/mongo/commit/686b2b375dfe233032e2eb80e8c9a0175db53ca2

Comment by auto [ 18/May/12 ]

Author:

{u'login': u'tadmarshall', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-5867 Only use SRW locks in 2008plus build
Branch: master
https://github.com/mongodb/mongo/commit/e2ff1100dc1c8298de8b9f1b482553c6a5d1ac0e

Generated at Thu Feb 08 03:10:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.