Bug #50308 | Test federated_debug causes server crash | ||
---|---|---|---|
Submitted: | 13 Jan 2010 13:43 | Modified: | 10 Feb 2010 18:44 |
Reporter: | Georgi Kodinov | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Security: Privileges | Severity: | S3 (Non-critical) |
Version: | mysql-pe | OS: | Linux (Fedora 12 x86_64) |
Assigned to: | Georgi Kodinov | CPU Architecture: | Any |
[13 Jan 2010 13:43]
Georgi Kodinov
[13 Jan 2010 13:43]
Georgi Kodinov
The gdb stacktrace looks like this : Program terminated with signal 11, Segmentation fault. #0 0x00000039b240c2ac in pthread_kill () from /lib64/libpthread.so.0 #0 0x00000039b240c2ac in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000000b519e4 in my_write_core (sig=11) at stacktrace.c:328 #2 0x00000000006e908c in handle_segfault (sig=11) at mysqld.cc:2764 #3 <signal handler called> #4 0x0000000000707644 in reload_acl_and_cache (thd=0x0, options=32814, tables=0x0, write_to_binlog=0x7f2b12267c9f) at sql_parse.cc:6999 #5 0x00000000006f8fd6 in dispatch_command (command=COM_REFRESH, thd=0x1b3e3c8, packet=0x1b48f39 ".", packet_length=1) at sql_parse.cc:1264 #6 0x00000000006f78d8 in do_command (thd=0x1b3e3c8) at sql_parse.cc:760 #7 0x00000000006f609a in handle_one_connection (arg=0x1b3e3c8) at sql_connect.cc:1164 #8 0x00000039b2406a3a in start_thread () from /lib64/libpthread.so.0 #9 0x00000039b1cddf3d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? () Thread 5 (Thread 17569): #0 0x00000039b240e11d in read () from /lib64/libpthread.so.0 #1 0x0000000000be213b in vio_read (vio=0x1b03738, buf=0x1b3a388 "\001", size=4) at viosocket.c:44 #2 0x00000000006daf1a in my_real_read (net=0x1b2f930, complen=0x7f2b122a8d98) at net_serv.cc:833 #3 0x00000000006db72c in my_net_read (net=0x1b2f930) at net_serv.cc:1023 #4 0x00000000006f772a in do_command (thd=0x1b2f818) at sql_parse.cc:706 #5 0x00000000006f609a in handle_one_connection (arg=0x1b2f818) at sql_connect.cc:1164 #6 0x00000039b2406a3a in start_thread () from /lib64/libpthread.so.0 #7 0x00000039b1cddf3d in clone () from /lib64/libc.so.6 #8 0x0000000000000000 in ?? () Thread 4 (Thread 17568): #0 0x00000039b240e11d in read () from /lib64/libpthread.so.0 #1 0x0000000000be213b in vio_read (vio=0x1b030c8, buf=0x1b2b7d8 "\001", size=4) at viosocket.c:44 #2 0x00000000006daf1a in my_real_read (net=0x1ae0380, complen=0x7f2b122e9d98) at net_serv.cc:833 #3 0x00000000006db72c in my_net_read (net=0x1ae0380) at net_serv.cc:1023 #4 0x00000000006f772a in do_command (thd=0x1ae0268) at sql_parse.cc:706 #5 0x00000000006f609a in handle_one_connection (arg=0x1ae0268) at sql_connect.cc:1164 #6 0x00000039b2406a3a in start_thread () from /lib64/libpthread.so.0 #7 0x00000039b1cddf3d in clone () from /lib64/libc.so.6 #8 0x0000000000000000 in ?? () Thread 3 (Thread 17509): #0 0x00000039b240ed28 in sigwait () from /lib64/libpthread.so.0 #1 0x00000000006e97e4 in signal_hand (arg=0x0) at mysqld.cc:2966 #2 0x00000039b2406a3a in start_thread () from /lib64/libpthread.so.0 #3 0x00000039b1cddf3d in clone () from /lib64/libc.so.6 #4 0x0000000000000000 in ?? () Thread 2 (Thread 17506): #0 0x00000039b1cd6ca3 in select () from /lib64/libc.so.6 #1 0x00000000006ecfc5 in handle_connections_sockets () at mysqld.cc:5383 #2 0x00000000006ec559 in main (argc=10, argv=0x7fff2fe49918) at mysqld.cc:4876 Thread 1 (Thread 17588): #0 0x00000039b240c2ac in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000000b519e4 in my_write_core (sig=11) at stacktrace.c:328 #2 0x00000000006e908c in handle_segfault (sig=11) at mysqld.cc:2764 #3 <signal handler called> #4 0x0000000000707644 in reload_acl_and_cache (thd=0x0, options=32814, tables=0x0, write_to_binlog=0x7f2b12267c9f) at sql_parse.cc:6999 #5 0x00000000006f8fd6 in dispatch_command (command=COM_REFRESH, thd=0x1b3e3c8, packet=0x1b48f39 ".", packet_length=1) at sql_parse.cc:1264 #6 0x00000000006f78d8 in do_command (thd=0x1b3e3c8) at sql_parse.cc:760 #7 0x00000000006f609a in handle_one_connection (arg=0x1b3e3c8) at sql_connect.cc:1164 #8 0x00000039b2406a3a in start_thread () from /lib64/libpthread.so.0 #9 0x00000039b1cddf3d in clone () from /lib64/libc.so.6 #10 0x0000000000000000 in ?? ()
[13 Jan 2010 14:42]
Valeriy Kravchuk
Test passes without any problems on both 5.1.43-bzr and 6.0-codebase trees on Mac OS X.
[13 Jan 2010 15:06]
Sveta Smirnova
Thank you for the report. Verified as described.
[14 Jan 2010 8:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/96844 3827 Georgi Kodinov 2010-01-14 Bug #50308: Test federated_debug causes server crash In the special debug mode used by federated_debug reload_acl_and_cache() is called with a NULL THD pointer. And since the control path in this function doesn't expect that the THD pointer may be missing the server crashes on NULL pointer dereference. Fixed by correctly checking for the presence of THD before dereferencing it.
[14 Jan 2010 15:11]
Georgi Kodinov
Pushed to mysql-pe
[5 Feb 2010 11:53]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100205113942-oqovjy0eoqbarn7i) (version source revid:alik@sun.com-20100204064210-ljwanqvrjs83s1gq) (merge vers: 6.0.14-alpha) (pib:16)
[10 Feb 2010 18:44]
Paul DuBois
Noted in 6.0.14 changelog. A NULL pointer was dereferenced in a special debug mode used by a FEDERATED test case.