[MDEV-4277] Crash inside mi_killed_in_mariadb() with myisammrg Created: 2013-03-15  Updated: 2013-03-22  Resolved: 2013-03-21

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.0.1, 5.5.30, 5.3.12
Fix Version/s: 10.0.2, 5.5.31, 5.3.13

Type: Bug Priority: Major
Reporter: Peter (Stig) Edwards Assignee: Sergei Petrunia
Resolution: Fixed Votes: 0
Labels: None
Environment:

RedHat EL 5.3 2.6.18-274.7.1.el5 x86_64 using bintar mariadb-5.3.12-Linux-x86_64.tar.gz


Attachments: File mdev-4277.test    

 Description   

Hello and thank you for mariadb-5.3.12-Linux-x86_64.tar.gz

Had a crash on a recently upgraded (from MySQL 5.1.48) today, wondering if the backtrace might look like a known issue. I do not have a reproducer at the moment. Thanks.

 
130315  9:43:03 [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 http://kb.askmonty.org/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: 5.3.12-MariaDB-log
key_buffer_size=34359738368
read_buffer_size=8388608
max_used_connections=135
max_threads=501
thread_count=20
connection_count=20
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 40230290 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x0x2abbac0c2a10
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 = 0x43e0f0f8 thread_stack 0x48000
./bin/mysqld(my_print_stacktrace+0x2e) [0x998a1e]
./bin/mysqld(handle_fatal_signal+0x3f9) [0x71ede9]
/lib64/libpthread.so.0 [0x399f40eb70]
./bin/mysqld(mi_killed_in_mariadb+0xb) [0x7b412b]
./bin/mysqld(mi_yield_and_check_if_killed+0x23) [0x7caba3]
./bin/mysqld(mi_rnext_same+0xdb) [0x7e19fb]
./bin/mysqld(myrg_rnext_same+0x33) [0x86eb33]
./bin/mysqld(ha_myisammrg::index_next_same(unsigned char*, unsigned char const*, unsigned int)+0x20) [0x86cd60]
./bin/mysqld(handler::read_range_next()+0x3f) [0x70fc9f]
./bin/mysqld(handler::multi_range_read_next(void**)+0xd2) [0x7a52a2]
./bin/mysqld(QUICK_RANGE_SELECT::get_next()+0x39) [0x6ecad9]
./bin/mysqld(QUICK_ROR_INTERSECT_SELECT::get_next()+0x3c) [0x6ededc]
./bin/mysqld [0x70ac7e]
./bin/mysqld(sub_select(JOIN*, st_join_table*, bool)+0xae) [0x678a1e]
./bin/mysqld [0x678f54]
./bin/mysqld(JOIN::exec()+0x856) [0x68afb6]
./bin/mysqld(mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*)+0x199) [0x68d0f9]
./bin/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x16f) [0x68dacf]
./bin/mysqld [0x601e9e]
./bin/mysqld(mysql_execute_command(THD*)+0x3a43) [0x607833]
./bin/mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x299) [0x60a629]
./bin/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xdf9) [0x60b879]
./bin/mysqld(do_command(THD*)+0x101) [0x60c0b1]
./bin/mysqld(handle_one_connection+0xfd) [0x5fd7bd]
/lib64/libpthread.so.0 [0x399f40673d]
/lib64/libc.so.6(clone+0x6d) [0x399e8d44bd]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x2abbc81173e8): select l.dttm as Date, l.usr as Username, l.serial as SN, l.lntype as Type, l.lntxt as Text from logh l  INNER JOIN session s  ON s.sessionid = l.sessionid where l.lntype in ('XXXXXXXXXXXXXXX')  and l.dt in ('2012-02-20')  and l.usr in ('YYYYYYYYYYY')  and l.serial in ('1234567')  and l.lntxt like '%Some text%' and s.speed != 'some_value' and s.inhouse = 'n' limit 1000
Connection ID (thread ID): 3806879
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,index_conditio                                n_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,p                                artial_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_increme                                ntal=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=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.



 Comments   
Comment by Elena Stepanova [ 2013-03-15 ]

Hi Peter,

I don't think we've seen any similar crashes recently.
I presume you can't provide the database dump? Can you quote table structures for `logh` and `session` and underlying tables, and give a hint on how many rows they might have (approximately)? I'll try to generate similar load and see how it goes.

Comment by Elena Stepanova [ 2013-03-15 ]

Peter, thank you, I'm able to reproduce it based on the info you provided. Will add a test case soon.

Comment by Peter (Stig) Edwards [ 2013-03-15 ]

That is great news. I am impressed. Thank you. I was contemplating a roll back, and may still have to do so if it repeats, so I am particularly interested if there is an optimizer switch I can turn off to avoid hitting the bug (or not).

Comment by Elena Stepanova [ 2013-03-15 ]

Yes, in my version of the test case the crash happens with index_merge=on,index_merge_intersection=on. Turning off at least one of these prevents the crash (and changes the plan so there is no index_merge/intersect anymore).

Of course it still might be different on your data, but I think it's worth trying.

Comment by Elena Stepanova [ 2013-03-16 ]

The test case is attached (mdev-4277.test). It's plain SQL which can be used both in MTR or in MySQL client.
Minimal optimizer_switch: index_merge=on,index_merge_intersection=on

Comment by Sergei Petrunia [ 2013-03-19 ]

Committed a patch. Need a review discussion for it.

Comment by Sergei Petrunia [ 2013-03-21 ]

The fix is pushed into MariaDB-5.3 tree.

Comment by Peter (Stig) Edwards [ 2013-03-22 ]

Thank you.

Generated at Thu Feb 08 06:55:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.