[MDEV-9183] MariaDB 10.1 crash on `mysqld --verbose --help` Created: 2015-11-25  Updated: 2015-12-22  Resolved: 2015-12-22

Status: Closed
Project: MariaDB Server
Component/s: Plugins
Affects Version/s: 10.1
Fix Version/s: 10.1.10

Type: Bug Priority: Major
Reporter: Nazar Mokrynskyi Assignee: Sergei Golubchik
Resolution: Fixed Votes: 2
Labels: None
Environment:

Debian Jessie, Ubuntu Trusty, Ubuntu 15.10, Ubuntu 16.04
x64 versions of above OSs are affected at least.
Happens on host system and under Docker image


Sprint: 10.1.10

 Description   

Initially discovered in Docker image: https://github.com/docker-library/mariadb/issues/29#issuecomment-152766835
But now it happens to me on Ubuntu 16.04 x64 while MariaDB 10.1 server itself works fine, problem is only with `mysqld --verbose --help`.
Output sample:

root@45cb88e4727e:/# mysqld --verbose --help
2015-10-31 19:57:51 140581341714368 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2015-10-31 19:57:51 140581341714368 [Note] Plugin 'FEEDBACK' is disabled.
2015-10-31 19:57:51 140581341714368 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
151031 19:57:51 [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 http://kb.askmonty.org/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.1.8-MariaDB-1~jessie
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=0
max_threads=102
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 759822 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x0
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 = 0x0 thread_stack 0x48000
mysqld(my_print_stacktrace+0x2e)[0x562964b8ed0e]
mysqld(handle_fatal_signal+0x34d)[0x5629646d46ad]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x7fdba4ad08d0]
mysqld(_ZN7sys_varC2EP13sys_var_chainPKcS3_ili16get_opt_arg_type20enum_mysql_show_typexP8PolyLockNS_18binlog_status_enumEPFbPS_P3THDP7set_varEPFbS9_SB_13enum_var_typeES3_+0x10d)[0x5629644d0f2d]
mysqld(_ZN17sys_var_pluginvarC1EP13sys_var_chainPKcP13st_plugin_intP16st_mysql_sys_var+0xa3)[0x562964561eb3]
mysqld(+0x425162)[0x562964562162]
mysqld(+0x425577)[0x562964562577]
mysqld(_Z11plugin_initPiPPci+0x92a)[0x562964563d8a]
mysqld(+0x3824af)[0x5629644bf4af]
mysqld(_Z11mysqld_mainiPPc+0x95f)[0x5629644c477f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7fdba2b82b45]
mysqld(+0x37b2cd)[0x5629644b82cd]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.



 Comments   
Comment by Guillaume Lefranc [ 2015-11-27 ]

Hello Nazar,

I could not reproduce your crash on Ubuntu 16.04, x86-64 using mariadb-10.1.9-linux-glibc_214-x86_64.tar.gz.

ubuntu@ip-172-31-27-121:~/mariadb-10.1.9-linux-glibc_214-x86_64$ uname -a
Linux ip-172-31-27-121 4.2.0-19-generic #23-Ubuntu SMP Wed Nov 11 11:39:30 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Please let me know what specific versions you've used.

For the Docker issue, let's follow up on docker github.

Thanks

Comment by Nazar Mokrynskyi [ 2015-11-27 ]

The easiest way to reproduce this issue with repeatable setup is using Docker Machine:

docker-machine create -d virtualbox node
docker-machine ssh node
git clone https://github.com/docker-library/mariadb.git
cd mariadb
cp -R 10.0 10.1
cd 10.1
sed -i s/10.0.22/10.1.9/g Dockerfile
sed -i s/10.0/10.1/g Dockerfile
docker build -t mariadb:10.1.9 .
docker run -it --rm -e MYSQL_ROOT_PASSWORD=1111 --entrypoint=/bin/bash mariadb:10.1.9
mysqld --verbose --help

You'll get something like this:

2015-11-27 10:48:01 140012362913728 [Note] Using unique option prefix 'myisam_recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2015-11-27 10:48:01 140012362913728 [Note] Plugin 'FEEDBACK' is disabled.
2015-11-27 10:48:01 140012362913728 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
151127 10:48:01 [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 http://kb.askmonty.org/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.1.9-MariaDB-1~jessie
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=0
max_threads=102
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 759822 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x0
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 = 0x0 thread_stack 0x48000
mysqld(my_print_stacktrace+0x2e)[0x5586fd466b6e]
mysqld(handle_fatal_signal+0x34d)[0x5586fcfabd6d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xf8d0)[0x7f572ae5f8d0]
mysqld(_ZN7sys_varC2EP13sys_var_chainPKcS3_ili16get_opt_arg_type20enum_mysql_show_typexP8PolyLockNS_18binlog_status_enumEPFbPS_P3THDP7set_varEPFbS9_SB_13enum_var_typeES3_+0x10d)[0x5586fcda559d]
mysqld(_ZN17sys_var_pluginvarC1EP13sys_var_chainPKcP13st_plugin_intP16st_mysql_sys_var+0xa3)[0x5586fce36a43]
mysqld(+0x425cf2)[0x5586fce36cf2]
mysqld(+0x426107)[0x5586fce37107]
mysqld(_Z11plugin_initPiPPci+0x92a)[0x5586fce3891a]
mysqld(+0x3839ff)[0x5586fcd949ff]
mysqld(_Z11mysqld_mainiPPc+0x95f)[0x5586fcd98daf]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f5728f3fb45]
mysqld(+0x37b8fd)[0x5586fcd8c8fd]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
 

Comment by Nazar Mokrynskyi [ 2015-11-27 ]

From VM created by Docker Machine:

root@318e64dd4377:/# uname -a
Linux 318e64dd4377 4.1.12-boot2docker #1 SMP Tue Nov 3 06:03:36 UTC 2015 x86_64 GNU/Linux

Comment by Nazar Mokrynskyi [ 2015-11-27 ]

Pretty similar issue I can get on host system when running under regular user instead of root:

nazar-pc@nazar-pc ~> env LANG=C mysqld --verbose --help
2015-11-27 11:58:18 140703628355840 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2015-11-27 11:58:18 140703628355840 [Warning] One can only use the --user switch if running as root
 
2015-11-27 11:58:18 140703628355840 [Note] Using unique option prefix 'myisam-recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2015-11-27 11:58:18 140703628355840 [Note] Plugin 'FEEDBACK' is disabled.
2015-11-27 11:58:18 140703628355840 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
151127 11:58:18 [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 http://kb.askmonty.org/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.1.9-MariaDB-1~vivid
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352416 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x0
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 = 0x0 thread_stack 0x30000
addr2line: 'mysqld': No such file
mysqld(my_print_stacktrace+0x2e)[0x561ac0c0ed6e]
mysqld(handle_fatal_signal+0x34d)[0x561ac075246d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11360)[0x7ff81c56e360]
mysqld(_ZN7sys_varC2EP13sys_var_chainPKcS3_ili16get_opt_arg_type20enum_mysql_show_typexP8PolyLockNS_18binlog_status_enumEPFbPS_P3THDP7set_varEPFbS9_SB_13enum_var_typeES3_+0x10d)[0x561ac054be8d]
mysqld(_ZN17sys_var_pluginvarC1EP13sys_var_chainPKcP13st_plugin_intP16st_mysql_sys_var+0xa3)[0x561ac05dd253]
mysqld(+0x425502)[0x561ac05dd502]
mysqld(+0x425917)[0x561ac05dd917]
mysqld(_Z11plugin_initPiPPci+0x92a)[0x561ac05df12a]
mysqld(+0x3832ef)[0x561ac053b2ef]
mysqld(_Z11mysqld_mainiPPc+0x95f)[0x561ac053f69f]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7ff81bb2d8b0]
mysqld(_start+0x29)[0x561ac05331e9]
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

While under root everything works fine. Probably, there is some connection here. Try to install on fresh Debian Jessie or Ubuntu 14.04+ (any version actually) in VM, and you should be able to reproduce this error.

Comment by Guillaume Lefranc [ 2015-11-27 ]

Nazar,

on the host system, did you use the debian packages from our repo, or the tarball?

Comment by Nazar Mokrynskyi [ 2015-11-27 ]

I'm using packages from your repo

Comment by Elena Stepanova [ 2015-11-27 ]

Assertion failure on a debug build:

Stack trace from 10.1 commit 3c0e9d31b3e6494931deb09f5c93b05a96df8471

2015-11-27 16:39:10 140258871916384 [Warning] Could not open mysql.plugin table. Some options may be missing from the help text
mysqld: 10.1/sql/sql_plugin.cc:3999: int test_plugin_options(MEM_ROOT*, st_plugin_int*, int*, char**): Assertion `tmp->nbackups == 0' failed.
 
#3  <signal handler called>
#4  0x00007f908dd9d165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#5  0x00007f908dda03e0 in *__GI_abort () at abort.c:92
#6  0x00007f908dd96311 in *__GI___assert_fail (assertion=0x7f909126631c "tmp->nbackups == 0", file=<optimized out>, line=3999, function=0x7f9091267160 "int test_plugin_options(MEM_ROOT*, st_plugin_int*, int*, char**)") at assert.c:81
#7  0x00007f9090919c7a in test_plugin_options (tmp_root=0x7fff66e819d0, tmp=0x7f908d64e088, argc=0x7f9091c54870, argv=0x7f908d41e6a0) at 10.1/sql/sql_plugin.cc:3999
#8  0x00007f9090912348 in plugin_initialize (tmp_root=0x7fff66e819d0, plugin=0x7f908d64e088, argc=0x7f9091c54870, argv=0x7f908d41e6a0, options_only=true) at 10.1/sql/sql_plugin.cc:1395
#9  0x00007f9090912fda in plugin_init (argc=0x7f9091c54870, argv=0x7f908d41e6a0, flags=6) at 10.1/sql/sql_plugin.cc:1685
#10 0x00007f9090832877 in init_server_components () at 10.1/sql/mysqld.cc:5207
#11 0x00007f90908339bd in mysqld_main (argc=6, argv=0x7f908d41e6a0) at 10.1/sql/mysqld.cc:5807
#12 0x00007f9090828e80 in main (argc=5, argv=0x7fff66e82758) at 10.1/sql/main.cc:25

Docker or Ubuntu 16.04 are not needed.
The problem is reproducible in a regular environment when two conditions are met together:

  • mysql.plugin table could not be opened (doesn't matter whether the datadir does not exists, of it exists but is empty, or only mysql.plugin is absent, or it has wrong permissions, etc.);
  • lc-messages-dir is provided to mysqld binary either via a cnf file or on a command line (otherwise execution terminates before it reaches the crash point).

10.0 is not affected.
The problem appeared in 10.1 some time between 10.1.2 and 10.1.4.

Comment by Krasimir [ 2015-12-02 ]

Is there any progress with this ?

I am on hold for deploy few servers because of this bug. I hope it gets some attention soon.

Thanks for your hard work!

Comment by Sergei Golubchik [ 2015-12-02 ]

No progress yet, sorry. But you shouldn't expect any progress yet. As 10.1.9 is already out, this bug can not be fixed earlier than 10.1.10. Nobody is going to look at this bug until closer to the 10.1.10 release date. See http://mariadb.org/jira for the release schedule.

Comment by trupti mali [ 2015-12-03 ]

Hi,
I too faced the similar crashing problem today. I was trying out mariadb asynchronous replication with latest mariadb 10.1.9 version. The moment I start the slave , i get it crashed.

Generated at Thu Feb 08 07:32:46 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.