Bug #29133 mysqld does not exit during shutdown
Submitted: 15 Jun 2007 9:26 Modified: 10 Jul 2007 22:48
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.1.20 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[15 Jun 2007 9:26] Magnus Blåudd
Description:
The mysqld will not properly exit the process when being shutdown. It will however take down it's socket, clean up most of it's resources and write a "Shutdown completed" message to stderr, but after that nothing more happens. This occurs about every third shutdown.

The symptoms of this can bee seen in extra long run- and shutdown-times when running the test suites with mysql-test-run.pl as reported by BUG#28742.

This is most likely caused by one thread not proeprly exiting and thus the mysqld is waiting for that thread indefinitely before exiting.

How to repeat:
Run the test suite as reported in BUG#28742 - or with the patch for that bug an error message will be printed about the process being hard killed.

Suggested fix:
Signal the stray thread to exit.
[22 Jun 2007 16:46] Calvin Sun
Raise to P1 since it causes a lot of troubles for auto testing.
[26 Jun 2007 12:19] 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/29596

ChangeSet@1.2505, 2007-06-26 14:18:53+02:00, msvensson@pilot.(none) +1 -0
  Bug #29133 mysqld does not exit during shutdown
   - Fix faulty merge by adding back the 'pthread_kill' call that
   wakes up the select thread
[29 Jun 2007 10:36] 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/29937

ChangeSet@1.2577, 2007-06-29 12:36:26+02:00, hakank@lu0011.wdf.sap.corp +1 -0
  Added Magnus Svensson's fix for Bug#29133.
[10 Jul 2007 13:27] Bugs System
Pushed into 5.1.21-beta
[10 Jul 2007 22:48] Paul DuBois
Noted in 5.1.21 changelog.

mysqld failed to exit during shutdown.