[MDEV-11778] MariaDB crashes with signal 6 Created: 2017-01-11  Updated: 2018-04-01  Resolved: 2018-04-01

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.1.18
Fix Version/s: 10.1.24, 10.0.31

Type: Bug Priority: Major
Reporter: Christophe Morell Assignee: Elena Stepanova
Resolution: Duplicate Votes: 1
Labels: crash, mariadb
Environment:

Apache Tomcat Java


Attachments: Text File SVPI01P0_table.txt     Text File mycnf.txt     Text File vues.txt    

 Description   

Hi Everyone,
My MariaDB server crashes randomly with the following issues in var/mysql.log

 
Jan 10 16:26:21 srvsvpext snmpd[1563]: message repeated 30 times: [ Connection from UDP: [10.10.64.254]:35711->[10.10.64.51]:161]
Jan 10 16:26:22 srvsvpext snmpd[1563]: Connection from UDP: [10.10.64.254]:2659->[10.10.64.51]:161
Jan 10 16:26:22 srvsvpext snmpd[1563]: message repeated 5 times: [ Connection from UDP: [10.10.64.254]:2659->[10.10.64.51]:161]
Jan 10 16:26:47 srvsvpext mysqld[1551]: pure virtual method called
Jan 10 16:26:47 srvsvpext mysqld[1551]: terminate called without an active exception
Jan 10 16:26:47 srvsvpext mysqld[1551]: 170110 16:26:47 [ERROR] mysqld got signal 6 ;
Jan 10 16:26:47 srvsvpext mysqld[1551]: This could be because you hit a bug. It is also possible that this binary
Jan 10 16:26:47 srvsvpext mysqld[1551]: or one of the libraries it was linked against is corrupt, improperly built,
Jan 10 16:26:47 srvsvpext mysqld[1551]: or misconfigured. This error can also be caused by malfunctioning hardware.
Jan 10 16:26:47 srvsvpext mysqld[1551]: To report this bug, see https://mariadb.com/kb/en/reporting-bugs
Jan 10 16:26:47 srvsvpext mysqld[1551]: We will try our best to scrape up some info that will hopefully help
Jan 10 16:26:47 srvsvpext mysqld[1551]: diagnose the problem, but since we have already crashed,
Jan 10 16:26:47 srvsvpext mysqld[1551]: something is definitely wrong and this may fail.
Jan 10 16:26:47 srvsvpext mysqld[1551]: Server version: 10.1.18-MariaDB-1~xenial
Jan 10 16:26:47 srvsvpext mysqld[1551]: key_buffer_size=134217728
Jan 10 16:26:47 srvsvpext mysqld[1551]: read_buffer_size=2097152
Jan 10 16:26:47 srvsvpext mysqld[1551]: max_used_connections=10
Jan 10 16:26:47 srvsvpext mysqld[1551]: max_threads=102
Jan 10 16:26:47 srvsvpext mysqld[1551]: thread_count=3
Jan 10 16:26:47 srvsvpext mysqld[1551]: It is possible that mysqld could use up to
Jan 10 16:26:47 srvsvpext mysqld[1551]: key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1177626 K  bytes of memory
Jan 10 16:26:47 srvsvpext mysqld[1551]: Hope that's ok; if not, decrease some variables in the equation.
Jan 10 16:26:47 srvsvpext mysqld[1551]: Thread pointer: 0x0x7f59bea2d008
Jan 10 16:26:47 srvsvpext mysqld[1551]: Attempting backtrace. You can use the following information to find out
Jan 10 16:26:47 srvsvpext mysqld[1551]: where mysqld died. If you see no messages after this, something went
Jan 10 16:26:47 srvsvpext mysqld[1551]: terribly wrong...
Jan 10 16:26:47 srvsvpext mysqld[1551]: stack_bottom = 0x7f5a221230b8 thread_stack 0x48400
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55d538fc462e]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(handle_fatal_signal+0x2d5)[0x55d538b133d5]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0)[0x7f5a24c343d0]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f5a24204418]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f5a2420601a]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x16d)[0x7f5a2493084d]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d6b6)[0x7f5a2492e6b6]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8d701)[0x7f5a2492e701]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8e23f)[0x7f5a2492f23f]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN10Item_cache5setupEP3THDP4Item+0x44)[0x55d538b38c74]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN17Item_in_optimizer8fix_leftEP3THD+0x82)[0x55d538b46972]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN17Item_in_optimizer10fix_fieldsEP3THDPP4Item+0x3c)[0x55d538b46e4c]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN9Item_cond10fix_fieldsEP3THDPP4Item+0x109)[0x55d538b43889]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN9Item_cond10fix_fieldsEP3THDPP4Item+0x109)[0x55d538b43889]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z11setup_condsP3THDP10TABLE_LISTR4ListIS1_EPP4Item+0x18f)[0x55d53894723f]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN4JOIN7prepareEPPP4ItemP10TABLE_LISTjS1_jP8st_orderbS7_S1_S7_P13st_select_lexP18st_select_lex_unit+0x3e1)[0x55d5389d2151]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z12mysql_selectP3THDPPP4ItemP10TABLE_LISTjR4ListIS1_ES2_jP8st_orderSB_S2_SB_yP13select_resultP18st_select_lex_unitP13st_select_lex+0x8c4)[0x55d5389e0034]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z13handle_selectP3THDP3LEXP13select_resultm+0x139)[0x55d5389e0219]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(+0x3ff2a1)[0x55d53897d2a1]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x6637)[0x55d53898a3c7]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_ZN18Prepared_statement7executeEP6Stringb+0x4c5)[0x55d5389a16d5]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(+0x423875)[0x55d5389a1875]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z19mysqld_stmt_executeP3THDPcj+0x169)[0x55d5389a1d69]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x1674)[0x55d53898f5c4]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z10do_commandP3THD+0x16d)[0x55d5389909ad]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55d538a59f52]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /usr/sbin/mysqld(handle_one_connection+0x40)[0x55d538a5a110]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f5a24c2a6fa]
Jan 10 16:26:47 srvsvpext mysqld[1551]: /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f5a242d5b5d]
Jan 10 16:26:47 srvsvpext mysqld[1551]: Trying to get some variables.
Jan 10 16:26:47 srvsvpext mysqld[1551]: Some pointers may be invalid and cause the dump to abort.
Jan 10 16:26:47 srvsvpext mysqld[1551]: Query (0x7f59c0035020): SELECT A.*, B.LLIBEL, B.LIBCLI FROM SVPM01R6 A JOIN SVPC03R2 B ON A.CODCLI=B.CODCLI AND  A.CPRODU=B.CPRODU AND A.CMODUL=B.CMODUL WHERE A.CODCLI='VALNANT' AND (EXISTS(SELECT * FROM SVPC01R1 G WHERE G.CODCLI=A.CODCLI AND G.CDUSER='VALNANT01') OR EXISTS(SELECT * FROM CFGG02P0 H WHERE H.CDUSER='VALNANT01' AND H.CDGROU NOT IN('ADMINT','ANDROS'))) ORDER BY TOUVER DESC LIMIT 200
Jan 10 16:26:47 srvsvpext mysqld[1551]: Connection ID (thread ID): 959
Jan 10 16:26:47 srvsvpext mysqld[1551]: Status: NOT_KILLED
Jan 10 16:26:47 srvsvpext mysqld[1551]: 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,orderby_uses_equalities=off
Jan 10 16:26:47 srvsvpext mysqld[1551]: The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
Jan 10 16:26:47 srvsvpext mysqld[1551]: information that should help you find out what is causing the crash.
Jan 10 16:26:47 srvsvpext systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 16:26:47 srvsvpext systemd[1]: mariadb.service: Unit entered failed state.
Jan 10 16:26:47 srvsvpext systemd[1]: mariadb.service: Failed with result 'exit-code'.

The request "select A., B................." is one of the main request of my application. It works fine 99,9% times but crashes the server 0,1% times.
My application works with Apache 8 Java 8 and MariaDB Connector 1.5.2
My database is about 100 tables, 100000 lines max per table, 200 fields per table.
I have 2 cores and 5G RAM



 Comments   
Comment by Elena Stepanova [ 2017-01-11 ]

Could you please provide the output for SHOW CREATE and SHOW INDEX IN for the tables involved in the query (and if any of them are views, also the same output for underlying tables)? Please also attach your cnf file(s).
Even though it's unlikely, given your statistics, maybe we'll get lucky and will be able to reproduce it.

Comment by Christophe Morell [ 2017-01-12 ]

Hi Elena,
I give you some information. As you can see it is quite complex but so :
-my index are created.
-I tried to optimize the views.

Can you check also the my.cnf please ?

Best regards.

Comment by Elena Stepanova [ 2017-01-16 ]

cmorell, thanks.
There is still one table/view missing, SVPI01P0 (which is used to create SVPC01R1 which, in turn, is used in the query).

Comment by Christophe Morell [ 2017-01-17 ]

Hi Elena,
Here you have the table.
Best regards
Christophe

Comment by Ivan Tyagov [ 2017-04-10 ]

Edit: moved to MDEV-12281

Comment by Daniel Black [ 2017-04-11 ]

ivan.tyagov, this looks rather different and I suspect its the same as MDEV-12281.

Comment by Daniel Black [ 2017-04-11 ]

cmorell, elenst the original backtrace looks close to MDEV-7445 at the lower levels anyway.

Comment by Ivan Tyagov [ 2017-04-11 ]

Thanks, sorry for wrong place to report. It is MDEV-12281

Comment by Daniel Black [ 2017-12-18 ]

cmorell have you had troubles in 10.1.24+ versions?

Comment by Daniel Black [ 2018-04-01 ]

duplicate of MDEV-12281

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