Bug #67707 mysqld crash
Submitted: 26 Nov 2012 9:26 Modified: 2 Feb 2013 14:35
Reporter: Levente Farkas Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:mysql-5.1.66-1.el6_3.x86_64 OS:Linux (RHEL-6.3)
Assigned to: CPU Architecture:Any

[26 Nov 2012 9:26] Levente Farkas
Description:
rhel 6.3's mysql-5.1.66-1.el6_3.x86_64 crash every night with this in the log:
---------------------------------------
Version: '5.1.66-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
01:05:14 UTC - 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.
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.

key_buffer_size=268435456
read_buffer_size=1048576
max_used_connections=15
max_threads=151
thread_count=8
connection_count=8
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 572962 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x19cab00
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 = 7f399c307d98 thread_stack 0x40000
/usr/libexec/mysqld(my_print_stacktrace+0x29) [0x84dfe9]
/usr/libexec/mysqld(handle_fatal_signal+0x483) [0x6a2683]
/lib64/libpthread.so.0() [0x3e2020f500]
/lib64/libc.so.6(memcpy+0x15b) [0x3e1fa891ab]
/usr/libexec/mysqld(String::copy(char const*, unsigned int, charset_info_st*)+0x91) [0x5b8d01]
/usr/libexec/mysqld(String::copy(char const*, unsigned int, charset_info_st*, charset_info_st*, unsigned int*)+0xfa) [0x5b8e0a]
/usr/libexec/mysqld() [0x6c19cc]
/usr/libexec/mysqld() [0x6c1e13]
/usr/libexec/mysqld() [0x6c0794]
/usr/libexec/mysqld(get_all_tables(THD*, TABLE_LIST*, Item*)+0x147) [0x6c9ac7]
/usr/libexec/mysqld(get_schema_tables_result(JOIN*, enum_schema_table_state)+0x1f7) [0x6b9fe7]
/usr/libexec/mysqld(JOIN::exec()+0x4ed) [0x632e8d]
/usr/libexec/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*)+0x15c) [0x62f3ac]
/usr/libexec/mysqld(handle_select(THD*, st_lex*, select_result*, unsigned long)+0x174) [0x634b24]
/usr/libexec/mysqld() [0x5c851a]
/usr/libexec/mysqld(mysql_execute_command(THD*)+0x4ce) [0x5c955e]
/usr/libexec/mysqld(mysql_parse(THD*, char*, unsigned int, char const**)+0x2d3) [0x5ceaf3]
/usr/libexec/mysqld(dispatch_command(enum_server_command, THD*, char*, unsigned int)+0xd15) [0x5d0b95]
/usr/libexec/mysqld(do_command(THD*)+0xea) [0x5d16ea]
/usr/libexec/mysqld(handle_one_connection+0x23e) [0x5c49ce]
/lib64/libpthread.so.0() [0x3e20207851]
/lib64/libc.so.6(clone+0x6d) [0x3e1fae811d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (19c77d0): SHOW FIELDS FROM `geo_all_region`
Connection ID (thread ID): 2277
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.
121126 02:05:15 mysqld_safe Number of processes running now: 0
121126 02:05:15 mysqld_safe mysqld restarted
121126  2:05:47  InnoDB: Initializing buffer pool, size = 8.0M
121126  2:05:47  InnoDB: Completed initialization of buffer pool
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
121126  2:05:47  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Last MySQL binlog file position 0 34351046, file name ./mysql-bin.000152
121126  2:05:49  InnoDB: Started; log sequence number 1 222166831
121126  2:05:49 [Note] Recovering after a crash using mysql-bin
121126  2:05:52 [Note] Starting crash recovery...
121126  2:05:52 [Note] Crash recovery finished.
121126  2:05:52 [Note] Event Scheduler: Loaded 0 events
121126  2:05:52 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.1.66-log'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  Source distribution
---------------------------------------

How to repeat:
do nothing just run a web service
[26 Nov 2012 12:21] Peter Laursen
Is there a scheduled backup/maintenance job or similar running at the time of the crash?

Peter
(not a MySQL/Oracle person?
[26 Nov 2012 12:51] Levente Farkas
only this:
/etc/init.d/httpd graceful 1
which is a 
apachectl graceful 1
which is according to man:
       graceful
              Gracefully  restarts the Apache httpd daemon. If the daemon is not running, it is started. This differs from a normal restart in that currently open connections are not aborted. A side effect is that
              old log files will not be closed immediately. This means that if used in a log rotation script, a substantial delay may be necessary to ensure that the old log  files  are  closed  before  processing
              them. This command automatically checks the configuration files as in configtest before initiating the restart to make sure Apache doesn’t die. This is equivalent to apachectl -k graceful.
[26 Nov 2012 12:53] Levente Farkas
and there is a mod_python webapp which is the real user of mysql...
[27 Nov 2012 9:36] MySQL Verification Team
I guess "SHOW FIELDS FROM `geo_all_region`" might be executed by mysqldump.

So, the next logical step would be to-

1.  does that query crash when execute manually?
2.  show us output of SHOW CREATE TABLE `geo_all_region`;
[27 Nov 2012 11:11] Levente Farkas
don't crash.

mysql> SHOW CREATE TABLE `geo_all_region`;
+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| View           | Create View                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | character_set_client | collation_connection |
+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
| geo_all_region | CREATE ALGORITHM=UNDEFINED DEFINER=`fregatt`@`localhost` SQL SECURITY DEFINER VIEW `geo_all_region` AS select `rc`.`ID` AS `ID`,`rc`.`NAME` AS `NAME`,`rc`.`TYPE` AS `TYPE`,`rc`.`POLYGONS` AS `POLYGONS` from `geo_region_custom_ordered` `rc` union select `bp`.`ID` AS `ID`,`bp`.`NAME` AS `NAME`,`bp`.`TYPE` AS `TYPE`,`bp`.`POLYGONS` AS `POLYGONS` from `geo_region_bp` `bp` union select `town`.`ID` AS `ID`,`town`.`NAME` AS `NAME`,`town`.`TYPE` AS `TYPE`,`town`.`POLYGONS` AS `POLYGONS` from `geo_site_town` `town` union select `village`.`ID` AS `ID`,`village`.`NAME` AS `NAME`,`village`.`TYPE` AS `TYPE`,`village`.`POLYGONS` AS `POLYGONS` from `geo_site_village` `village` union select `county`.`ID` AS `ID`,`county`.`NAME` AS `NAME`,`county`.`TYPE` AS `TYPE`,`county`.`POLYGONS` AS `POLYGONS` from `geo_region_county` `county` | latin1               | latin1_swedish_ci    |
+----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+
1 row in set (0.00 sec)
[27 Nov 2012 19:36] Sveta Smirnova
Thank you for the feedback.

How this bug differs from bug #65971 which was filled by you and not fixed yet? Or did you just open new bug, because this was another view? Please explain.
[28 Dec 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[28 Dec 2012 8:21] Levente Farkas
probably it's the same
[2 Feb 2013 14:35] Levente Farkas
does it fixed in 5.1.67?
[7 Jun 2013 7:57] MySQL Verification Team
Bug #56971 was fixed "Noted in 5.1.69, 5.5.31, 5.6.11, 5.7.1 changelogs"