Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16578

Repeated mysql_library_init()+mysql_library_end() calls freeze running process

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Cannot Reproduce
    • 10.1(EOL)
    • N/A
    • Embedded Server
    • None

    Description

      When test test-init.c from CONC-336 is linked with `mysql_config --cflags --libmysqld-libs` then second run cause deadlock in inline_mysql_cond_destroy.

      $ gcc -W -Wall -O2 -g test-init.c -o test-init `mysql_config --cflags --libmysqld-libs`
      $ gdb --args ./test-init 2 127.0.0.1 3306 pali pali
      ...
      (gdb) r
      ...
      ^C
      Program received signal SIGINT, Interrupt.
      __lll_lock_wait_private () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
      95      ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adresár alebo súbor neexistuje.
      (gdb) bt
      #0  __lll_lock_wait_private () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
      #1  0x00007ffff6184eb5 in __pthread_cond_destroy (cond=cond@entry=0x7ffff7568ae0 <COND_thread_count>) at pthread_cond_destroy.c:34
      #2  0x00007ffff67436c0 in inline_mysql_cond_destroy (that=0x7ffff7568ae0 <COND_thread_count>) at ./include/mysql/psi/mysql_thread.h:1131
      #3  clean_up_mutexes () at ./libmysqld/../sql/mysqld.cc:2264
      #4  0x00007ffff6748974 in end_embedded_server () at ./libmysqld/lib_sql.cc:648
      #5  0x00007ffff674c7ec in mysql_server_end () at ./libmysql/libmysql.c:213
      #6  0x00005555555549e4 in main (argc=<optimized out>, argv=<optimized out>) at test-init.c:49
      (gdb)
      

      This is from MariaDB version 10.1.26, which is available in current Debian stable.

      So problem is in function mysql_server_end which cause that deadlock.

      Originally reported in comment: https://jira.mariadb.org/browse/CONC-336?focusedCommentId=111921&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-111921

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              pali Pali
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.