Bug #34502 mysqladmin debug causes a crash when server is creating/dropping many tmp tables

Submitted: 12 Feb 2008 22:03 Modified: 9 Jun 2009 23:09
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Locking Severity:S3 (Non-critical)
Version:5.1.23-debug, 5.1.24, 5.1.30 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: mysqladmin debug

[12 Feb 2008 22:03] Shane Bester
Description:
mysqld-debug crashes with this stack trace when multiple threads are rapidly creating and dropping temporary tables:

mysqld.exe!thr_print_locks
mysqld.exe!mysql_print_status
mysqld.exe!dispatch_command
mysqld.exe!do_command
mysqld.exe!handle_one_connection
mysqld.exe!pthread_start
mysqld.exe!_callthreadstart
mysqld.exe!_threadstart
kernel32.dll!FlsSetValue

How to repeat:
run debug build of mysql using default options.

in many threads (e.g. 10) run this in a loop:

create temporary table t1(a varchar(255),unique key(a),key(a))engine=myisam;
drop temporary table t1;

while the above is running, run "mysqladmin -uroot debug" in a loop.
crash occurs within seconds.
[12 Feb 2008 22:42] MySQL Verification Team
Thank you for the bug report. Verified with 5.1.24.

 	ntdll.dll!7c918fea() 	
>	mysqld.exe!_write(int fh=1, const void * buf=0x008c3da8, unsigned int cnt=7026932)  Line 91 + 0x5	C
 	mysqld.exe!puts(const char * string=)  Line 83 + 0x8	C
 	ntdll.dll!7c90104b() 	
 	mysqld.exe!_thr_print_locks()  + 0x56	C
 	mysqld.exe!mysql_print_status()  Line 468	C++
 	mysqld.exe!dispatch_command(enum_server_command command=COM_DEBUG, THD * thd=0x0113c010, char * packet=0x02c5eeb1, unsigned int packet_length=0)  Line 1454	C++
 	mysqld.exe!do_command(THD * thd=0x0000000d)  Line 781 + 0xf	C++
 	mysqld.exe!handle_one_connection(void * arg=0x0113c010)  Line 1120 + 0x6	C++
 	mysqld.exe!_pthread_start()  + 0x3b	C
 	mysqld.exe!_threadstart(void * ptd=0x02c47008)  Line 196 + 0x6	C
 	kernel32.dll!7c80b683()
[12 Apr 2008 18:34] Shane Bester
I got this crash today on a release binary of 5.1.24-winx64.
This means the bug can affect anybody on a moderately loaded server who runs mysqladmin debug.

ntdll.dll!RtlGetDaclSecurityDescriptor()
mysqld.exe!thr_print_locks
mysqld.exe!mysql_print_status
mysqld.exe!dispatch_command
mysqld.exe!do_command
mysqld.exe!handle_one_connection
mysqld.exe!pthread_start
mysqld.exe!_callthreadstart
mysqld.exe!_threadstart
[12 Jan 2009 12:25] Shane Bester
problem also happens after mysqld received SIGHUP signal ..
[6 Apr 2009 13:52] Shane Bester
another stack trace:

lock: 0x2b2b861fe8:

lock: 0x2b3d29c518:

/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x830dce]
/usr/sbin/mysqld(handle_segfault+0x31d)[0x5b7bdd]
/lib64/tls/libpthread.so.0[0x38a1f0c430]
/lib64/tls/libc.so.6(strlen+0x10)[0x38a1470540]
/lib64/tls/libc.so.6(_IO_vfprintf+0x350b)[0x38a1442a0b]
/lib64/tls/libc.so.6(printf+0x98)[0x38a1448158]
/usr/sbin/mysqld(_Z18mysql_print_statusv+0x340)[0x642400]
/usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x978)[0x5cc458]
/usr/sbin/mysqld(_Z10do_commandP3THD+0xde)[0x5ccfae]
/usr/sbin/mysqld(handle_one_connection+0x5ea)[0x5c042a]
/lib64/tls/libpthread.so.0[0x38a1f0610a]
/lib64/tls/libc.so.6(__clone+0x73)[0x38a14c68b3]
090403 17:09:37 - mysqld got signal 11 ;
[9 Jun 2009 23:10] Davi Arnaut
Closed as a duplicate of Bug#44164.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.040 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.