While investigating a build failure I came across an interesting scenario that can lead to a segmentation fault in WT.
We had two user connections running concurrent commands, one inserting a record and another doing a collection scan. At the same time, the machine was running out of memory and the swap file was full.
This caused the record insertion to fail and mongod masserted (it kills that operation only). Meanwhile, the collection scan kept going and eventually seg faulted by trying to dereference an invalid address inside WT.
Is this the expected behavior from WT or should it be safeguarded against this?