Bug #46194 crash in close_connections() during shutdown of server and log_warnings>0
Submitted: 15 Jul 2009 8:18 Modified: 30 Dec 2014 19:12
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: General Severity:S1 (Critical)
Version:5.4.4-debug OS:Linux (32-bit fc8)
Assigned to: CPU Architecture:Any

[15 Jul 2009 8:18] Shane Bester
Description:
090628  2:12:29 [Note] ./bin/mysqld: Normal shutdown

==7775== 
==7775== Invalid read of size 4
==7775==    at 0x827C49C: close_connections() (mysqld.cc:1090)
==7775==    by 0x827C768: kill_server(void*) (mysqld.cc:1252)
==7775==    by 0x827C7A4: kill_server_thread (mysqld.cc:1278)
==7775==    by 0x4893DA: start_thread (in /lib/libpthread-2.5.so)
==7775==    by 0x3D606D: clone (in /lib/libc-2.5.so)
==7775==  Address 0x4FC is not stack'd, malloc'd or (recently) free'd
090628  2:12:31 - mysqld got signal 11 ;

This is the code that crashed:

if (global_system_variables.log_warnings)
  sql_print_warning(ER(ER_FORCING_CLOSE),my_progname,
  tmp->thread_id,
  (tmp->main_security_ctx.user ?
  tmp->main_security_ctx.user : ""));

How to repeat:
start server with --log-bin --binlog_format=row --log-warnings=2
make alot of inserts/flush logs that 'show binlog events' takes a few seconds.
while 'show binlog events' is running in a loop, shutdown server using mysqladmin shutdown.
[15 Jul 2009 8:37] MySQL Verification Team
i also start server with --skip-grant-tables --skip-name-resolve
all connections are made from another network host in case this is relevant.
[16 Jul 2009 15:36] MySQL Verification Team
actually it's not limited to show binlog events.  i got same crash with load data infile... running while a shutdown was performed.
[25 Jul 2009 4:35] MySQL Verification Team
Looks like http://bugs.mysql.com/bug.php?id=46267 is duplicate of this one.
[25 Aug 2009 23: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".
[30 Dec 2014 19:12] MySQL Verification Team
5.4.4 is obsolete and I don't remember seeing this crash again.