[SERVER-19489] Assertion failure and segfault in WorkingSet::free in 3.0.5-rc0 Created: 20/Jul/15  Updated: 27/Jul/15  Resolved: 20/Jul/15

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 3.0.5

Type: Bug Priority: Critical - P2
Reporter: Bruce Lucas (Inactive) Assignee: David Storch
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-18926 Full text search extremely slow and u... Closed
is related to SERVER-18961 Avoid iterating the entire working se... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Quint Iteration 6
Participants:

 Description   

Running iibench; instructions forthcoming

2015-07-20T10:03:16.642-0400 I -        [conn156] Assertion failure i < _data.size() src/mongo/db/exec/working_set.cpp 70
2015-07-20T10:03:16.652-0400 I CONTROL  [conn156]
 0xf5e289 0xf07051 0xeeb63e 0xa22726 0xa236a3 0xbc53e6 0xb93ba5 0xaa3250 0x7e9a6d 0xf1b6fb 0x7f9b78bca182 0x7f9b77ccb47d
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"400000","o":"B5E289"},{"b":"400000","o":"B07051"},{"b":"400000","o":"AEB63E"},{"b":"400000","o":"622726"},{"b":"400000","o":"6236A3"},{"b":"400000","o":"7C53E6"},{"b":"400000","o":"79\
3BA5"},{"b":"400000","o":"6A3250"},{"b":"400000","o":"3E9A6D"},{"b":"400000","o":"B1B6FB"},{"b":"7F9B78BC2000","o":"8182"},{"b":"7F9B77BD1000","o":"FA47D"}],"processInfo":{ "mongodbVersion" : "3.0.5-rc0"\
, "gitVersion" : "4bc39c948e4f8fca3d6cef04e4469f5d99dcb297", "uname" : { "sysname" : "Linux", "release" : "3.13.0-32-generic", "version" : "#57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014", "machine" : "x86_\
64" }, "somap" : [ { "elfType" : 2, "b" : "400000" }, { "b" : "7FFF116FE000", "elfType" : 3 }, { "b" : "7F9B78BC2000", "path" : "/lib/x86_64-linux-gnu/libpthread.so.0", "elfType" : 3 }, { "b" : "7F9B789B\
A000", "path" : "/lib/x86_64-linux-gnu/librt.so.1", "elfType" : 3 }, { "b" : "7F9B787B6000", "path" : "/lib/x86_64-linux-gnu/libdl.so.2", "elfType" : 3 }, { "b" : "7F9B784B2000", "path" : "/usr/lib/x86_6\
4-linux-gnu/libstdc++.so.6", "elfType" : 3 }, { "b" : "7F9B781AC000", "path" : "/lib/x86_64-linux-gnu/libm.so.6", "elfType" : 3 }, { "b" : "7F9B77F96000", "path" : "/lib/x86_64-linux-gnu/libgcc_s.so.1", \
"elfType" : 3 }, { "b" : "7F9B77BD1000", "path" : "/lib/x86_64-linux-gnu/libc.so.6", "elfType" : 3 }, { "b" : "7F9B78DE0000", "path" : "/lib64/ld-linux-x86-64.so.2", "elfType" : 3 } ] }}
 mongod(_ZN5mongo15printStackTraceERSo+0x29) [0xf5e289]
 mongod(_ZN5mongo10logContextEPKc+0xE1) [0xf07051]
 mongod(_ZN5mongo12verifyFailedEPKcS1_j+0xCE) [0xeeb63e]
 mongod(_ZN5mongo10WorkingSet4freeERKm+0x66) [0xa22726]
 mongod(_ZN5mongo16WorkingSetCommon17forceFetchAllLocsEPNS_16OperationContextEPNS_10WorkingSetEPKNS_10CollectionE+0xD3) [0xa236a3]
 mongod(_ZN5mongo12PlanExecutor9saveStateEv+0x56) [0xbc53e6]
 mongod(_ZN5mongo8runQueryEPNS_16OperationContextERNS_7MessageERNS_12QueryMessageERKNS_15NamespaceStringERNS_5CurOpES3_+0x11C5) [0xb93ba5]
 mongod(_ZN5mongo16assembleResponseEPNS_16OperationContextERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0xB10) [0xaa3250]
 mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0xDD) [0x7e9a6d]
 mongod(_ZN5mongo17PortMessageServer17handleIncomingMsgEPv+0x34B) [0xf1b6fb]
 libpthread.so.0(+0x8182) [0x7f9b78bca182]
 libc.so.6(clone+0x6D) [0x7f9b77ccb47d]
-----  END BACKTRACE  -----
2015-07-20T10:03:16.652-0400 I QUERY    [conn156] assertion 0 assertion src/mongo/db/exec/working_set.cpp:70 ns:iibench.purchases_index query:{ $or: [ { price: 601.9638350123846, customerid: { $gte: 5995\
5 } }, { price: { $gt: 601.9638350123846 } } ] }
2015-07-20T10:03:16.652-0400 I QUERY    [conn156]  ntoskip:0 ntoreturn:4
2015-07-20T10:03:16.691-0400 I -        [conn144] Assertion failure i < _data.size() src/mongo/db/exec/working_set.cpp 70
2015-07-20T10:03:16.691-0400 F -        [conn143] Invalid access at address: 0xffffffffffffffe8
2015-07-20T10:03:16.705-0400 F -        [conn143] Got signal: 11 (Segmentation fault).



 Comments   
Comment by Githook User [ 20/Jul/15 ]

Author:

{u'username': u'dstorch', u'name': u'David Storch', u'email': u'david.storch@10gen.com'}

Message: SERVER-19489 WorkingSet::clear() now clears the list of WorkingSetIDs that need to be examined on yield

Fixes an assertion failure that could be triggered by a rooted $or query.
Branch: v3.0
https://github.com/mongodb/mongo/commit/9baa685a5b73b3c608e25652ec67e287227f8477

Comment by David Storch [ 20/Jul/15 ]

I can confirm that this issue was introduced by the fix for SERVER-18926. It only affects rooted $or queries, as it has to do with the SubplanStage's management of the WorkingSet. I can reproduce it reliably against a debug build of 3.0.5-rc0, configured to use WT. Note that a similar issue to SERVER-18926 was fixed on the master branch under SERVER-18961. However, this issue does not affect the master branch.

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