mysql 8.0 crash related to the use of pubsub
opened this issue · comments
Please help to determine if the following recurrent crash on a recently updated mysql is related to Mojo::mysql pubsub function.
2020-12-03T02:57:21.726396Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.22' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
02:59:39 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x7f7a54096a10
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 = 7f7a9816cda0 thread_stack 0x46000
/usr/sbin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x5612e1c8acde]
/usr/sbin/mysqld(handle_fatal_signal+0x31b) [0x5612e107312b]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730) [0x7f7aa790d730]
/usr/sbin/mysqld(QUERY_PROFILE::new_status(char const*, char const*, char const*, unsigned int)+0x66) [0x5612e0f4df76]
/usr/sbin/mysqld(THD::enter_stage(PSI_stage_info_v1 const*, PSI_stage_info_v1*, char const*, char const*, unsigned int)+0x56) [0x5612e0e3f426]
/usr/sbin/mysqld(close_tmp_table(THD*, TABLE*)+0x3a) [0x5612e0fd88ba]
/usr/sbin/mysqld(Materialized_cursor::close()+0x25) [0x5612e0e9d315]
/usr/sbin/mysqld(Materialized_cursor::fetch(unsigned long)+0xaf) [0x5612e0e9d41f]
/usr/sbin/mysqld(sp_cursor::fetch(List<sp_variable>*)+0x3d) [0x5612e0dfee9d]
/usr/sbin/mysqld(sp_head::execute(THD*, bool)+0x597) [0x5612e0def5b7]
/usr/sbin/mysqld(sp_head::execute_trigger(THD*, MYSQL_LEX_CSTRING const&, MYSQL_LEX_CSTRING const&, GRANT_INFO*)+0x27a) [0x5612e0defe8a]
/usr/sbin/mysqld(Trigger::execute(THD*)+0xd3) [0x5612e1036553]
/usr/sbin/mysqld(Trigger_chain::execute_triggers(THD*)+0x18) [0x5612e1037938]
/usr/sbin/mysqld(Table_trigger_dispatcher::process_triggers(THD*, enum_trigger_event_type, enum_trigger_action_time_type, bool)+0x46) [0x5612e1031676]
/usr/sbin/mysqld(write_record(THD*, TABLE*, COPY_INFO*, COPY_INFO*)+0x65c) [0x5612e0ecd07c]
/usr/sbin/mysqld(Sql_cmd_insert_values::execute_inner(THD*)+0x7b9) [0x5612e0ece099]
/usr/sbin/mysqld(Sql_cmd_dml::execute(THD*)+0x6b8) [0x5612e0f77a48]
/usr/sbin/mysqld(mysql_execute_command(THD*, bool)+0xaa8) [0x5612e0f10088]
/usr/sbin/mysqld(mysql_parse(THD*, Parser_state*)+0x3f8) [0x5612e0f14728]
/usr/sbin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x167b) [0x5612e0f162eb]
/usr/sbin/mysqld(do_command(THD*)+0x174) [0x5612e0f17874]
/usr/sbin/mysqld(+0x240a218) [0x5612e105c218]
/usr/sbin/mysqld(+0x35677d4) [0x5612e21b97d4]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f7aa7902fa3]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f7aa70ac4cf]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (7f7a540c2918): insert into mojo_pubsub_notify (channel, payload) values ('minion.job', '1049707')
Connection ID (thread ID): 45
Status: NOT_KILLED
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.
Crashes are reproducible and always have that line
$sync_db->query('insert into mojo_pubsub_notify (channel, payload) values (?, ?)', $channel, $payload // '');
Commenting it out helped, so far no crashes for two days, but not sure about side effects. Thanks
I'm guessing there's something wrong with the trigger, since the "insert into .." looks very basic.
mojo-mysql/lib/Mojo/mysql/PubSub.pm
Line 295 in 16f6c45
The PubSub module is not directly supported, so because of that and limited time, I unfortunately can't look into it at the moment.
Commenting out the line you mentioned will completely stop the pubsub-feature from working though, so you now have an app that doesn't work as you expect.
I'm going to close this since the PubSub module is experimental, and no new information has been provided.