Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-512

shell should terminate more gracefully on ctrl-c when waiting on the db

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.2.4, 1.3.2
    • Affects Version/s: None
    • Component/s: Shell
    • Labels:
      None

      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

            Assignee:
            aaron Aaron Staple
            Reporter:
            dwight@mongodb.com Dwight Merriman
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: