[MDEV-10043] main.events_restart fails sporadically in buildbot (crashes upon shutdown) Created: 2016-05-08  Updated: 2017-03-01  Resolved: 2016-06-20

Status: Closed
Project: MariaDB Server
Component/s: Events, Tests
Affects Version/s: 10.0, 10.1
Fix Version/s: 5.5.50, 10.0.26, 10.1.15

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: foundation

Issue Links:
Blocks
blocks MDEV-7069 Fix buildbot failures in main server ... Stalled
Relates
relates to MDEV-11221 main.events_restart failed in buildbo... Closed
Sprint: 10.0.26

 Description   

It happens mostly on Windows, but not exclusively.
Failure on Windows:
http://buildbot.askmonty.org/buildbot/builders/win32-debug/builds/5
(It does not really help that on Windows synchronization between MTR and server printing into the error log is off, and the log says CURRENT_TEST: main.events_restart after the failure happens; in fact, it is already this test).

main.events_restart                      w2 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-04-28 18:24:30
line
160428 18:24:25 [Warning] Plugin 'MyISAM' will be forced to shutdown
 
160428 18:24:25 [ERROR] Plugin 'MyISAM' has ref_count=2 after shutdown.
 
160428 18:24:25 [ERROR] mysqld got exception 0xc0000005 ;
 
Attempting backtrace. You can use the following information to find out

160428 18:24:24 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe (mysqld 10.0.25-MariaDB-debug) starting as process 4872 ...
160428 18:24:24 [Note] Plugin 'InnoDB' is disabled.
160428 18:24:24 [Note] Plugin 'XTRADB_READ_VIEW' is disabled.
160428 18:24:24 [Note] Plugin 'XTRADB_INTERNAL_HASH_TABLES' is disabled.
160428 18:24:24 [Note] Plugin 'XTRADB_RSEG' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_TRX' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_LOCK_WAITS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_CMP_RESET' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_CMPMEM' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_BUFFER_PAGE' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_BUFFER_PAGE_LRU' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_BUFFER_POOL_STATS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_METRICS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_DELETED' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_TABLES' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_INDEXES' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_COLUMNS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_FIELDS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_FOREIGN' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_FOREIGN_COLS' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_SYS_DATAFILES' is disabled.
160428 18:24:24 [Note] Plugin 'INNODB_CHANGED_PAGES' is disabled.
160428 18:24:24 [Note] Plugin 'FEEDBACK' is disabled.
160428 18:24:24 [Note] Plugin 'partition' is disabled.
160428 18:24:24 [Note] Server socket created on IP: '::'.
160428 18:24:24 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160428 18:24:24 [ERROR] mysqld.exe: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160428 18:24:24 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe: ready for connections.
Version: '10.0.25-MariaDB-debug'  socket: ''  port: 16020  Source distribution
160428 18:24:24 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160428 18:24:24 [ERROR] mysqld.exe: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160428 18:24:24 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160428 18:24:24 [ERROR] mysqld.exe: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160428 18:24:24 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160428 18:24:24 [Note] Event Scheduler: scheduler thread started with id 3
160428 18:24:25 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe: Normal shutdown
 
160428 18:24:25 [ERROR] Event Scheduler: [root@localhost][events_test.abc1] Server shutdown in progress
160428 18:24:25 [Note] Event Scheduler: [root@localhost].[events_test.abc1] event execution failed.
160428 18:24:25 [Note] Event Scheduler: Killing the scheduler thread, thread id 3
160428 18:24:25 [Note] Event Scheduler: Waiting for the scheduler thread to reply
160428 18:24:25 [Note] Event Scheduler: Stopped
160428 18:24:25 [Note] Event Scheduler: Purging the queue. 3 events
160428 18:24:25 [Warning] Plugin 'MyISAM' will be forced to shutdown
160428 18:24:25 [ERROR] Plugin 'MyISAM' has ref_count=2 after shutdown.
Assertion failed: !m_locks.records, file D:\win32-debug\build\src\sql\mdl.cc, line 837
R6010
- abort() has been called
160428 18:24:25 [ERROR] mysqld got exception 0xc0000005 ;
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.0.25-MariaDB-debug
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=501
thread_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 195319 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x81f5b50
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...
160428 18:24:26 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe (mysqld 10.0.25-MariaDB-debug) starting as process 5048 ...

Occasion on fulltest:
http://buildbot.askmonty.org/buildbot/builders/kvm-fulltest2/builds/5208

main.events_restart                      w4 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-04-24 18:36:27
line
safe_mutex: Trying to lock unitialized mutex at /home/buildbot/buildbot/build/mariadb-10.0.24/sql/tztime.cc, line 2310
Attempting backtrace. You can use the following information to find out
160424 18:36:16 [Warning] Plugin 'MyISAM' will be forced to shutdown
160424 18:36:16 [ERROR] Plugin 'MyISAM' has ref_count=4 after shutdown.
mysqld: /home/buildbot/buildbot/build/mariadb-10.0.24/sql/mdl.cc:837: MDL_map_partition::~MDL_map_partition(): Assertion `!m_locks.records' failed.
^ Found warnings in /mnt/buildbot/build/mariadb-10.0.24/mysql-test/var/4/log/mysqld.1.err
ok
 
 - saving '/mnt/buildbot/build/mariadb-10.0.24/mysql-test/var/4/log/main.events_restart/' to '/mnt/buildbot/build/mariadb-10.0.24/mysql-test/var/log/main.events_restart/'

CURRENT_TEST: main.events_restart
160424 18:36:13 [Note] Event Scheduler: Killing the scheduler thread, thread id 38
160424 18:36:13 [Note] Event Scheduler: Waiting for the scheduler thread to reply
160424 18:36:13 [Note] Event Scheduler: Stopped
160424 18:36:13 [Note] Got signal 15 to shutdown mysqld
160424 18:36:13 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld: Normal shutdown
 
160424 18:36:13 [Note] Event Scheduler: Purging the queue. 3 events
160424 18:36:13 [Note] Debug sync points hit:                   10033
160424 18:36:13 [Note] Debug sync points executed:              0
160424 18:36:13 [Note] Debug sync points max active per thread: 0
160424 18:36:13 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld: Shutdown complete
 
160424 18:36:15 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld (mysqld 10.0.24-MariaDB-debug) starting as process 18476 ...
160424 18:36:15 [Note] Plugin 'BLACKHOLE' is disabled.
160424 18:36:15 [Note] Plugin 'TEST_SQL_DISCOVERY' is disabled.
160424 18:36:15 [Note] Plugin 'InnoDB' is disabled.
160424 18:36:15 [Note] Plugin 'XTRADB_READ_VIEW' is disabled.
160424 18:36:15 [Note] Plugin 'XTRADB_INTERNAL_HASH_TABLES' is disabled.
160424 18:36:15 [Note] Plugin 'XTRADB_RSEG' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_TRX' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_LOCK_WAITS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_CMP_RESET' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_CMPMEM' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_BUFFER_PAGE' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_BUFFER_PAGE_LRU' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_BUFFER_POOL_STATS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_METRICS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_DELETED' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_TABLES' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_INDEXES' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_COLUMNS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_FIELDS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_FOREIGN' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_FOREIGN_COLS' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_SYS_DATAFILES' is disabled.
160424 18:36:15 [Note] Plugin 'INNODB_CHANGED_PAGES' is disabled.
160424 18:36:15 [Note] Plugin 'ARCHIVE' is disabled.
160424 18:36:15 [Note] Plugin 'FEDERATED' is disabled.
160424 18:36:15 [Note] Plugin 'CONNECT' is disabled.
160424 18:36:15 [Note] Plugin 'SEQUENCE' is disabled.
160424 18:36:15 [Note] Plugin 'SPHINX' is disabled.
160424 18:36:15 [Note] Plugin 'unix_socket' is disabled.
160424 18:36:15 [Note] Plugin 'LOCALES' is disabled.
160424 18:36:15 [Note] Plugin 'QUERY_RESPONSE_TIME' is disabled.
160424 18:36:15 [Note] Plugin 'QUERY_RESPONSE_TIME_AUDIT' is disabled.
160424 18:36:15 [Note] Plugin 'QUERY_CACHE_INFO' is disabled.
160424 18:36:15 [Note] Plugin 'METADATA_LOCK_INFO' is disabled.
160424 18:36:15 [Note] Plugin 'rpl_semi_sync_master' is disabled.
160424 18:36:15 [Note] Plugin 'rpl_semi_sync_slave' is disabled.
160424 18:36:15 [Note] Plugin 'FEEDBACK' is disabled.
160424 18:36:15 [Note] Plugin 'partition' is disabled.
160424 18:36:15 [Note] Server socket created on IP: '127.0.0.1'.
160424 18:36:15 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160424 18:36:15 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160424 18:36:15 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld: ready for connections.
Version: '10.0.24-MariaDB-debug'  socket: '/mnt/buildbot/build/mariadb-10.0.24/mysql-test/var/tmp/4/mysqld.1.sock'  port: 16060  Source distribution
160424 18:36:15 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160424 18:36:15 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160424 18:36:15 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160424 18:36:15 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
160424 18:36:15 [ERROR] Incorrect definition of table mysql.event: expected column 'body' at position 2 to have type longblob, found type longtext.
160424 18:36:15 [Note] Event Scheduler: scheduler thread started with id 3
160424 18:36:15 [Note] Got signal 15 to shutdown mysqld
160424 18:36:16 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld: Normal shutdown
 
160424 18:36:16 [Note] Event Scheduler: Killing the scheduler thread, thread id 3
160424 18:36:16 [Note] Event Scheduler: Waiting for the scheduler thread to reply
160424 18:36:16 [Note] Event Scheduler: Stopped
160424 18:36:16 [Note] Event Scheduler: Purging the queue. 3 events
safe_mutex: Trying to lock unitialized mutex at /home/buildbot/buildbot/build/mariadb-10.0.24/sql/tztime.cc, line 2310
160424 18:36:16 [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.0.24-MariaDB-debug
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
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 = 61721 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0xb1f010a8
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 = 0xb246827f thread_stack 0x48000
160424 18:36:16 [Warning] Plugin 'MyISAM' will be forced to shutdown
160424 18:36:16 [ERROR] Plugin 'MyISAM' has ref_count=4 after shutdown.
mysqld: /home/buildbot/buildbot/build/mariadb-10.0.24/sql/mdl.cc:837: MDL_map_partition::~MDL_map_partition(): Assertion `!m_locks.records' failed.
160424 18:36:23 [Note] /mnt/buildbot/build/mariadb-10.0.24/sql/mysqld (mysqld 10.0.24-MariaDB-debug) starting as process 18569 ...

Failure on non-debug build:
http://buildbot.askmonty.org/buildbot/builders/kvm-deb-precise-amd64/builds/6034

main.events_restart                      w3 [ fail ]  Found warnings/errors in server log file!
        Test ended at 2016-04-05 19:08:02
line
160405 19:07:59 [ERROR] mysqld got signal 11 ;
Attempting backtrace. You can use the following information to find out
^ Found warnings in /run/shm/var/3/log/mysqld.1.err

2016-04-05 19:07:59 139682565365504 [Note] /usr/sbin/mysqld (root[root] @ localhost []): Normal shutdown
 
2016-04-05 19:07:59 139682565365504 [Note] Event Scheduler: Killing the scheduler thread, thread id 3
2016-04-05 19:07:59 139682565365504 [Note] Event Scheduler: Waiting for the scheduler thread to reply
2016-04-05 19:07:59 139682565365504 [Note] Event Scheduler: Stopped
2016-04-05 19:07:59 139682565365504 [Note] Event Scheduler: Purging the queue. 3 events
160405 19:07:59 [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 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.0-MariaDB-1~precise
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
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 = 62907 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x7f0a56c63008
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 = 0x7f0a5f92050f thread_stack 0x48800
/usr/sbin/mysqld(my_print_stacktrace+0x2b)[0x7f0a62681e2b]
/usr/sbin/mysqld(handle_fatal_signal+0x465)[0x7f0a621e2455]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0)[0x7f0a617c9cb0]
/usr/sbin/mysqld(_Z11plugin_lockP3THDP13st_plugin_int+0x2c)[0x7f0a6207e2bc]
/usr/sbin/mysqld(_ZN11TABLE_SHARE26init_from_binary_frm_imageEP3THDbPKhm+0x98e)[0x7f0a6210b01e]
/usr/sbin/mysqld(_Z14open_table_defP3THDP11TABLE_SHAREj+0x622)[0x7f0a6210de92]
/usr/sbin/mysqld(_Z17tdc_acquire_shareP3THDP10TABLE_LISTjPP5TABLE+0x3a9)[0x7f0a62194159]
/usr/sbin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP18Open_table_context+0x450)[0x7f0a6202a530]
/usr/sbin/mysqld(_Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy+0xf75)[0x7f0a6202e7a5]
/usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x44)[0x7f0a6202ead4]
/usr/sbin/mysqld(_Z27open_system_tables_for_readP3THDP10TABLE_LISTP18Open_tables_backup+0x90)[0x7f0a62030d60]
/usr/sbin/mysqld(_ZN19Event_db_repository16load_named_eventEP3THD19st_mysql_lex_stringS2_P11Event_basic+0xf8)[0x7f0a62316858]
/usr/sbin/mysqld(_ZN19Event_worker_thread3runEP3THDP28Event_queue_element_for_exec+0xd0)[0x7f0a623133c0]
/usr/sbin/mysqld(event_worker_thread+0x56)[0x7f0a62313486]
/usr/sbin/mysqld(+0x97393d)[0x7f0a6256f93d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7e9a)[0x7f0a617c1e9a]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f0a5fc2a4bd]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x0): 
Connection ID (thread ID): 6
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_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on
 
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.
Writing a core file
2016-04-05 19:08:00 139983904638848 [Note] /usr/sbin/mysqld (mysqld 10.2.0-MariaDB-1~precise) starting as process 20830 ...



 Comments   
Comment by Sergey Vojtovich [ 2016-06-17 ]

serg, please review fix for this bug. I submitted patch against 5.5 sInce this is test failure and 5.5 is affected.

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