[SERVER-7835] Shell crashes when canceling a query Created: 04/Dec/12  Updated: 26/Sep/17  Resolved: 18/Jan/13

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Agora Games Assignee: Tad Marshall
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux 2.6.38-13-server #56~lucid1-Ubuntu SMP Tue Feb 14 03:35:38 UTC 2012 x86_64 GNU/Linux


Issue Links:
Duplicate
duplicates SERVER-2986 Mongo CLI responds poorly to the use ... Closed
Operating System: ALL
Participants:
Case:

 Description   

When canceling a query, or canceling the output of a query, the 2.2.1 console crashes.

Tue Dec  4 08:33:56 Assertion: 13111:field not found, expected type 2
0x6073f1 0x5d1aa9 0x5d1c2c 0x4b7fc7 0x49f947 0x7fe792945af0 0x7fe79365cd3a 0x5f87d3 0x5f87e9 0x5fbdd4 0x5f4f5c 0x5f5a0b 0x5f5ec4 0x4f6695 0x5203dd 0x4eab4a 0x5010b4 0x5bd2ef 0x6aa5ac 0x69c025 
 mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x6073f1]
 mongo(_ZN5mongo11msgassertedEiPKc+0x99) [0x5d1aa9]
 mongo() [0x5d1c2c]
 mongo(_ZNK5mongo11shell_utils18ConnectionRegistry30killOperationsOnAllConnectionsEb+0xf17) [0x4b7fc7]
 mongo(_Z10quitNicelyi+0x27) [0x49f947]
 /lib/libc.so.6(+0x33af0) [0x7fe792945af0]
 /lib/libpthread.so.0(recv+0x6a) [0x7fe79365cd3a]
 mongo(_ZN5mongo6Socket5_recvEPci+0x13) [0x5f87d3]
 mongo(_ZN5mongo6Socket11unsafe_recvEPci+0x9) [0x5f87e9]
 mongo(_ZN5mongo6Socket4recvEPci+0xc4) [0x5fbdd4]
 mongo(_ZN5mongo13MessagingPort4recvERNS_7MessageE+0x8c) [0x5f4f5c]
 mongo(_ZN5mongo13MessagingPort4recvERKNS_7MessageERS1_+0x1b) [0x5f5a0b]
 mongo(_ZN5mongo13MessagingPort4callERNS_7MessageES2_+0x34) [0x5f5ec4]
 mongo(_ZN5mongo18DBClientConnection4callERNS_7MessageES2_bPSs+0x55) [0x4f6695]
 mongo(_ZN5mongo14DBClientCursor4initEv+0xbd) [0x5203dd]
 mongo(_ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xea) [0x4eab4a]
 mongo(_ZN5mongo18DBClientConnection5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xa4) [0x5010b4]
 mongo(_ZN5mongo10mongo_findEP9JSContextP8JSObjectjPlS4_+0x32f) [0x5bd2ef]
 mongo(js_Invoke+0x40c) [0x6aa5ac]
 mongo(js_Interpret+0x1305) [0x69c025]
Tue Dec  4 08:33:56 Error: field not found, expected type 2 src/mongo/shell/query.js:78
Tue Dec  4 08:33:56 ERROR: MessagingPort::call() wrong id got:b expect:e
  toSend op: 2004
  response msgid:31340691
  response len:  87
  response op:  1
  remote: 127.0.0.1:27017
Tue Dec  4 08:33:56   Assertion failure false src/mongo/util/net/message_port.cpp 241
0x6073f1 0x5d21bd 0x5f5c6c 0x5f5ec4 0x4f6695 0x5203dd 0x4eab4a 0x5010b4 0x5bd2ef 0x6aa5ac 0x69c025 0x6aa13f 0x668e46 0x668ec2 0x66a2ce 0x5cbcc4 0x4a1226 0x4a41f6 0x4a67e6 0x7fe792930c4d 
 mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x6073f1]
 mongo(_ZN5mongo12verifyFailedEPKcS1_j+0xfd) [0x5d21bd]
 mongo(_ZN5mongo13MessagingPort4recvERKNS_7MessageERS1_+0x27c) [0x5f5c6c]
 mongo(_ZN5mongo13MessagingPort4callERNS_7MessageES2_+0x34) [0x5f5ec4]
 mongo(_ZN5mongo18DBClientConnection4callERNS_7MessageES2_bPSs+0x55) [0x4f6695]
 mongo(_ZN5mongo14DBClientCursor4initEv+0xbd) [0x5203dd]
 mongo(_ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xea) [0x4eab4a]
 mongo(_ZN5mongo18DBClientConnection5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xa4) [0x5010b4]
 mongo(_ZN5mongo10mongo_findEP9JSContextP8JSObjectjPlS4_+0x32f) [0x5bd2ef]
 mongo(js_Invoke+0x40c) [0x6aa5ac]
 mongo(js_Interpret+0x1305) [0x69c025]
 mongo(js_Execute+0x36f) [0x6aa13f]
 mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x668e46]
 mongo(JS_EvaluateUCScript+0x22) [0x668ec2]
 mongo(JS_EvaluateScript+0x6e) [0x66a2ce]
 mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x144) [0x5cbcc4]
 mongo(_Z10execPromptRN5mongo5ScopeEPKcRSs+0x146) [0x4a1226]
 mongo(_Z5_mainiPPc+0x1ea6) [0x4a41f6]
 mongo(main+0x26) [0x4a67e6]
 /lib/libc.so.6(__libc_start_main+0xfd) [0x7fe792930c4d]
> 
Tue Dec  4 08:33:57 ERROR: MessagingPort::call() wrong id got:e expect:f
  toSend op: 2004
  response msgid:31340723
  response len:  619
  response op:  1
  remote: 127.0.0.1:27017
Tue Dec  4 08:33:57   Assertion failure false src/mongo/util/net/message_port.cpp 241
0x6073f1 0x5d21bd 0x5f5c6c 0x5f5ec4 0x4f6695 0x5203dd 0x4eab4a 0x5010b4 0x5bd2ef 0x6aa5ac 0x69c025 0x6aa13f 0x668e46 0x668ec2 0x66a2ce 0x5cbcc4 0x4a1226 0x4a41f6 0x4a67e6 0x7fe792930c4d 
 mongo(_ZN5mongo15printStackTraceERSo+0x21) [0x6073f1]
 mongo(_ZN5mongo12verifyFailedEPKcS1_j+0xfd) [0x5d21bd]
 mongo(_ZN5mongo13MessagingPort4recvERKNS_7MessageERS1_+0x27c) [0x5f5c6c]
 mongo(_ZN5mongo13MessagingPort4callERNS_7MessageES2_+0x34) [0x5f5ec4]
 mongo(_ZN5mongo18DBClientConnection4callERNS_7MessageES2_bPSs+0x55) [0x4f6695]
 mongo(_ZN5mongo14DBClientCursor4initEv+0xbd) [0x5203dd]
 mongo(_ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xea) [0x4eab4a]
 mongo(_ZN5mongo18DBClientConnection5queryERKSsNS_5QueryEiiPKNS_7BSONObjEii+0xa4) [0x5010b4]
 mongo(_ZN5mongo10mongo_findEP9JSContextP8JSObjectjPlS4_+0x32f) [0x5bd2ef]
 mongo(js_Invoke+0x40c) [0x6aa5ac]
 mongo(js_Interpret+0x1305) [0x69c025]
 mongo(js_Execute+0x36f) [0x6aa13f]
 mongo(JS_EvaluateUCScriptForPrincipals+0x66) [0x668e46]
 mongo(JS_EvaluateUCScript+0x22) [0x668ec2]
 mongo(JS_EvaluateScript+0x6e) [0x66a2ce]
 mongo(_ZN5mongo7SMScope4execERKNS_10StringDataERKSsbbbi+0x144) [0x5cbcc4]
 mongo(_Z10execPromptRN5mongo5ScopeEPKcRSs+0x146) [0x4a1226]
 mongo(_Z5_mainiPPc+0x1ea6) [0x4a41f6]
 mongo(main+0x26) [0x4a67e6]
 /lib/libc.so.6(__libc_start_main+0xfd) [0x7fe792930c4d]
> ^C



 Comments   
Comment by Ian Daniel [ 05/Dec/12 ]

Thank you for reporting this.

It looks like this is a manifestation of poor handling of Ctrl-C in the shell, as described in SERVER-2986. I have linked your report with that ticket.

Kind regards,
Ian

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