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

logv2 shutdown use-after-dtor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.4
    • Component/s: Internal Code
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Steps To Reproduce:
      Hide

          $ gdb --args build/static_gcc_ninja/mongo/db/db_unittests --suite=DBRAIITestFixture --filter=AutoGetCollectionForReadGlobalLockDeadline --repeat=1

      Show
          $ gdb --args build/static_gcc_ninja/mongo/db/db_unittests --suite=DBRAIITestFixture --filter=AutoGetCollectionForReadGlobalLockDeadline --repeat=1
    • Sprint:
      Dev Tools 2020-03-09

      Description

       

       

       

      2020-02-06T02:19:37.296-0500 I - [main] TOTALS | tests: 1 | fails: 0 | assert calls: 0 | time secs: 4.783
       2020-02-06T02:19:37.296-0500 I - [main] SUCCESS - All tests in all suites passed
       pure virtual method called
      Thread 1 "db_unittests" received signal SIGSEGV, Segmentation fault.
       mongo::logv2::detail::doLogImpl (id=0, severity=..., options=..., message=..., attrs=...) at src/mongo/logv2/log_detail.cpp:51
       51 auto& source = options.domain().internal().source();
       (gdb) bt
       #0 mongo::logv2::detail::doLogImpl (id=0, severity=..., options=..., message=..., attrs=...) at src/mongo/logv2/log_detail.cpp:51
       #1 0x000055555b8983d6 in mongo::logv2::detail::doLog<char [3], mongo::StringData&> (id=0, severity=..., options=..., message=..., args#0=...)
       at src/mongo/logv2/log_detail.h:61
       #2 0x000055555b897f06 in mongo::logger::LogV2Appender<mongo::logger::MessageEventEphemeral>::append (this=0x7ffff065d9d0, event=...)
       at src/mongo/logger/logv2_appender.h:102
       #3 0x000055555b89d19c in mongo::logger::LogDomain<mongo::logger::MessageEventEphemeral>::append (this=0x7ffff7f96f48, event=...) at src/mongo/logger/log_domain-impl.h:56
       #4 0x000055555b8f3534 in mongo::(anonymous namespace)::writeMallocFreeStreamToLog () at src/mongo/util/signal_handlers_synchronous.cpp:174
       #5 0x000055555b8f3721 in mongo::(anonymous namespace)::myTerminate () at src/mongo/util/signal_handlers_synchronous.cpp:236
       #6 0x000055555bb7ad76 in _cxxabiv1::_terminate(void ()) () at ../../../../src/combined/libstdc+-v3/libsupc+/eh_terminate.cc:47
       #7 0x000055555bb7adb1 in std::terminate () at ../../../../src/combined/libstdc+-v3/libsupc+/eh_terminate.cc:57
       #8 0x000055555bb862df in _cxxabiv1::_cxa_pure_virtual () at ../../../../src/combined/libstdc+-v3/libsupc+/pure.cc:50
       #9 0x000055555b8dd8ae in mongo::Mutex::_onQuickLock (this=0x55555dd762e0 <mongo::globalRSMonitorManager>) at src/mongo/platform/mutex.cpp:102
       #10 0x000055555b8dd5c8 in mongo::Mutex::lock (this=0x55555dd762e0 <mongo::globalRSMonitorManager>) at src/mongo/platform/mutex.cpp:51
       #11 0x0000555558e58b56 in std::lock_guard<mongo::Latch>::lock_guard (this=0x7fffffffda20, __m=...)
       at /opt/mongodbtoolchain/stow/gcc-v3.sFn/include/c++/8.2.0/bits/std_mutex.h:162
       #12 0x000055555b0c9fa9 in mongo::ReplicaSetMonitorManager::shutdown (this=0x55555dd762e0 <mongo::globalRSMonitorManager>)
       at src/mongo/client/replica_set_monitor_manager.cpp:165
       #13 0x000055555b0c92cc in mongo::ReplicaSetMonitorManager::~ReplicaSetMonitorManager (this=0x55555dd762e0 <mongo::globalRSMonitorManager>, __in_chrg=<optimized out>)
       at src/mongo/client/replica_set_monitor_manager.cpp:69
       #14 0x00007ffff6030041 in _run_exit_handlers (status=0, listp=0x7ffff63d8718 <_exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
       at exit.c:108
       #15 0x00007ffff603013a in __GI_exit (status=<optimized out>) at exit.c:139
       #16 0x00007ffff600eb9e in __libc_start_main (main=0x555558fd0c02 <main(int, char*, char*)>, argc=4, argv=0x7fffffffdcb8, init=<optimized out>, fini=<optimized out>,
       rtld_fini=<optimized out>, stack_end=0x7fffffffdca8) at ../csu/libc-start.c:344
       #17 0x0000555558c488ea in _start () at ../../../../src/combined/libstdc+-v3/libsupc+/eh_terminate.cc:51
       (gdb)
      

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henrik.edin Henrik Edin
              Reporter:
              billy.donahue Billy Donahue
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: