Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3674

Deadlock in binlogrouter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.13
    • Fix Version/s: 2.5.15
    • Component/s: binlogrouter
    • Labels:
      None
    • Sprint:
      MXS-SPRINT-137

      Description

      It is possible for the binlogrouter to end up in a deadlock during a STOP SLAVE command. The following was encountered during a test run in the pinloki_select_master test:

      Writer thread:
       
      Thread 14 (Thread 0x7feb73fff700 (LWP 1890)):
      #0  0x00007feb8dda1b3b in do_futex_wait.constprop.1 () from /lib64/libpthread.so.0
      #1  0x00007feb8dda1bcf in __new_sem_wait_slow.constprop.0 () from /lib64/libpthread.so.0
      #2  0x00007feb8dda1c6b in sem_wait@@GLIBC_2.2.5 () from /lib64/libpthread.so.0
      #3  0x00007feb8eef0ab1 in maxbase::Semaphore::wait (this=0x7feb73ffba30, signal_approach=maxbase::Semaphore::IGNORE_SIGNALS) at /home/timofey_turenko_mariadb_com/MaxScale/maxutils/maxbase/include/maxbase/semaphore.hh:144
      #4  0x00007feb8efaf185 in maxbase::Worker::call(std::function<void ()>, maxbase::Worker::execute_mode_t) (this=0x7fffbfb46320, func=..., mode=maxbase::Worker::EXECUTE_AUTO) at /home/timofey_turenko_mariadb_com/MaxScale/maxutils/maxbase/src/worker.cc:535
      #5  0x00007feb80b67fbe in pinloki::Writer::get_connection_details (this=0x176f080) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/writer.cc:77
      #6  0x00007feb80b68235 in pinloki::Writer::has_master_changed (this=0x176f080, conn=...) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/writer.cc:109
      #7  0x00007feb80b688ba in pinloki::Writer::run (this=0x176f080) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/writer.cc:151
      ...
       
      Other thread:
       
      Thread 9 (Thread 0x7feb82127700 (LWP 1888)):
      #0  0x00007feb8dd9d017 in pthread_join () from /lib64/libpthread.so.0
      #1  0x00007feb8d0890f7 in std::thread::join() () from /lib64/libstdc++.so.6
      #2  0x00007feb80b67e73 in pinloki::Writer::~Writer (this=0x176f080, __in_chrg=<optimized out>) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/writer.cc:70
      #3  0x00007feb80b416f6 in std::default_delete<pinloki::Writer>::operator() (this=0x176f408, __ptr=0x176f080) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/unique_ptr.h:78
      #4  0x00007feb80b3f79f in std::unique_ptr<pinloki::Writer, std::default_delete<pinloki::Writer> >::reset (this=0x176f408, __p=0x176f080) at /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/unique_ptr.h:376
      #5  0x00007feb80b37c22 in pinloki::Pinloki::stop_slave (this=0x176f280) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/pinloki.cc:558
      #6  0x00007feb80b4acb4 in pinloki::PinlokiSession::stop_slave (this=0x7feb78014610) at /home/timofey_turenko_mariadb_com/MaxScale/server/modules/routing/pinloki/pinlokisession.cc:392
      ...
      

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration