Bug #18848 SIGHUP crashes the server
Submitted: 6 Apr 2006 13:55 Modified: 18 Apr 2006 20:39
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Petr Chardin CPU Architecture:Any

[6 Apr 2006 13:55] Sergei Golubchik
Description:
SIGHUP causes a server crash.
Caused by the new logs-in-tables code.

(gdb) bt
#0  0x08257ab5 in relink_unused (table=0x9266818) at sql_base.cc:1536
#1  0x08260f6f in remove_table_from_cache (thd=0x0, db=0x86ba70f "mysql", 
    table_name=0x86ba6e9 "slow_log", flags=0) at sql_base.cc:5938
#2  0x08209e40 in lock_table_name (thd=0x0, table_list=0xbfaedd5c)
    at lock.cc:791
#3  0x08209a7e in lock_and_wait_for_table_name (thd=0x0, table_list=0xbfaedd5c)
    at lock.cc:699
#4  0x082ad455 in LOGGER::flush_logs (this=0x87e0fa0, thd=0x0) at log.cc:687
#5  0x08235c27 in reload_acl_and_cache (thd=0x0, options=32815, tables=0x0, 
    write_to_binlog=0xbfaedf5f) at sql_parse.cc:6754
#6  0x082102e0 in signal_hand (arg=0x0) at mysqld.cc:2417
#7  0x28807902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1
#8  0x00000000 in ?? ()

How to repeat:
killall -HUP mysqld
[10 Apr 2006 8:50] 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/4696
[10 Apr 2006 17:47] Jim Winstead
Okay to push (after second review).
[18 Apr 2006 4:43] 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/5044
[18 Apr 2006 5:07] Petr Chardin
pushed into 5.1.10. The problem was in the NULL THD, passed to one of the routines.
[18 Apr 2006 20:39] Paul DuBois
Noted in 5.1.10 changelog.

The server attempted to flush uninitialized log tables during
<literal>SIGHUP</literal> processing, causing a crash. (Bug
#18848)