Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69899

Possible bug with MySQL lock factory, is crashing entire Galera Cluster

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Deferred
    • Icon: Critical Critical
    • None
    • 3.9.2
    • Database SQL/XMLDB
    • None
    • MOODLE_39_STABLE

      Hello.

      I have deployed a Moodle Cluster version 3.9 with 3 webservers and 4 MariaDB 10.5.5 nodes with Galera Cluster (I also tried Mariadb 10.4.13) and Maxscale as Loadbalancer.

      But my Galera cluster constantly crashing, I have checked the logs and found the following:

      201007 16:48:02 [ERROR] mysqld got signal 11;
      This could be because you hit a bug. It is also possible that this binary
      or one of the libraries it was linked against is corrupt, improperly built,
      or misconfigured. This error can also be caused by malfunctioning hardware.
      To report this bug, see https://mariadb.com/kb/en/reporting-bugs
      We will try our best to scrape up some info that will hopefully help
      diagnose the problem, but since we have already crashed,
      something is definitely wrong and this may fail.
      Server version: 10.5.5-MariaDB-1: 10.5.5 + maria ~ buster-log
      key_buffer_size = 134217728
      read_buffer_size = 2097152
      max_used_connections = 12
      max_threads = 1502
      thread_count = 16
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size) * max_threads = 9396920 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x7fa174000c18
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong ...
      stack_bottom = 0x7fa7440bad58 thread_stack 0x49000
      / usr / sbin / mariadbd (my_print_stacktrace + 0x2e) [0x55c94d9b9ece]
      Printing to addr2line failed
      / usr / sbin / mariadbd (handle_fatal_signal + 0x485) [0x55c94d43c2d5]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7fa78d0ac730]
      / usr / sbin / mariadbd (_ZN8MDL_lock18reschedule_waitersEv + 0x1b) [0x55c94d34733b]
      / usr / sbin / mariadbd (_ZN8MDL_lock13remove_ticketEP7LF_PINSMS_NS_11Ticket_listEP10MDL_ticket + 0x94) [0x55c94d347
      / usr / sbin / mariadbd (_ZN11MDL_context12release_lockE17enum_mdl_durationP10MDL_ticket + 0x24) [0x55c94d347f24]
      / usr / sbin / mariadbd (_ZN22Item_func_release_lock7val_intEv + 0x20a) [0x55c94d49fd3a]
      / usr / sbin / mariadbd (_ZNK12Type_handler14Item_send_longEP4ItemP8ProtocolP8st_value + 0x19) [0x55c94d3aa9f9]
      / usr / sbin / mariadbd (_ZN8Protocol19send_result_set_rowEP4ListI4ItemE + 0xa3) [0x55c94d197723]
      / usr / sbin / mariadbd (_ZN11select_send9send_dataER4ListI4ItemE + 0x32) [0x55c94d202062]
      / usr / sbin / mariadbd (_ZN4JOIN10exec_innerEv + 0xbe6) [0x55c94d2ab2b6]
      / usr / sbin / mariadbd (_ZN4JOIN4execEv + 0x37) [0x55c94d2ab557]
      / usr / sbin / mariadbd (_Z12mysql_selectP3THDP10TABLE_LISTR4ListI4ItemEPS4_jP8st_orderS9_S7_S9_yP13select_result
      / usr / sbin / mariadbd (_Z13handle_selectP3THDP3LEXP13select_resultm + 0x14e) [0x55c94d2aa25e]
      / usr / sbin / mariadbd (+ 0x751539) [0x55c94d249539]
      / usr / sbin / mariadbd (_Z21mysql_execute_commandP3THD + 0x13ff) [0x55c94d252241]
      / usr / sbin / mariadbd (_Z11mysql_parseP3THDPcjP12Parser_statebb + 0x1bc) [0x55c94d244583]
      / usr / sbin / mariadbd (+ 0x74c070) [0x55c94d244070]
      / usr / sbin / mariadbd (_Z16dispatch_command19enum_server_commandP3THDPcjbb + 0x242c) [0x55c94d24ffe5]
      / usr / sbin / mariadbd (_Z10do_commandP3THD + 0x110) [0x55c94d250488]
      / usr / sbin / mariadbd (_Z24do_handle_one_connectionP7CONNECTb + 0x4c1) [0x55c94d33e031]
      / usr / sbin / mariadbd (handle_one_connection + 0x5d) [0x55c94d33e3bd]
      / usr / sbin / mariadbd (+ 0xb6b27b) [0x55c94d66327b]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3)[0x7fa78d0a1fa3]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fa78c5a54cf]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fa1740103b0): SELECT RELEASE_LOCK ('6be869571d63b89d2c50fcb2c53b64486bce9a27') AS unlocked
      Connection ID (thread ID): 6816
      Status: NOT_KILLED

      From this the following query stands out:

      SELECT RELEASE_LOCK ('6be869571d63b89d2c50fcb2c53b64486bce9a27') AS unlocked

      Which I believe the following code that calls this query has recently been implemented in Moodle 3.9:

      https://github.com/moodle/moodle/blob/d4d798e6843885f0176732fb44949f316203192e/lib/classes/lock/mysql_lock_factory.php#L141

      Also mention that I have deployed in production this same architecture with version 3.6 and 3.8 of Moodle which continue to work without problems.

       

      I thank all in advance for the support.

            Unassigned Unassigned
            jaimemejia jaimemejia
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.