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

logging in ~ReplicaSetMonitor() crashes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 2.4.6
    • Fix Version/s: 2.4.9, 2.5.3
    • Component/s: Internal Client
    • Labels:
    • Environment:
      Linux
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      Linux
    • Steps To Reproduce:
      Hide

      probably like this:

      use mongo::ScopedDbConnection and shutdown aplication

      Show
      probably like this: use mongo::ScopedDbConnection and shutdown aplication

      Description

      A server application with integrated MongoDB C++ Driver 2.4.6 crashes on shutdown.

      The crash might be related to src/mongo/client/dbclient_rs.cpp:408.

      We see: "Logstream::get called in uninitialized state". Calling "mongo::initLogging()" previously did not help and is also not an option because it seems to totally hijack stdout and stderr. We could not see this problem with 2.4.5.

      Stacktrace:

      #0 0x00007fe92870b88d in __libc_waitpid (pid=<optimized out>, stat_loc=<optimized out>, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:41
      #1 0x0000000001abd65c in print_gdb_stack_trace_and_die () at .../stacktrace.cpp:32
      #2 0x0000000001abd67e in stack_trace_signal_handler (sig=<optimized out>) at .../stacktrace.cpp:51
      #3 <signal handler called>
      #4 0x00007fe9263f8425 in __GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
      #5 0x00007fe9263fbb8b in __GI_abort () at abort.c:91
      #6 0x00007fe9263f10ee in __assert_fail_base (fmt=<optimized out>, assertion=0x1f81105 "!pthread_mutex_lock(&m)", file=0x1f69510 ".../include/boost-1.48.0/boost/thread/pthread/mutex.hpp", line=<optimized out>, function=<optimized out>) at assert.c:94
      #7 0x00007fe9263f1192 in _GI__assert_fail (assertion=0x1f81105 "!pthread_mutex_lock(&m)", file=0x1f69510 ".../include/boost-1.48.0/boost/thread/pthread/mutex.hpp", line=137, function=0x1f89f20 "void boost::timed_mutex::lock()") at assert.c:103
      #8 0x0000000001b664e7 in mongo::Logstream::flush(mongo::Tee*) ()
      #9 0x0000000001b66a8e in mongo::Logstream::operator<<(std::ostream& (std::ostream&)) ()
      #10 0x0000000001b2e6ff in mongo::ReplicaSetMonitor::~ReplicaSetMonitor() ()
      #11 0x0000000001b3ca92 in boost::detail::sp_counted_impl_p<mongo::ReplicaSetMonitor>::dispose() ()
      #12 0x0000000001b3b27c in std::_Rb_tree<std::string, std::pair<std::string const, boost::shared_ptr<mongo::ReplicaSetMonitor> >, std::_Select1st<std::pair<std::string const, boost::shared_ptr<mongo::ReplicaSetMonitor> > >, std::less<std::string>, std::allocator<std::pair<std::string const, boost::shared_ptr<mongo::ReplicaSetMonitor> > > >::_M_erase(std::_Rb_tree_node<std::pair<std::string const, boost::shared_ptr<mongo::ReplicaSetMonitor> > >*) ()
      #13 0x00007fe9263fd901 in __run_exit_handlers (status=1, listp=0x7fe92677a688, run_list_atexit=true) at exit.c:78
      #14 0x00007fe9263fd985 in __GI_exit (status=<optimized out>) at exit.c:100
      #15 0x00007fe9263e3774 in __libc_start_main (main=0xf73db0 <main>, argc=3, ubp_av=0x7fff57ea54b8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff57ea54a8) at libc-start.c:258
      #16 0x0000000000f7a581 in _start ()

        Attachments

          Activity

            People

            Assignee:
            renctan Randolph Tan
            Reporter:
            ingo.schramm Ingo Schramm
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: