[SERVER-6207] Windows version of printStackTrace is not thread-safe Created: 25/Jun/12  Updated: 11/Jul/16  Resolved: 11/Oct/12

Status: Closed
Project: Core Server
Component/s: Diagnostics, Logging
Affects Version/s: 2.1.2
Fix Version/s: 2.2.2, 2.3.0

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

Windows


Backwards Compatibility: Fully Compatible
Operating System: Windows
Participants:

 Description   

If a second or later thread calls printStackTrace() on Windows while a first thread is in that code:
1) The later call may fail in its call to SymInitialize(), so no stack trace will be displayed;
2) Stack trace lines will be interspersed, making the traces hard to read.

This has happened a few times in Buildbot. So far, it does not appear to crash or cause other problems.



 Comments   
Comment by auto [ 06/Nov/12 ]

Author:

{u'date': u'2012-10-09T19:46:22Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}

Message: SERVER-6207 protect printWindowsStackTrace() with critical section

Use SimpleMutex::scoped_lock to make printWindowsStackTrace() run in
only one thread at a time.
Branch: v2.2
https://github.com/mongodb/mongo/commit/b6c9d3bfb3c4a0df09e840c6713578f48dc55b3a

Comment by auto [ 11/Oct/12 ]

Author:

{u'date': u'2012-10-09T12:46:22-07:00', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}

Message: SERVER-6207 protect printWindowsStackTrace() with critical section

Use SimpleMutex::scoped_lock to make printWindowsStackTrace() run in
only one thread at a time.
Branch: master
https://github.com/mongodb/mongo/commit/141d37354538ee2eacb8f2c8e9a36871a31ac52d

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