[SERVER-512] shell should terminate more gracefully on ctrl-c when waiting on the db Created: 01/Jan/10  Updated: 12/Jul/16  Resolved: 26/Feb/10

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: None
Fix Version/s: 1.2.4, 1.3.2

Type: Improvement Priority: Minor - P4
Reporter: Dwight Merriman Assignee: Aaron Staple
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

see below - ctrl-c while waiting for server to respond to getlasterror (server was blocked) results in a rather ugly shell stack trace, and an assertion that doesn't sound so good

> db.foo.insert(

{x:1}

)
^CAssertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /opt/local/include/boost/thread/pthread/recursive_mutex.hpp, line 62.
Fri Jan 1 19:56:16 mongo got signal 6 (Abort trap), stack trace:
Fri Jan 1 19:56:16 0x100011104 0x7fff806bdeaa 0x7fff80662bea 0x7fff80739e74 0x100090035 0x7fff80670334 0x7fff8067024c 0x10001091d 0x7fff806bdeaa 0x10043dbf0 0x100059198 0x10005c8af 0x100060691 0x100060c35 0x10006dc81 0x100081ba7 0x1002c0e13 0x1002c9001 0x1002cf8a6 0x100293edd
0 mongo 0x0000000100011104 _Z12quitAbruptlyi + 996
1 libSystem.B.dylib 0x00007fff806bdeaa _sigtramp + 26
2 libSystem.B.dylib 0x00007fff80662bea tiny_malloc_from_free_list + 1196
3 libSystem.B.dylib 0x00007fff80739e74 __pthread_markcancel + 0
4 mongo 0x0000000100090035 __tcf_10 + 53
5 libSystem.B.dylib 0x00007fff80670334 __cxa_finalize + 203
6 libSystem.B.dylib 0x00007fff8067024c exit + 18
7 mongo 0x000000010001091d _Z10quitNicelyi + 45
8 libSystem.B.dylib 0x00007fff806bdeaa _sigtramp + 26
9 ??? 0x000000010043dbf0 0x0 + 4299414512
10 mongo 0x0000000100059198 ZN5mongo13MessagingPort4callERNS_7MessageES2 + 664
11 mongo 0x000000010005c8af _ZN5mongo18DBClientConnection4callERNS_7MessageES2_b + 31
12 mongo 0x0000000100060691 _ZN5mongo14DBClientCursor4initEv + 241
13 mongo 0x0000000100060c35 _ZN5mongo12DBClientBase5queryERKSsNS_5QueryEiiPKNS_7BSONObjEi + 277
14 mongo 0x000000010006dc81 _ZN5mongo18DBClientConnection5queryERKSsNS_5QueryEiiPKNS_7BSONObjEi + 129
15 mongo 0x0000000100081ba7 ZN5mongo10mongo_findEP9JSContextP8JSObjectjPlS4 + 615
16 libjs.dylib 0x00000001002c0e13 js_Invoke + 2789
17 libjs.dylib 0x00000001002c9001 js_Interpret + 32101
18 libjs.dylib 0x00000001002cf8a6 js_Execute + 932
19 libjs.dylib 0x0000000100293edd JS_EvaluateUCScriptForPrincipals + 111



 Comments   
Comment by auto [ 25/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-512 MINOR looks like scope cache not used in shell, and releasing mutex is causing problems on server
http://github.com/mongodb/mongo/commit/39e349743a3df966ba394eb9fe4f123339f2d311

Comment by auto [ 25/Jan/10 ]

Author:

{'login': 'astaple', 'name': 'Aaron', 'email': 'aaron@10gen.com'}

Message: SERVER-512 prevent ugly boost assert on shell shutdown
http://github.com/mongodb/mongo/commit/1664c3da4f7c54ce014fec9e6f1e77c61130661d

Generated at Thu Feb 08 02:54:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.