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

mysqld crash signal 11 in mysql_audit_general

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.0.7, 10.0.8
    • 10.0.9
    • None
    • None
    • Wheezy amd64

    Description

      If I run mysqld with the following command line

      sql/mysqld --defaults-file=/scratch/db/maria-container/maria-test.my.cnf --datadir=/scratch/db/maria-container/maria-test/data --lc-messages-dir=/scratch/develop/maria/bzr/maria-oqgraph-maintenance/build/sql/share --plugin-dir=`pwd`/storage/oqgraph -#d,oq-debug,info

      and I have a misconfigured entry for pid-file in my defaults file, such that the path is unwritable, I get a segfault when mysqld attempts to report the fact

      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7ffff7fd3700 (LWP 7842)]
      mysql_audit_general (error_code=error_code@entry=1, 
          msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1, thd=
          0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
      150	                       thd->db, thd->db_length);
      (gdb) bt
      #0  mysql_audit_general (error_code=error_code@entry=1, 
          msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1, 
          thd=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
      #1  0x000000000054ab83 in my_message_sql (error=1, 
          str=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", MyFlags=36)
          at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3418
      #2  0x0000000000b17a6b in my_error (nr=nr@entry=1, MyFlags=MyFlags@entry=36) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_error.c:125
      #3  0x0000000000b1d50d in my_register_filename (fd=fd@entry=-1, FileName=FileName@entry=0x136a440 "/home/maria/test/mysqld.pid", 
          type_of_file=type_of_file@entry=FILE_BY_CREATE, error_message_number=error_message_number@entry=1, MyFlags=MyFlags@entry=16)
          at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_open.c:159
      #4  0x0000000000b1779f in my_create (FileName=0x136a440 "/home/maria/test/mysqld.pid", CreateFlags=<optimized out>, access_flags=<optimized out>, MyFlags=16)
          at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_create.c:57
      #5  0x000000000054a5ca in inline_mysql_file_create (key=<optimized out>, src_line=src_line@entry=9218, 
          filename=filename@entry=0x136a440 "/home/maria/test/mysqld.pid", create_flags=create_flags@entry=436, access_flags=access_flags@entry=513, 
          myFlags=myFlags@entry=16, src_file=0xbac1c8 "/scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc")
          at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/include/mysql/psi/mysql_file.h:1001
      #6  0x000000000054af0e in create_pid_file () at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:9217
      #7  signal_hand (arg=arg@entry=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3265
      #8  0x00000000008e9740 in pfs_spawn_thread (arg=0x7fffe1fff2e8) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/storage/perfschema/pfs.cc:1853
      #9  0x00007ffff7bc7b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #10 0x00007ffff6918a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
      #11 0x0000000000000000 in ?? ()

      Attachments

        Activity

          andymc73 Andrew McDonnell created issue -
          serg Sergei Golubchik made changes -
          Field Original Value New Value
          Description If I run mysqld with the following command line

          sql/mysqld --defaults-file=/scratch/db/maria-container/maria-test.my.cnf --datadir=/scratch/db/maria-container/maria-test/data --lc-messages-dir=/scratch/develop/maria/bzr/maria-oqgraph-maintenance/build/sql/share --plugin-dir=`pwd`/storage/oqgraph -#d,oq-debug,info

          and I have a misconfigured entry for pid-file in my defaults file, such that the path is unwritable, I get a segfault when mysqld attempts to report the fact

          Program received signal SIGSEGV, Segmentation fault.
          [Switching to Thread 0x7ffff7fd3700 (LWP 7842)]
          mysql_audit_general (error_code=error_code@entry=1,
              msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1, thd=
              0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
          150 thd->db, thd->db_length);
          (gdb) bt
          #0 mysql_audit_general (error_code=error_code@entry=1,
              msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1,
              thd=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
          #1 0x000000000054ab83 in my_message_sql (error=1,
              str=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", MyFlags=36)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3418
          #2 0x0000000000b17a6b in my_error (nr=nr@entry=1, MyFlags=MyFlags@entry=36) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_error.c:125
          #3 0x0000000000b1d50d in my_register_filename (fd=fd@entry=-1, FileName=FileName@entry=0x136a440 "/home/maria/test/mysqld.pid",
              type_of_file=type_of_file@entry=FILE_BY_CREATE, error_message_number=error_message_number@entry=1, MyFlags=MyFlags@entry=16)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_open.c:159
          #4 0x0000000000b1779f in my_create (FileName=0x136a440 "/home/maria/test/mysqld.pid", CreateFlags=<optimized out>, access_flags=<optimized out>, MyFlags=16)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_create.c:57
          #5 0x000000000054a5ca in inline_mysql_file_create (key=<optimized out>, src_line=src_line@entry=9218,
              filename=filename@entry=0x136a440 "/home/maria/test/mysqld.pid", create_flags=create_flags@entry=436, access_flags=access_flags@entry=513,
              myFlags=myFlags@entry=16, src_file=0xbac1c8 "/scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc")
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/include/mysql/psi/mysql_file.h:1001
          #6 0x000000000054af0e in create_pid_file () at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:9217
          #7 signal_hand (arg=arg@entry=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3265
          #8 0x00000000008e9740 in pfs_spawn_thread (arg=0x7fffe1fff2e8) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/storage/perfschema/pfs.cc:1853
          #9 0x00007ffff7bc7b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
          #10 0x00007ffff6918a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
          #11 0x0000000000000000 in ?? ()

          If I run mysqld with the following command line
          {code}
          sql/mysqld --defaults-file=/scratch/db/maria-container/maria-test.my.cnf --datadir=/scratch/db/maria-container/maria-test/data --lc-messages-dir=/scratch/develop/maria/bzr/maria-oqgraph-maintenance/build/sql/share --plugin-dir=`pwd`/storage/oqgraph -#d,oq-debug,info
          {code}
          and I have a misconfigured entry for pid-file in my defaults file, such that the path is unwritable, I get a segfault when mysqld attempts to report the fact
          {noformat}
          Program received signal SIGSEGV, Segmentation fault.
          [Switching to Thread 0x7ffff7fd3700 (LWP 7842)]
          mysql_audit_general (error_code=error_code@entry=1,
              msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1, thd=
              0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
          150 thd->db, thd->db_length);
          (gdb) bt
          #0 mysql_audit_general (error_code=error_code@entry=1,
              msg=msg@entry=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", event_subtype=1,
              thd=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/sql_audit.h:150
          #1 0x000000000054ab83 in my_message_sql (error=1,
              str=0x7ffff7fd28f0 "Can't create/write to file '/home/maria/test/mysqld.pid' (Errcode: 2 \"No such file or directory\")", MyFlags=36)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3418
          #2 0x0000000000b17a6b in my_error (nr=nr@entry=1, MyFlags=MyFlags@entry=36) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_error.c:125
          #3 0x0000000000b1d50d in my_register_filename (fd=fd@entry=-1, FileName=FileName@entry=0x136a440 "/home/maria/test/mysqld.pid",
              type_of_file=type_of_file@entry=FILE_BY_CREATE, error_message_number=error_message_number@entry=1, MyFlags=MyFlags@entry=16)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_open.c:159
          #4 0x0000000000b1779f in my_create (FileName=0x136a440 "/home/maria/test/mysqld.pid", CreateFlags=<optimized out>, access_flags=<optimized out>, MyFlags=16)
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/mysys/my_create.c:57
          #5 0x000000000054a5ca in inline_mysql_file_create (key=<optimized out>, src_line=src_line@entry=9218,
              filename=filename@entry=0x136a440 "/home/maria/test/mysqld.pid", create_flags=create_flags@entry=436, access_flags=access_flags@entry=513,
              myFlags=myFlags@entry=16, src_file=0xbac1c8 "/scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc")
              at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/include/mysql/psi/mysql_file.h:1001
          #6 0x000000000054af0e in create_pid_file () at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:9217
          #7 signal_hand (arg=arg@entry=0x0) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/sql/mysqld.cc:3265
          #8 0x00000000008e9740 in pfs_spawn_thread (arg=0x7fffe1fff2e8) at /scratch/develop/maria/bzr/maria-oqgraph-maintenance/storage/perfschema/pfs.cc:1853
          #9 0x00007ffff7bc7b50 in start_thread (arg=<optimized out>) at pthread_create.c:304
          #10 0x00007ffff6918a7d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
          #11 0x0000000000000000 in ?? ()
          {noformat}

          serg Sergei Golubchik made changes -
          Assignee Alexey Botchkov [ holyfoot ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.0.9 [ 14400 ]
          serg Sergei Golubchik made changes -
          Priority Major [ 3 ] Critical [ 2 ]
          holyfoot Alexey Botchkov made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          holyfoot Alexey Botchkov made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow defaullt [ 34223 ] MariaDB v2 [ 43033 ]
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 43033 ] MariaDB v3 [ 62071 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 62071 ] MariaDB v4 [ 147481 ]

          People

            holyfoot Alexey Botchkov
            andymc73 Andrew McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.