Bug #23809 mysql crash, maybe log tables
Submitted: 31 Oct 2006 16:58 Modified: 29 Mar 2011 19:30
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.11 OS:Linux (linux)
Assigned to: CPU Architecture:Any
Tags: log crash

[31 Oct 2006 16:58] Roberto Spadim
Description:
mysql crash, maybe log tables, see err.log:
i have 1gb of ram, 4 gb of swap, 100% free swap, no mmap or locked on memory option

061031 10:35:56 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.11-beta-log'  socket: '/tmp/mysql.sock2'  port: 3307  MySQL Community Server (GPL)
061031 10:35:56 [Note] SCHEDULER: Manager thread booting
061031 10:35:56 [Note] SCHEDULER: Loaded 0 events
061031 10:35:56 [Note] SCHEDULER: Suspending operations
*** glibc detected *** double free or corruption (!prev): 0x087ba7b0 ***
mysqld got signal 6;
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=16777216
read_buffer_size=258048
max_used_connections=3
max_connections=40
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 46943 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x8804098
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...
Cannot determine thread, fp=0xb4d9dbbc, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x81affb2
0xffffe420
(nil)
0xb7e83b73
0xb7e82837
0xb7e8145b
0x845cdd6
0x82de81f
0x82df481
0x824f86a
0x81f22b5
0x81eb058
0x81ea233
0x81eb36d
0x81eb73a
0x81c43b9
0x81cb2d8
0x81c2a9f
0x81c232d
0x81c1874
0xb7fc2d64
0xb7ed6d1a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x880b6e0 = SELECT count(*) FROM general_log
thd->thread_id=3
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
pure virtual method called

Number of processes running now: 0
061031 10:41:03  mysqld restarted
/usr/local/mysql/bin/mysqld: Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adicionar mais área de 'swap'
061031 10:41:03 [ERROR] Failed to initialize log tables. Falling back to the old-fashioned logs
061031 10:41:03 [Note] /usr/local/mysql/bin/mysqld: ready for connections.
Version: '5.1.11-beta-log'  socket: '/tmp/mysql.sock2'  port: 3307  MySQL Community Server (GPL)
061031 10:41:03 [Note] SCHEDULER: Manager thread booting
061031 10:41:03 [Note] SCHEDULER: Loaded 0 events
061031 10:41:03 [Note] SCHEDULER: Suspending operations

resolve_stack:

0x81affb2 handle_segfault + 430
0xffffe420 _end + -142111784
(nil)
0xb7e83b73 _end + -1351621845
0xb7e82837 _end + -1351626769
0xb7e8145b _end + -1351631853
0x845cdd6 my_no_flags_free + 22
0x82de81f free_share__FP13st_tina_share + 227
0x82df481 open__7ha_tinaPCciUi + 73
0x824f86a ha_open__7handlerP8st_tablePCcii + 42
0x81f22b5 open_table_from_share__FP3THDP14st_table_sharePCcUiUiUiP8st_tableb + 1173
0x81eb058 open_unireg_entry__FP3THDP8st_tableP13st_table_listPCcPcUiP11st_mem_root + 724
0x81ea233 open_table__FP3THDP13st_table_listP11st_mem_rootPbUi + 1603
0x81eb36d open_tables__FP3THDPP13st_table_listPUiUi + 361
0x81eb73a open_and_lock_tables__FP3THDP13st_table_list + 30
0x81c43b9 mysql_execute_command__FP3THD + 1061
0x81cb2d8 mysql_parse__FP3THDPcUi + 324
0x81c2a9f dispatch_command__F19enum_server_commandP3THDPcUi + 1891
0x81c232d do_command__FP3THD + 189
0x81c1874 handle_one_connection + 764
0xb7fc2d64 _end + -1350314724
0xb7ed6d1a _end + -1351281454

How to repeat:
i don't know, just start daemon and after some time the crash happen, i'm using mysqld_multi and mysqld_safe , the server continue running without problem, i saw the problem when my uptime was too low (700 seconds)
[2 Nov 2006 12:49] Valeriy Kravchuk
Thank you for a problem report. So, if you run

SELECT count(*) FROM general_log;

several times now there is no crash?

Please, send the results of

getconf GNU_LIBPTHREAD_VERSION
uname -a

commands also.
[2 Nov 2006 15:55] Roberto Spadim
=> SHOW TABLES FROM mysql
<= Tables_in_mysql
columns_priv
db
event
func
general_log
help_category
help_keyword
help_relation
help_topic
host
plugin
proc
procs_priv
slow_log
tables_priv
time_zone
time_zone_leap_second
time_zone_name
time_zone_transition
time_zone_transition_type
user

=>SELECT count(*) FROM general_log
<=Error: 1041 - Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adiciona
=>SELECT count(*) FROM general_log
<=Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adiciona
=>SELECT count(*) FROM general_log
<=Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adiciona
=>SELECT count(*) FROM general_log
<=Sem memória. Verifique se o mysqld ou algum outro processo está usando toda memória disponível. Se não, você pode ter que usar 'ulimit' para permitir ao mysqld usar mais memória ou você pode adiciona

[root@raja: ~]# getconf GNU_LIBPTHREAD_VERSION
NPTL 2.3.3
[root@raja: ~]# uname -a
Linux raja 2.6.10-ARCH #1 SMP Tue Jan 18 09:47:14 PST 2005 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz GenuineIntel GNU/Linux
[root@raja: ~]#
[2 Nov 2006 16:04] Roberto Spadim
=>show table status
<=
Name,Engine,Version,Row_format,Rows,Avg_row_length,Data_length,Max_data_length,Index_length,Data_free,Auto_increment,Create_time,Update_time,Check_time,Collation,Checksum,Create_options,Comment
columns_priv,MyISAM,10,Fixed,0,0,0,227994731135631359,4096,0,NULL,2006-08-24 21:14:02,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,Column privileges
db,MyISAM,10,Fixed,20,440,8800,123848989752688639,5120,0,NULL,2006-08-24 21:14:15,2006-10-24 21:47:51,2006-08-31 13:39:29,utf8_bin,NULL,,Database privileges
event,MyISAM,10,Dynamic,0,0,0,281474976710655,4096,0,NULL,2006-08-24 21:14:14,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Events
func,MyISAM,10,Fixed,0,0,0,162974011515469823,1024,0,NULL,2006-08-24 21:14:01,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,User defined functions
general_log,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,Sem mem
help_category,MyISAM,9,Dynamic,29,29,864,4294967295,3072,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,help categories
help_keyword,MyISAM,9,Dynamic,350,20,7320,4294967295,11264,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,help keywords
help_relation,MyISAM,9,Fixed,567,9,5103,38654705663,9216,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,keyword-topic relation
help_topic,MyISAM,9,Dynamic,393,423,166324,4294967295,12288,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,help topics
host,MyISAM,10,Fixed,0,0,0,110056715893866495,2048,0,NULL,2006-08-24 21:14:14,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,Host privileges;  Merged with database privileges
plugin,MyISAM,10,Fixed,0,0,0,162411061562048511,1024,0,NULL,2006-08-24 21:13:55,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,
proc,MyISAM,10,Dynamic,0,0,0,281474976710655,2048,0,NULL,2006-08-24 21:14:12,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Stored Procedures
procs_priv,MyISAM,10,Fixed,0,0,0,239253730204057599,4096,0,NULL,2006-08-24 21:14:11,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,Procedure privileges
slow_log,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,Sem mem
tables_priv,MyISAM,10,Fixed,0,0,0,239535205180768255,4096,0,NULL,2006-08-24 21:14:15,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_bin,NULL,,Table privileges
time_zone,MyISAM,10,Fixed,0,0,0,25769803775,1024,0,1,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Time zones
time_zone_leap_second,MyISAM,9,Fixed,0,0,0,55834574847,1024,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Leap seconds information for time zones
time_zone_name,MyISAM,9,Fixed,0,0,0,846108557311,1024,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Time zone names
time_zone_transition,MyISAM,9,Fixed,0,0,0,73014444031,1024,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Time zone transitions
time_zone_transition_type,MyISAM,9,Fixed,0,0,0,163208757247,1024,0,NULL,2005-06-13 03:52:30,2006-08-31 13:39:29,2006-08-31 13:39:29,utf8_general_ci,NULL,,Time zone transition types
user,MyISAM,10,Dynamic,6,87,716,281474976710655,2048,192,NULL,2006-08-24 21:14:14,2006-10-30 22:27:54,2006-08-31 13:39:29,utf8_bin,NULL,,Users and global privileges
[2 Nov 2006 19:05] Sveta Smirnova
Thank you for the report.

Please try to repeat with new 5.0.12 version available at http://dev.mysql.com/downloads/mysql/5.1.html
[3 Nov 2006 14:06] Valeriy Kravchuk
Sveta meant version 5.1.12 (just released officially), I suppose.
[3 Dec 2006 0: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".
[29 Mar 2011 18:44] Roberto Spadim
working withou problem in mysql 5.5
[29 Mar 2011 19:30] Sveta Smirnova
Thank you for the update.

Closed as "Can't repeat"