[MDEV-11515] Assertion failure in mysql_install_db Created: 2016-12-09  Updated: 2016-12-26  Resolved: 2016-12-26

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: 10.2
Fix Version/s: 10.2.3

Type: Bug Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux, gcc


Issue Links:
Duplicate
is duplicated by MDEV-10540 mysqld started by mysql_install_db wi... Closed

 Description   

[server]
server-id               = 1
log_bin                 = /tmp/mysql-bin.log

Run like this:
mysql_install_db --basedir=/path2 --datadir=/path1 --defaults-file=./mysqld.cnf

Installing MariaDB/MySQL system tables in './data' ...
2016-12-09 13:19:45 139923804589760 [Warning] InnoDB: New log files created, LSN=45892
2016-12-09 13:19:45 139923804589760 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-12-09 13:19:46 139923028783872 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1146: Table 'mysql.gtid_slave_pos' doesn't exist
ERROR: 1105  Bootstrap file error, return code (0). Nearest query: 'CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64),
   t_name varchar(64), geometry_column varchar(64), t_srid int)
begin
  set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end~~
CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varch
mysqld: /home/kevg/work/mariadb_10.2/sql/sql_parse.cc:1098: void do_handle_bootstrap(THD *): Assertion `!opt_bootstrap || thread_count == 0' failed.
161209 13:19:49 [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.2.2-MariaDB-debug-log
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 = 467292 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 0x48c00
/home/kevg/work/debug/sql/mysqld(my_print_stacktrace+0x34)[0x129b534]
/home/kevg/work/debug/sql/mysqld(handle_fatal_signal+0x3cf)[0x9a5c8f]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11630)[0x7f428c6ab630]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x9f)[0x7f428b40a7ef]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f428b40c3ea]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dbb7)[0x7f428b402bb7]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dc62)[0x7f428b402c62]
/home/kevg/work/debug/sql/mysqld(_Z19do_handle_bootstrapP3THD+0x125)[0x6cc8c5]
/home/kevg/work/debug/sql/mysqld(handle_bootstrap+0x2d)[0x6cc73d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ca)[0x7f428c6a16ca]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x5f)[0x7f428b4dd0af]
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.
 
Installation of system tables failed!  Examine the logs in
./data for more information.
 
The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:
 
    shell> /home/kevg/work/mariadb_10.2/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
 
You can also try to start the mysqld daemon with:
 
    shell> /home/kevg/work/debug/sql/mysqld --skip-grant --general-log &
 
and use the command line tool /home/kevg/work/debug/client/mysql
to connect to the mysql database and look at the grant tables:
 
    shell> /home/kevg/work/debug/client/mysql -u root mysql
    mysql> show tables;
 
Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in ./data 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
MariaDB is hosted on launchpad; You can find the latest source and
email lists at http://launchpad.net/maria
 
Please check all of the above before submitting a bug report
at http://mariadb.org/jira



 Comments   
Comment by Elena Stepanova [ 2016-12-09 ]

Thanks for the report, we have this problem filed as MDEV-10540 (assertion was a bit different back then, though).

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