[SERVER-16502] CollectionInfoCache being written without exclusive lock Created: 11/Dec/14 Updated: 15/Jan/15 Resolved: 02/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Index Maintenance |
| Affects Version/s: | 2.8.0-rc2 |
| Fix Version/s: | 2.8.0-rc5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Cailin Nelson | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | wiredtiger | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Happy to provide the full log, but doubt it is helpful in this case.
|
| Comments |
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by Githook User [ 02/Jan/15 ] | |||||||||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||||||||
| Comment by J Rassi [ 11/Dec/14 ] | |||||||||||||||||
|
Just spoke to milkie about this. My theory is that CollectionInfoCache::_indexedPaths is protected by the collection exclusive lock in MMAPv1, but it is being concurrently modified under a collection intent exclusive lock in WiredTiger. This member variable exists in order to help the update subsystem decide whether a given update is a "bit-blip update", in which case index key generation is skipped. I believe the core of the issue is that CollectionInfoCache::_indexedPaths is lazily initialized, and its accessor CollectionInfoCache::indexKeys() (which is called from the update subsystem) can write to this member variable under an intent lock if initialization hasn't happened yet. Assuming this is the case, a sufficient fix for this issue would be to remove the lazy initialization and make CollectionInfoCache::indexKeys() a const method. This would involve getting rid of CollectionInfoCache::_keysComputed and verifying that CollectionInfoCache::CollectionInfoCache() and CollectionInfoCache::addedIndex() are both always called under an exclusive lock. If all goes well, then CollectionInfoCache::_indexKeys would be written to only when the collection is opened or an index build completes (both of which should hold an exclusive lock), and would only be read from during an update (which should hold an intent lock). Assigning to Eric. | |||||||||||||||||
| Comment by Matt Kangas [ 11/Dec/14 ] | |||||||||||||||||
|
addr2line output on the debug artifacts
|