Bug #21783 Instance Manager does not exit on fatal error
Submitted: 22 Aug 2006 13:35 Modified: 6 Apr 2007 14:12
Reporter: Alexander Nozdrin Email Updates:
Status: Closed Impact on me:
None 
Category:Instance Manager Severity:S3 (Non-critical)
Version:5.0.25 OS:Linux (Linux)
Assigned to: Alexander Nozdrin CPU Architecture:Any

[22 Aug 2006 13:35] Alexander Nozdrin
Description:
It is expected that if a program can not initialize correctly,
it exits with error code. If Instance Manager can not initialize
correctly, sometimes it continues to run, but fails to operate properly.

For example, if IM fails to bind server socket, it does not exit,
but fails to work correctly. This is quite important for test suite,
because can lead to hidden failures.

How to repeat:
1. Bind TCP socket on port 3307 (for example, start IM);
2. Start IM. Here is log:
(alik)[instance-manager]> ./mysqlmanager --defaults-file=~/.my.cnf
060822 17:16:42 loaded user alik
060822 17:16:42 loaded user alik2
060822 17:16:42 loaded user abc
060822 17:16:42 IM pid file: '/home/alik/MySQL/var/5.0-rt-im/manager.pid'; PID: 31239.
060822 17:16:42 Listener_thread::run(): bind(ip socket) failed, 'Address already in use'

Suggested fix:
Instance Manager should exit with error status if it can not initialize.
[23 Aug 2006 19:33] Sveta Smirnova
Verified as described on Linux using last 5.0.25 BK sources
[9 Nov 2006 16:22] 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/15096

ChangeSet@1.2344, 2006-11-09 20:38:03+03:00, petr@outpost.site +3 -0
  Bug #21783  	Instance Manager does not exit on fatal error
  Return error code on fatal error (all the rest was already in place)
[6 Apr 2007 14:12] Alexander Nozdrin
The bug was fixed in the patch for BUG#15934
(im_daemon_life_cycle fails sporadically).