[SERVER-11333] C++ __declspec( thread ) causes a crash in a managed windows environment Created: 23/Oct/13 Updated: 11/Jul/16 Resolved: 24/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | None |
| Fix Version/s: | 2.5.4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Charlie Page | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
The windows C++ driver crashes in the Windows managed environment with replica set connection. |
| Comments |
| Comment by Andrew Morrow (Inactive) [ 25/Oct/13 ] |
|
david.x.burt@barclays.com: It was mentioned to me that you are currently using 2.5.2, rather than 2.5.3. We think you should stay with 2.5.2 for now, so I've re-formulated the patch against 2.5.2, attached above as |
| Comment by Andrew Morrow (Inactive) [ 25/Oct/13 ] |
|
david.x.burt@barclays.com: The attached patch should apply cleanly with 'git apply If you could please verify that a driver built with this flag functions correctly within your managed environment it would be much appreciated. Thanks, |
| Comment by Andrew Morrow (Inactive) [ 24/Oct/13 ] |
|
A new build flag has been added to SCons to address this issue: --disable-declspec-thread. Builds passing this flag will not use __declspec(thread) when building with MSVC. Instead we fall back to whatever implementation boost::thread_specific_ptr uses internally (presumably TlsAlloc, TlsSetValue, etc.). Note that if boost::thread_specific_ptr ever started using __declspec(thread) internally this problem would re-occur. Note that this option should never be used to build the server or tools. It is only for building the C++ driver by way of the install-mongoclient target, and it exists only to facilitate using the C++ driver in a managed environment. |
| Comment by auto [ 24/Oct/13 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |
| Comment by auto [ 24/Oct/13 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@10gen.com'}Message: |