[SERVER-28958] Windows --dbg=on --opt=off build of mongod does not start Created: 25/Apr/17 Updated: 30/Oct/23 Resolved: 26/Apr/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Internal Code |
| Affects Version/s: | 3.5.7 |
| Fix Version/s: | 3.5.7 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Kaloian Manassiev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | Build Windows Enterprise using this command line (the library paths are relative to my development machine):
|
||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
It looks like the static initializer for ResourceId runs before that of StringData::ComparatorInterface and the process won't start:
This is most likely a result of the recent vtable changes. |
| Comments |
| Comment by Githook User [ 26/Apr/17 ] |
|
Author: {u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 25/Apr/17 ] |
|
Actually, it is ASAN that can do this, not UBSAN: https://github.com/google/sanitizers/wiki/AddressSanitizerInitializationOrderFiasco |
| Comment by Andrew Morrow (Inactive) [ 25/Apr/17 ] |
|
Details on what is going wrong here:
This is a classic initialization order fiasco, which is a form of undefined behavior. This UB was latent in the codebase; it just chose to exhibit symptoms recently. Possible remedies would include:
In general, we are far to profligate with our use of file scoped statics, and the codebase is rife with these errors. This is unfortunate, because it means that we can't actually enable the UBSAN check that would call this out for us. |