[MDEV-19842] Crash while creating statistics for Spider table Created: 2019-06-23  Updated: 2021-12-26  Resolved: 2019-07-06

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - Spider
Affects Version/s: 10.4.6
Fix Version/s: 10.4.7

Type: Bug Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Kentoku Shiba (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MDEV-20179 Server hangs on shutdown during insta... Closed
causes MDEV-26534 Missing install_spider.sql in 10.5-10... Closed
is caused by MDEV-16249 CHECKSUM TABLE for a spider table is ... Closed
Relates
relates to MDEV-19850 per-plugin install/uninstall scriptlets Stalled
relates to MDEV-19852 Change plugin API to allow plugins to... Closed
relates to MDEV-22979 "mysqld --bootstrap" / mysql_install_... Closed
relates to MDEV-27095 Simplify spider init queries Closed
relates to MDEV-27233 Server hangs when using --init-file w... Closed

 Description   

A user is seeing the following crash after upgrading to MariaDB 10.4.6:

190623  0:59:58 [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.4.6-MariaDB-1:10.4.6+maria~xenial-log
key_buffer_size=134217728
read_buffer_size=2097152
max_used_connections=1
max_threads=102
thread_count=28
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760240 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f6ff80009a8
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 = 0x7f70b0a76cf8 thread_stack 0x49000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x56222273958e]
/usr/sbin/mysqld(handle_fatal_signal+0x307)[0x5622221ce387]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f70cc099390]
/usr/lib/mysql/plugin/ha_spider.so(_Z29spider_get_sys_table_sts_infoP5TABLEP13ha_statistics+0x12e)[0x7f70c405bdae]
/usr/lib/mysql/plugin/ha_spider.so(_Z24spider_sys_get_table_stsP3THDPKcjP13ha_statisticsb+0x135)[0x7f70c405d7d5]
/usr/lib/mysql/plugin/ha_spider.so(_Z14spider_get_stsP15st_spider_shareilP9ha_spiderdiiij+0xf8)[0x7f70c4097ac8]
/usr/lib/mysql/plugin/ha_spider.so(_Z16spider_get_sharePKcP5TABLEP3THDP9ha_spiderPi+0x2b54)[0x7f70c40a2784]
/usr/lib/mysql/plugin/ha_spider.so(_ZN9ha_spider4openEPKcij+0x53)[0x7f70c40b8413]
/usr/sbin/mysqld(_ZN7handler7ha_openEP5TABLEPKcijP11st_mem_rootP4ListI6StringE+0x47)[0x5622221d2f97]
/usr/sbin/mysqld(_Z21open_table_from_shareP3THDP11TABLE_SHAREPK25st_mysql_const_lex_stringjjjP5TABLEbP4ListI6StringE+0x749)[0x5622220763e9]
/usr/sbin/mysqld(_Z10open_tableP3THDP10TABLE_LISTP18Open_table_context+0xbdd)[0x562221f584bd]
/usr/sbin/mysqld(_Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy+0x11f0)[0x562221f5bb20]
/usr/sbin/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTjj+0x59)[0x562221f5c309]
/usr/sbin/mysqld(_Z18mysqld_list_fieldsP3THDP10TABLE_LISTPKc+0x2d)[0x56222201ce9d]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x243e)[0x562221fc4f9e]
/usr/sbin/mysqld(_Z10do_commandP3THD+0x11c)[0x562221fc54ec]
/usr/sbin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x25a)[0x5622220a171a]
/usr/sbin/mysqld(handle_one_connection+0x3d)[0x5622220a185d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f70cc08f6ba]
x86_64/clone.S:111(clone)[0x7f70cb53641d]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f6ff800fda8): 
Connection ID (thread ID): 29
Status: NOT_KILLED

Is this crash caused by the fix for MDEV-16249?



 Comments   
Comment by Kentoku Shiba (Inactive) [ 2019-06-24 ]

GeoffMontee
Did you execute install_spider.sql after upgrading? I think I forgot to add checking for it. I'm sorry for this inconvenient.

Comment by Jiravit Supavatanangura [ 2019-06-24 ]

@Kentoku where can i find install_spider.sql?

Comment by Jiravit Supavatanangura [ 2019-06-24 ]

Also, please note that this is on Ubuntu Xenial. From my understanding, on deb-based systems, Spider comes in a separate package, which has properly installed in this case. Do I still need to run install_spider.sql?

Comment by Kentoku Shiba (Inactive) [ 2019-06-24 ]

jiravit
Normally, it's under share directly like /usr/share/mysql
If you don't find it. Please execute the following for now. I'll check about installer of Ubuntu Xenial.

alter table mysql.spider_table_sts add column checksum bigint unsigned default null after update_time;

Please execute "show create table mysql.spider_table_sts". If the table has "checksum" column, it is the latest and no need to execute install_spider.sql.

Comment by Jiravit Supavatanangura [ 2019-06-24 ]

kentoku That fixed it! After manually altering the table, I was able to run mysql_upgrade successfully. The problem has been resolved. Thanks,

Comment by Kentoku Shiba (Inactive) [ 2019-06-24 ]

jiravit
I'm glad to hear that.

I just added checks for checking out such a issue without crash.
The commit about this checks is the following.
cec9674

In the other hand, I couldn't find any installer issue so far. Anyway, I would like to fix this by merging install_spider.sql into Spider.

Comment by Geoff Montee (Inactive) [ 2019-06-24 ]

Hi Kentoku,

Anyway, I would like to fix this by merging install_spider.sql into Spider.

You might be interested in a feature request that I just created. See MDEV-19852 - Change plugin API to allow plugins to run a script when installed.

Comment by Kentoku Shiba (Inactive) [ 2019-06-26 ]

GeoffMontee
I moved install_spider.sql into Spider except installing Spider.
The commit with this checks is the following.
c11e881

Please check it.

Comment by Geoff Montee (Inactive) [ 2019-06-26 ]

Hi Kentoku,

That's cool. I don't have the time to test it, but if you say that it works properly, then that sounds like a good improvement.

Comment by Kentoku Shiba (Inactive) [ 2019-07-02 ]

willhan
Would you please check it?

Comment by willhan [ 2019-07-05 ]

kentoku
We do not find this crash, and we have thousands of spider instances.
By the way, we compile Spider as a static engine and move install_spider.sql into mysql_install_db

Comment by Kentoku Shiba (Inactive) [ 2019-07-06 ]

Oh, ok. Thank you for checking.
It's merged.

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