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

Race condition between startup/shutdown and signal delivery

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 2.3.21, 2.4.11
    • Core
    • None

    Description

      Ran into a repeating crash when running the mxs621_unreadable_cnf test. Upon further inspection, there is a race condition in the shutdown code where the workers have already stopped when the signal is delivered.

      #0  0x00007fed7bcd5207 in raise () from /lib64/libc.so.6
      #1  0x00007fed7bcd68f8 in abort () from /lib64/libc.so.6
      #2  0x00007fed7bcce026 in __assert_fail_base () from /lib64/libc.so.6
      #3  0x00007fed7bcce0d2 in __assert_fail () from /lib64/libc.so.6
      #4  0x00007fed7e6a58f4 in mxb_log_message (priority=1, modname=0x0, file=0x417b28 "/home/vagrant/MaxScale/server/core/gateway.cc", line=422, 
          function=0x41a3f0 <sigfatal_handler(int)::__func__> "sigfatal_handler", format=0x417cb0 "Fatal: MaxScale 2.3.9 received fatal signal %d. Attempting backtrace.")
          at /home/vagrant/MaxScale/maxutils/maxbase/src/log.cc:710
      #5  0x000000000040c8cc in sigfatal_handler (i=6) at /home/vagrant/MaxScale/server/core/gateway.cc:422
      #6  <signal handler called>
      #7  0x00007fed7bcd5207 in raise () from /lib64/libc.so.6
      #8  0x00007fed7bcd68f8 in abort () from /lib64/libc.so.6
      #9  0x00007fed7bcce026 in __assert_fail_base () from /lib64/libc.so.6
      #10 0x00007fed7bcce0d2 in __assert_fail () from /lib64/libc.so.6
      #11 0x00007fed7e6a58f4 in mxb_log_message (priority=1, modname=0x0, file=0x417b28 "/home/vagrant/MaxScale/server/core/gateway.cc", line=422, 
          function=0x41a3f0 <sigfatal_handler(int)::__func__> "sigfatal_handler", format=0x417cb0 "Fatal: MaxScale 2.3.9 received fatal signal %d. Attempting backtrace.")
          at /home/vagrant/MaxScale/maxutils/maxbase/src/log.cc:710
      #12 0x000000000040c8cc in sigfatal_handler (i=11) at /home/vagrant/MaxScale/server/core/gateway.cc:422
      #13 <signal handler called>
      #14 0x00007fed7e669a32 in maxscale::RoutingWorker::get (worker_id=-1) at /home/vagrant/MaxScale/server/core/routingworker.cc:456
      #15 0x00007fed7e62f239 in maxscale_shutdown () at /home/vagrant/MaxScale/server/core/misc.cc:54
      #16 0x000000000040c671 in sigterm_handler (i=15) at /home/vagrant/MaxScale/server/core/gateway.cc:350
      #17 <signal handler called>
      #18 0x00007fed78badc90 in cleanup_fscreatecon () from /lib64/libkrb5support.so.0
      #19 0x00007fed7ea45fba in _dl_fini () from /lib64/ld-linux-x86-64.so.2
      #20 0x00007fed7bcd8b69 in __run_exit_handlers () from /lib64/libc.so.6
      #21 0x00007fed7bcd8bb7 in exit () from /lib64/libc.so.6
      #22 0x00007fed7bcc13dc in __libc_start_main () from /lib64/libc.so.6
      #23 0x000000000040c319 in _start ()
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.