Crash in create_internal_tmp_table or OOM or internal error: 'Using too big key for internal temp tables' with derived_with_keys=on, FROM subquery or view
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MariaDB |
Fix Released
|
Undecided
|
Igor Babaev |
Bug Description
Hi,
I've just hit a bug with MariaDB 5.3.5-ga. The stack trace is the following :
Mar 15 16:57:46 mysql mysqld: 2d2d2d d:2d:2d [ERROR] mysqld got signal 11 ;
Mar 15 16:57:46 mysql mysqld: This could be because you hit a bug. It is also possible that this binary
Mar 15 16:57:46 mysql mysqld: or one of the libraries it was linked against is corrupt, improperly built,
Mar 15 16:57:46 mysql mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
Mar 15 16:57:46 mysql mysqld:
Mar 15 16:57:46 mysql mysqld: To report this bug, see http://
Mar 15 16:57:46 mysql mysqld:
Mar 15 16:57:46 mysql mysqld: We will try our best to scrape up some info that will hopefully help
Mar 15 16:57:46 mysql mysqld: diagnose the problem, but since we have already crashed,
Mar 15 16:57:46 mysql mysqld: something is definitely wrong and this may fail.
Mar 15 16:57:46 mysql mysqld:
Mar 15 16:57:46 mysql mysqld: Server version: 5.3.5-MariaDB-ga
Mar 15 16:57:46 mysql mysqld: key_buffer_
Mar 15 16:57:46 mysql mysqld: read_buffer_
Mar 15 16:57:46 mysql mysqld: max_used_
Mar 15 16:57:46 mysql mysqld: max_threads=201
Mar 15 16:57:46 mysql mysqld: thread_count=19
Mar 15 16:57:46 mysql mysqld: connection_count=19
Mar 15 16:57:46 mysql mysqld: It is possible that mysqld could use up to
Mar 15 16:57:46 mysql mysqld: key_buffer_size + (read_buffer_size + sort_buffer_
Mar 15 16:57:46 mysql mysqld: Hope that's ok; if not, decrease some variables in the equation.
Mar 15 16:57:46 mysql mysqld:
Mar 15 16:57:46 mysql mysqld: Thread pointer: 0xda56fe0
Mar 15 16:57:46 mysql mysqld: Attempting backtrace. You can use the following information to find out
Mar 15 16:57:46 mysql mysqld: where mysqld died. If you see no messages after this, something went
Mar 15 16:57:46 mysql mysqld: terribly wrong...
Mar 15 16:57:46 mysql mysqld: stack_bottom = 7fc0f7ccae98 thread_stack 0x3c000
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: /lib/libpthread
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld() [0x6bce63]
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld() [0x6480ce]
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: ./bin/mysqld(
Mar 15 16:57:46 mysql mysqld: /lib/libpthread
Mar 15 16:57:46 mysql mysqld: /lib/libc.
The query :
SELECT tmp.*, m.photo , m.login member_name, m.sexe, pv.name plateform_name FROM ((SELECT mp.product_id id, mp.date_review, mp.status, mp.plateform_id, mp.id review_id, mp.member_id, mp.note, mp.nb_comment, mp.review_all, mp.review_like, mp.selection, mp.conso_future, mpd.review, mpd.review_status, mpd.title_review from sc_member_
Optimizer switch: index_merge=
and execution plan
+----+-
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-
| 1 | PRIMARY | <derived2> | ALL | key0 | NULL | NULL | NULL | 2 | |
| 1 | PRIMARY | pv | eq_ref | PRIMARY | PRIMARY | 4 | tmp.plateform_id | 1 | |
| 1 | PRIMARY | m | eq_ref | PRIMARY,
| 2 | DERIVED | mp | range | note,is_
| 2 | DERIVED | mpd | eq_ref | unique_
| 3 | UNION | mp | range | note,is_
| 3 | UNION | mpd | eq_ref | unique_
| NULL | UNION RESULT | <union2,3> | ALL | NULL | NULL | NULL | NULL | NULL | |
+----+-
8 rows in set (0,24 sec)
The crash is quite random. The query could finish successfully or just issue a
ERROR 5 (HY000): Out of memory (Needed 1730537048 bytes)
Before trying to dig more and try to make a reproducable testcase, is there any specific parameters I could control which could explain the reported memory allocation ?
Thanks and regards,
Jocelyn Fournier
summary: |
- Crash in create_internal_tmp_table + Crash in create_internal_tmp_table or out of memory or internal error: + 'Using too big key for internal temp tables' with derived_with_keys=on, + FROM subquery or view |
summary: |
- Crash in create_internal_tmp_table or out of memory or internal error: - 'Using too big key for internal temp tables' with derived_with_keys=on, - FROM subquery or view + Crash in create_internal_tmp_table or OOM or internal error: 'Using too + big key for internal temp tables' with derived_with_keys=on, FROM + subquery or view |
Hi,
Actually, I've been able to reproduce one time the crash with the following table and datas, with the same query as above :
http:// www.wiktik. com/error. tar.gz
HTH,
Jocelyn