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

race condition in currentOp

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Concurrency
    • None
    • Fully Compatible
    • ALL
    • Hide

      No reliable reproducer, but evalc.js occasionally triggers this on a debug build.

      Show
      No reliable reproducer, but evalc.js occasionally triggers this on a debug build.
    • Quint Iteration 3.1.2, Quint Iteration 5
    • 0

      As evidenced by spurious failures in evalc.js, there is a race condition in the currentOp command that causes it to access freed memory.

      The test failed due to timeout after the following failure:

      2014-12-10 18:04:17 EST	
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\util\log.cpp(136)                                  mongo::logContext+0xd7
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\util\assert_util.cpp(212)                          mongo::msgasserted+0x114
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\util\assert_util.cpp(204)                          mongo::msgasserted+0x1a
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\util\net\message.h(83)                             mongo::opToString+0x124
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\db\curop.cpp(170)                                  mongo::CurOp::reportState+0x166
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\db\currentop_command.cpp(126)                      mongo::inProgCmd+0x80c
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\db\instance.cpp(328)                               mongo::assembleResponse+0x188
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\db\db.cpp(195)                                     mongo::MyMessageHandler::process+0xb6
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\mongo\util\net\message_server_port.cpp(235)              mongo::PortMessageServer::handleIncomingMsg+0x7ef
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    ...\src\third_party\boost\libs\thread\src\win32\thread.cpp(185)  boost::`anonymous namespace'::thread_start_function+0x21
      2014-12-10T23:04:17.327+0000 I CONTROL  [conn19] mongod.exe    f:\dd\vctools\crt\crtw32\startup\threadex.c(376)                 _callthreadstartex+0x25
      2014-12-10T23:04:17.328+0000 I CONTROL  [conn19] mongod.exe    f:\dd\vctools\crt\crtw32\startup\threadex.c(359)                 _threadstartex+0xe7
      2014-12-10T23:04:17.328+0000 I CONTROL  [conn19] kernel32.dll                                                                   BaseThreadInitThunk+0xd
      2014-12-10T23:04:17.328+0000 I CONTROL  [conn19] 
      2014-12-10T23:04:17.328+0000 I NETWORK  [conn19] AssertionException handling request, closing client connection: 16141 cannot translate opcode -842150451
      

      The opcode corresponds to 0xCDCDCDCD, which is the fill code for deleted memory in the debug build.

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            geert.bosch@mongodb.com Geert Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: