[MDEV-26950] mysqld got signal 6 Created: 2021-11-01  Updated: 2022-01-20  Resolved: 2022-01-20

Status: Closed
Project: MariaDB Server
Component/s: Compiling, SSL
Affects Version/s: 10.6.4
Fix Version/s: 10.2.42, 10.3.33, 10.4.23, 10.5.14, 10.6.6, 10.7.2, 10.8.1

Type: Bug Priority: Major
Reporter: Mingli-Yu Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates MDEV-27102 MariaDB Crash (Signal 11) when runnin... Closed
PartOf
is part of MDEV-25785 Add support for OpenSSL 3.0 Closed

 Description   

# mysql_install_db --basedir=/usr
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
/usr/bin/mysql_install_db: line 525:  1690 Aborted                 "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silenK
 
Installation of system tables failed!  Examine the logs in
/var/log/mysqld.log or /var/lib/mysql for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
 
and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:
 
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables;
 
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql that may be helpful.
 
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
 
Please check all of the above before submitting a bug report
at https://mariadb.org/jira
 
 
 
# cat /var/log/mysqld.log
*** stack smashing detected ***: terminated
211101  7:45:29 [ERROR] mysqld got signal 6 ;
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.6.4-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467956 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x5604a0d51f18
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 = 0x7ffd1180fee8 thread_stack 0x49000
/usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x56049fb1233e]
/usr/sbin/mariadbd(handle_fatal_signal+0x478)[0x56049f66bac8]
/lib64/libc.so.6(+0x418f0)[0x7f4b0cec68f0]
/lib64/libc.so.6(pthread_kill+0x43)[0x7f4b0cf11693]
/lib64/libc.so.6(raise+0x16)[0x7f4b0cec6846]
/lib64/libc.so.6(abort+0xc5)[0x7f4b0ceb17a3]
/lib64/libc.so.6(__libc_fatal+0x0)[0x7f4b0cf05e50]
/lib64/libc.so.6(__fortify_fail+0x2a)[0x7f4b0cf9ec4a]
/lib64/libc.so.6(+0x119c14)[0x7f4b0cf9ec14]
/usr/sbin/mariadbd(+0xacc8b5)[0x56049f86c8b5]
/usr/sbin/mariadbd(_ZN10TABLE_LIST8calc_md5EPKc+0x33)[0x56049f530533]
/usr/sbin/mariadbd(_Z17mysql_create_viewP3THDP10TABLE_LIST21enum_view_create_mode+0x9e1)[0x56049f5214b1]
/usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x2249)[0x56049f45ef79]
/usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x56049f462098]
/usr/sbin/mariadbd(_Z9bootstrapP13st_mysql_file+0x23e)[0x56049f46246e]
/usr/sbin/mariadbd(_Z11mysqld_mainiPPc+0x11ae)[0x56049f3a0dee]
/lib64/libc.so.6(+0x2d51b)[0x7f4b0ceb251b]
/lib64/libc.so.6(__libc_start_main+0x7c)[0x7f4b0ceb25cc]
/usr/sbin/mariadbd(_start+0x25)[0x56049f3956b5]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x5604a0d73210): CREATE DEFINER='mariadb.sys'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
  Host,
  User,
  IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Pa,
  IF(JSON_VALUE(Priv, '$.access') &         1, 'Y', 'N') AS Select_priv,
  IF(JSON_VALUE(Priv, '$.access') &         2, 'Y', 'N') AS Insert_priv,
  IF(JSON_VALUE(Priv, '$.access') &         4, 'Y', 'N') AS Update_priv,
  IF(JSON_VALUE(Priv, '$.access') &         8, 'Y', 'N') AS Delete_priv,
  IF(JSON_VALUE(Priv, '$.access') &        16, 'Y', 'N') AS Create_priv,
  IF(JSON_VALUE(Priv, '$.access') &        32, 'Y', 'N') AS Drop_priv,
  IF(JSON_VALUE(Priv, '$.access') &        64, 'Y', 'N') AS Reload_priv,
  IF(JSON_VALUE(Priv, '$.access') &       128, 'Y', 'N') AS Shutdown_priv,
  IF(JSON_VALUE(Priv, '$.access') &       256, 'Y', 'N') AS Process_priv,
  IF(JSON_VALUE(Priv, '$.access') &       512, 'Y', 'N') AS File_priv,
  IF(JSON_VALUE(Priv, '$.access') &      1024, 'Y', 'N') AS Grant_priv,
  IF(JSON_VALUE(Priv, '$.access') &      2048, 'Y', 'N') AS References_priv,
  IF(JSON_VALUE(Priv, '$.access') &      4096, 'Y', 'N') AS Index_priv,
  IF(JSON_VALUE(Priv, '$.access') &      8192, 'Y', 'N') AS Alter_priv,
  IF(JSON_VALUE(Priv, '$.access') &     16384, 'Y', 'N') AS Show_db_priv,
  IF(JSON_VALUE(Priv, '$.access') &     32768, 'Y', 'N') AS Super_priv,
  IF(JSON_VALUE(Priv, '$.access') &     65536, 'Y', 'N') AS Create_tmp_table_priv,
  IF(JSON_VALUE(Priv, '$.access') &    131072, 'Y', 'N') AS Lock_tables_priv,
  IF(JSON_VALUE(Priv, '$.access') &    262144, 'Y', 'N') AS Execute_priv,
  IF(JSON_VALUE(Priv, '$.access') &    524288, 'Y', 'N') AS Repl_slave_priv,
  IF(JSON_VALUE(Priv, '$.access') &   1048576, 'Y', 'N') AS Repl_client_priv,
  IF(JSON_VALUE(Priv, '$.access') &   2097152, 'Y', 'N') AS Create_view_priv,
  IF(JSON_VALUE(Priv, '$.access') &   4194304, 'Y', 'N') AS Show_view_priv,
  IF(JSON_VALUE(Priv, '$.access') &   8388608, 'Y', 'N') AS Create_routine_priv,
  IF(JSON_VALUE(Priv, '$.access') &  16777216, 'Y', 'N') AS Alter_routine_priv,
  IF(JSON_VALUE(Priv, '$.access') &  33554432, 'Y', 'N') AS Create_user_priv,
  IF(JSON_VALUE(Priv, '$.access') &  67108864, 'Y', 'N') AS Event_priv,
  IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
  IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
  IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
  ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
  IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
  IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
  IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
  IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
  IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
  IF(IFNULL(JSON_VALUE(Priv, '$.password_last_changed'), 1) = 0, 'Y', 'N') AS password_expired,
  ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
  IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
  FROM global_priv;
 
Connection ID (thread ID): 1
Status: NOT_KILLED
 
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_conf
 
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             27786                27786                processes 
Max open files            32183                32183                files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       27786                27786                signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
Core pattern: core



 Comments   
Comment by Elena Stepanova [ 2021-11-01 ]

Is it reproducible for you every time, or was it a one-time occurrence?
Is it a new instance or did /var/lib/mysql exist already?
What platform is it, and which binaries/packages are you using?

Thanks.

Comment by Mingli-Yu [ 2021-11-02 ]

Yes, can reproduce every time.

root@intel-x86-64:~# ls /var/lib/mysql/
ls: cannot access '/var/lib/mysql/': No such file or directory
root@intel-x86-64:~# ps aux|grep mysql
root        1506  0.0  0.0   3352  1620 ttyS0    S+   02:01   0:00 grep mysql
root@intel-x86-64:~# mysql_install_db --basedir=/usr
Installing MariaDB/MySQL system tables in '/var/lib/mysql' ...
/usr/bin/mysql_install_db: line 525:  1693 Aborted                 "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silenK
 
Installation of system tables failed!  Examine the logs in
/var/log/mysqld.log or /var/lib/mysql for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
 
and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:
 
    shell> /usr/bin/mysql -u root mysql
    mysql> show tables;
 
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /var/lib/mysql that may be helpful.
 
The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss
 
Please check all of the above before submitting a bug report
at https://mariadb.org/jira
 
root@intel-x86-64:~# 

Comment by Elena Stepanova [ 2021-11-02 ]

Thanks.
What OS/version is it, and which binaries/packages are you using?

Comment by Mingli-Yu [ 2021-11-03 ]

I use the poky system [1] and download mariadb source from https://archive.mariadb.org/mariadb-10.6.4/source/mariadb-10.6.4.tar.gz and build by myself.

[1] https://docs.yoctoproject.org/overview-manual/yp-intro.html#reference-distribution-poky

Comment by Mingli-Yu [ 2021-11-03 ]

Through the backtrace as below, maybe it's related to openssl 3.0.0?

/usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x56049fb1233e]
/usr/sbin/mariadbd(handle_fatal_signal+0x478)[0x56049f66bac8]
/lib64/libc.so.6(+0x418f0)[0x7f4b0cec68f0]
/lib64/libc.so.6(pthread_kill+0x43)[0x7f4b0cf11693]
/lib64/libc.so.6(raise+0x16)[0x7f4b0cec6846]
/lib64/libc.so.6(abort+0xc5)[0x7f4b0ceb17a3]
/lib64/libc.so.6(__libc_fatal+0x0)[0x7f4b0cf05e50]
/lib64/libc.so.6(__fortify_fail+0x2a)[0x7f4b0cf9ec4a]
/lib64/libc.so.6(+0x119c14)[0x7f4b0cf9ec14]
/usr/sbin/mariadbd(+0xacc8b5)[0x56049f86c8b5]
/usr/sbin/mariadbd(_ZN10TABLE_LIST8calc_md5EPKc+0x33)[0x56049f530533]
/usr/sbin/mariadbd(_Z17mysql_create_viewP3THDP10TABLE_LIST21enum_view_create_mode+0x9e1)[0x56049f5214b1]
/usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x2249)[0x56049f45ef79]
/usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x56049f462098]
/usr/sbin/mariadbd(_Z9bootstrapP13st_mysql_file+0x23e)[0x56049f46246e]
/usr/sbin/mariadbd(_Z11mysqld_mainiPPc+0x11ae)[0x56049f3a0dee]
/lib64/libc.so.6(+0x2d51b)[0x7f4b0ceb251b]
/lib64/libc.so.6(__libc_start_main+0x7c)[0x7f4b0ceb25cc]
/usr/sbin/mariadbd(_start+0x25)[0x56049f3956b5]

And more log as below:

# cat /var/log/mysqld.log
*** stack smashing detected ***: terminated
211101  7:45:29 [ERROR] mysqld got signal 6 ;
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.6.4-MariaDB
key_buffer_size=134217728
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467956 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
Thread pointer: 0x5604a0d51f18
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 = 0x7ffd1180fee8 thread_stack 0x49000
/usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x56049fb1233e]
/usr/sbin/mariadbd(handle_fatal_signal+0x478)[0x56049f66bac8]
/lib64/libc.so.6(+0x418f0)[0x7f4b0cec68f0]
/lib64/libc.so.6(pthread_kill+0x43)[0x7f4b0cf11693]
/lib64/libc.so.6(raise+0x16)[0x7f4b0cec6846]
/lib64/libc.so.6(abort+0xc5)[0x7f4b0ceb17a3]
/lib64/libc.so.6(__libc_fatal+0x0)[0x7f4b0cf05e50]
/lib64/libc.so.6(__fortify_fail+0x2a)[0x7f4b0cf9ec4a]
/lib64/libc.so.6(+0x119c14)[0x7f4b0cf9ec14]
/usr/sbin/mariadbd(+0xacc8b5)[0x56049f86c8b5]
/usr/sbin/mariadbd(_ZN10TABLE_LIST8calc_md5EPKc+0x33)[0x56049f530533]
/usr/sbin/mariadbd(_Z17mysql_create_viewP3THDP10TABLE_LIST21enum_view_create_mode+0x9e1)[0x56049f5214b1]
/usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x2249)[0x56049f45ef79]
/usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x56049f462098]
/usr/sbin/mariadbd(_Z9bootstrapP13st_mysql_file+0x23e)[0x56049f46246e]
/usr/sbin/mariadbd(_Z11mysqld_mainiPPc+0x11ae)[0x56049f3a0dee]
/lib64/libc.so.6(+0x2d51b)[0x7f4b0ceb251b]
/lib64/libc.so.6(__libc_start_main+0x7c)[0x7f4b0ceb25cc]
/usr/sbin/mariadbd(_start+0x25)[0x56049f3956b5]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x5604a0d73210): CREATE DEFINER='mariadb.sys'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT
  Host,
  User,
  IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Pa,
  IF(JSON_VALUE(Priv, '$.access') &         1, 'Y', 'N') AS Select_priv,
  IF(JSON_VALUE(Priv, '$.access') &         2, 'Y', 'N') AS Insert_priv,
  IF(JSON_VALUE(Priv, '$.access') &         4, 'Y', 'N') AS Update_priv,
  IF(JSON_VALUE(Priv, '$.access') &         8, 'Y', 'N') AS Delete_priv,
  IF(JSON_VALUE(Priv, '$.access') &        16, 'Y', 'N') AS Create_priv,
  IF(JSON_VALUE(Priv, '$.access') &        32, 'Y', 'N') AS Drop_priv,
  IF(JSON_VALUE(Priv, '$.access') &        64, 'Y', 'N') AS Reload_priv,
  IF(JSON_VALUE(Priv, '$.access') &       128, 'Y', 'N') AS Shutdown_priv,
  IF(JSON_VALUE(Priv, '$.access') &       256, 'Y', 'N') AS Process_priv,
  IF(JSON_VALUE(Priv, '$.access') &       512, 'Y', 'N') AS File_priv,
  IF(JSON_VALUE(Priv, '$.access') &      1024, 'Y', 'N') AS Grant_priv,
  IF(JSON_VALUE(Priv, '$.access') &      2048, 'Y', 'N') AS References_priv,
  IF(JSON_VALUE(Priv, '$.access') &      4096, 'Y', 'N') AS Index_priv,
  IF(JSON_VALUE(Priv, '$.access') &      8192, 'Y', 'N') AS Alter_priv,
  IF(JSON_VALUE(Priv, '$.access') &     16384, 'Y', 'N') AS Show_db_priv,
  IF(JSON_VALUE(Priv, '$.access') &     32768, 'Y', 'N') AS Super_priv,
  IF(JSON_VALUE(Priv, '$.access') &     65536, 'Y', 'N') AS Create_tmp_table_priv,
  IF(JSON_VALUE(Priv, '$.access') &    131072, 'Y', 'N') AS Lock_tables_priv,
  IF(JSON_VALUE(Priv, '$.access') &    262144, 'Y', 'N') AS Execute_priv,
  IF(JSON_VALUE(Priv, '$.access') &    524288, 'Y', 'N') AS Repl_slave_priv,
  IF(JSON_VALUE(Priv, '$.access') &   1048576, 'Y', 'N') AS Repl_client_priv,
  IF(JSON_VALUE(Priv, '$.access') &   2097152, 'Y', 'N') AS Create_view_priv,
  IF(JSON_VALUE(Priv, '$.access') &   4194304, 'Y', 'N') AS Show_view_priv,
  IF(JSON_VALUE(Priv, '$.access') &   8388608, 'Y', 'N') AS Create_routine_priv,
  IF(JSON_VALUE(Priv, '$.access') &  16777216, 'Y', 'N') AS Alter_routine_priv,
  IF(JSON_VALUE(Priv, '$.access') &  33554432, 'Y', 'N') AS Create_user_priv,
  IF(JSON_VALUE(Priv, '$.access') &  67108864, 'Y', 'N') AS Event_priv,
  IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv,
  IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv,
  IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv,
  ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type,
  IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher,
  IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer,
  IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections,
  IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin,
  IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string,
  IF(IFNULL(JSON_VALUE(Priv, '$.password_last_changed'), 1) = 0, 'Y', 'N') AS password_expired,
  ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role,
  IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role,
  CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time
  FROM global_priv;
Connection ID (thread ID): 1
Status: NOT_KILLED
Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_conf
The manual page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mysqld/ contains
information that should help you find out what is causing the crash.
Writing a core file...
Working directory at /var/lib/mysql
Resource Limits:
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds   
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             27786                27786                processes 
Max open files            32183                32183                files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       27786                27786                signals   
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0                    
Max realtime priority     0                    0                    
Max realtime timeout      unlimited            unlimited            us        
Core pattern: core

Comment by Sergei Golubchik [ 2021-11-04 ]

If you build yourself, may be you could build with -DCMAKE_BUILD_TYPE=Debug and see whether it'll make a better stack trace.

Also, if you're building yourself, I'd expect you to have binutils installed, and it means you should have addr2line installed as it's part of binutils. Do you have it? It helps to produce better stack traces, but in your case it apparently wasn't found. Or were you cross-compiling?

Comment by Mingli-Yu [ 2021-11-05 ]

Thanks Sergei very much for your respond!
Yes, I 'm in a cross-compile env and install binutils on the board this time and the info as below and the mariadb 10.6.4 works well before and it encouters below error after upgarde openssl to 3.0.0 .

 # cat /var/log/mysqld.log
[snip]
Thread pointer: 0x55e203ab6d98
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 = 0x7ffd0c35dd18 thread_stack 0x49000
/usr/sbin/mariadbd(my_print_stacktrace+0x2e)[0x55e2027e533e]
/usr/sbin/mariadbd(handle_fatal_signal+0x478)[0x55e20233eac8]
libc_sigaction.c:0(__restore_rt)[0x7fbdf353b8f0]
nptl/pthread_kill.c:46(__pthread_kill_internal)[0x7fbdf3586693]
posix/raise.c:27(__GI_raise)[0x7fbdf353b846]
stdlib/abort.c:81(__GI_abort)[0x7fbdf35267a3]
posix/libc_fatal.c:161(__GI___libc_fatal)[0x7fbdf357ae50]
debug/fortify_fail.c:25(__GI___fortify_fail)[0x7fbdf3613c4a]
:0(__stack_chk_fail_local)[0x7fbdf3613c14]
/usr/sbin/mariadbd(+0xacc8b5)[0x55e20253f8b5]
mysys_ssl/my_md5.cc:92(my_md5)[0x55e202203533]
/usr/sbin/mariadbd(_Z17mysql_create_viewP3THDP10TABLE_LIST21enum_view_create_mode+0x9e1)[0x55e2021f44b1]
/usr/sbin/mariadbd(_Z21mysql_execute_commandP3THDb+0x2249)[0x55e202131f79]
/usr/sbin/mariadbd(_Z11mysql_parseP3THDPcjP12Parser_state+0x1d8)[0x55e202135098]
sql/table.cc:5635(TABLE_LIST::calc_md5(char const*))[0x55e20213546e]
sql/sql_class.h:1219(Query_arena::memdup(void const*, unsigned long))[0x55e202073dee]
nptl/libc_start_call_main.h:58(__libc_start_call_main)[0x7fbdf352751b]
csu/libc-start.c:128(call_init)[0x7fbdf35275cc]
/usr/sbin/mariadbd(_start+0x25)[0x55e2020686b5]
[snip]

Comment by Sergei Golubchik [ 2021-11-07 ]

oh. OpeSSL 3.0 is not supported yet. It's work in progress still, see MDEV-25785

Comment by Mingli-Yu [ 2021-11-08 ]

Thanks Sergei! So when the openssl 3.0 will be supported?

Comment by Sergei Golubchik [ 2021-11-08 ]

You can see that MDEV-25785 has FixVersion: 10.8, so it's being implemented for 10.8. This is the plan.

Of course, nobody can predict whether it will actually happen in time or whether it'll miss a deadline, for example.

Generated at Thu Feb 08 09:49:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.