We assumed that a connection that was being _destroy()ed could not also be inUse. I triggered this invariant by starting a mongod with ssl required and attempting to connect to it without using ssl:
> ./mongod --dbpath=data/db --sslMode requireSSL --sslPEMKeyFile /etc/ssl/mongodb.pem
|
mongod(_ZN5mongo15printStackTraceERSo+0x23) [0x7fd459fd35a3]
|
mongod(+0x2A0E1B5) [0x7fd459fd31b5]
|
mongod(+0x2A0DB4C) [0x7fd459fd2b4c]
|
libpthread.so.0(+0x10340) [0x7fd454633340]
|
libc.so.6(gsignal+0x39) [0x7fd454293cc9]
|
libc.so.6(abort+0x148) [0x7fd4542970d8]
|
mongod(_ZN5mongo15invariantFailedEPKcS1_j+0x17E) [0x7fd459f0ac0e]
|
mongod(_ZN5mongo9transport20TransportLayerLegacy8_destroyERNS0_7SessionE+0x165) [0x7fd459f00aa5]
|
mongod(_ZN5mongo9transport7SessionD2Ev+0x36) [0x7fd459efdad6]
|
mongod(+0x293851C) [0x7fd459efd51c]
|
mongod(+0x293840B) [0x7fd459efd40b]
|
mongod(+0x2938103) [0x7fd459efd103]
|
mongod(+0x2937F55) [0x7fd459efcf55]
|
libpthread.so.0(+0x8182) [0x7fd45462b182]
|
libc.so.6(clone+0x6D) [0x7fd45435800d]
|