[SERVER-15263] Guard setting -D_GLIBCXX_DEBUG behind a flag Created: 15/Sep/14  Updated: 19/May/22  Resolved: 16/Sep/14

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.7.7

Type: New Feature Priority: Major - P3
Reporter: Andy Schwerin Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-23082 race in ThreadPoolTaskExecutor betwee... Closed
is related to SERVER-12189 For debug builds using libstdc++, ena... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

On GCC 4.8.2 on Ubuntu 14.04, there appears to be a concurrency error in the _GLIBCXX_DEBUG version of std::list<T> that leads to segfaults. I've dug down into it, and thus far failed to make the crashing uses of std::list<T> crash without _GLIBCXX_DEBUG. Any of the C++ unit tests in src/mongo/db/repl that make serious use of ReplicationExecutor crash within 500 runs on my desktop with _GLIBCXX_DEBUG enabled, but run without issue for tens of thousands of iterations without it enabled.

So, I propose to guard _GLIBCXX_DEBUG with a SCons flag, --enable-glibcxx-debug, and default it to off.



 Comments   
Comment by Githook User [ 16/Sep/14 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@mongodb.com'}

Message: SERVER-15263 Guard -D_GLIBCXX_DEBUG behind a SCons flag.

Per the message in the JIRA ticket, the _GLIBCXX_DEBUG versions of std::list<T>
type appears to have a concurrency error that leads to segfaults not related to
the code under test.
Branch: master
https://github.com/mongodb/mongo/commit/c7b0fc8e6a9147f8c66ec212afe314e8b68f5341

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