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

Fix deadlock in SchedulingTicketHolder

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.1.1, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v6.1
    • Execution Team 2022-08-22, Execution Team 2022-09-05
    • 160

      It seems that during execution of the benchmarks for ticketholders sometimes the SchedulingTicketHolder deadlocks.

       

      Thread 195: "ticketholder_bm" (Thread 0x7fdcd96d7700 (LWP 5353))
      Duplicate Thread 187: "ticketholder_bm" (Thread 0x7fdcdd6df700 (LWP 5345))
      Duplicate Thread 186: "ticketholder_bm" (Thread 0x7fdcddee0700 (LWP 5344))
      Duplicate Thread 173: "ticketholder_bm" (Thread 0x7fdce46ed700 (LWP 5331))
      #0  0x00007fdd3857e48c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
      #1  0x00005594a6514ddc in std::condition_variable::wait(std::unique_lock<std::mutex>&) ()
      #2  0x00005594a6155cbc in mongo::Interruptible::waitForConditionOrInterruptUntil<std::unique_lock<std::shared_mutex>, mongo::SchedulingTicketHolder::Queue::enqueue(mongo::Interruptible*, std::unique_lock<std::shared_mutex>&, mongo::Date_t const&)::{lambda()#2}>(mongo::stdx::condition_variable&, std::unique_lock<std::shared_mutex>&, mongo::Date_t, mongo::SchedulingTicketHolder::Queue::enqueue(mongo::Interruptible*, std::unique_lock<std::shared_mutex>&, mongo::Date_t const&)::{lambda()#2})::{lambda(mongo::Date_t, mongo::Interruptible::WakeSpeed)#3}::operator() ()
      #3  0x00005594a61577e9 in mongo::SchedulingTicketHolder::Queue::enqueue(mongo::Interruptible*, std::unique_lock<std::shared_mutex>&, mongo::Date_t const&) ()
      #4  0x00005594a6157ac1 in mongo::SchedulingTicketHolder::_waitForTicketUntilImpl(mongo::OperationContext*, mongo::AdmissionContext*, mongo::Date_t, mongo::TicketHolder::WaitMode) ()
      #5  0x00005594a6154998 in mongo::TicketHolderWithQueueingStats::waitForTicketUntil(mongo::OperationContext*, mongo::AdmissionContext*, mongo::Date_t, mongo::TicketHolder::WaitMode) ()
      #6  0x00005594a61548a2 in mongo::TicketHolderWithQueueingStats::waitForTicket(mongo::OperationContext*, mongo::AdmissionContext*, mongo::TicketHolder::WaitMode) ()
      #7  0x00005594a614c4b2 in void mongo::(anonymous namespace)::BM_acquireAndRelease<mongo::StochasticTicketHolder>(benchmark::State&) ()
      #8  0x00005594a62b42a0 in benchmark::internal::BenchmarkInstance::Run(unsigned long, int, benchmark::internal::ThreadTimer*, benchmark::internal::ThreadManager*) const ()
      #9  0x00005594a62ced57 in benchmark::internal::(anonymous namespace)::RunInThread(benchmark::internal::BenchmarkInstance const*, unsigned long, int, benchmark::internal::ThreadManager*) ()
      #10 0x00005594a6517c1f in execute_native_thread_routine ()
      #11 0x00007fdd385782de in start_thread () from /lib64/libpthread.so.0
      #12 0x00007fdd382a8a63 in clone () from /lib64/libc.so.6
      

            Assignee:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Reporter:
            jordi.olivares-provencio@mongodb.com Jordi Olivares Provencio
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: