Bug #19362 im_daemon_lifecycle fails when built from source distribution
Submitted: 26 Apr 2006 7:06 Modified: 10 May 2006 16:31
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:Instance Manager Severity:S2 (Serious)
Version:5.0.21 OS:Any (all)
Assigned to: Magnus Blåudd CPU Architecture:Any

[26 Apr 2006 7:06] Magnus Blåudd
Description:
When downloading a source distibution and building it with shared libraries, the following error occurs in mysql-test.run

im_daemon_life_cycle           [ fail ]

Errors are (from /home/msvensson/mysql/mysql-5.0.21-standard/mysql-test/var/log/mysqltest-time) :
mysqltest: Could not open connection 'default': 2002 Can't connect to local MySQL server through socket '/home/msvensson/mysql/mysql-5.0.21-standard/mysql-test/var/tmp/im.sock' (111)
(the last lines may be the most important ones)

Aborting: im_daemon_life_cycle failed in default mode. To continue, re-run with '--force'.
Ending Tests
Shutting-down Instance Manager
Shutting-down MySQL daemon

Master(s) shutdown finished
Slave(s) shutdown finished

Here is im.log:

How to repeat:
Build source dist and run mysql-test-run

060426  9:48:43 loaded user im_admin
060426  9:48:43 accepting connections on ip socket
060426  9:48:43 accepting connections on unix socket /home/msvensson/mysql/mysql-5.0.21-standard/mysql-test/var/tmp/im.sock
060426  9:48:44 Cannot init instances repository. This might be caused by the wrong config file options. For instance, missing mysqld binary. Aborting.
060426  9:48:44 guardian: starting instance mysqld1
060426  9:48:44 starting instance mysqld1
lt-mysqlmanager: thread_registry.cc:72: Thread_registry::~Thread_registry(): Assertion `head.next == &head' failed.
060426  9:48:44 angel(): mysqlmanager exited abnormally: respawning...
060426  9:48:45 loaded user im_admin

Suggested fix:
I believe it's just a problem when starting the mysqld, some lib or seomthing is missing.

Will add some additional log messages to see which binary is started and what the real error is.
[26 Apr 2006 7:19] Jim Winstead
it's probably the same problem as Bug #19059, and the patch just needs to be backported.
[26 Apr 2006 9:18] Magnus Blåudd
The problem is that the function  "Instance_options::fill_instance_version()" executes
"/home/msvensson/mysql/mysql-5.0.21-standard/sql/mysqld --no-defaults --version" and looks for everything after "/home/msvensson/mysql/mysql-5.0.21-standard/sql/mysqld" to get the version. But when we have a non-installed mysqld compiled with libtool it will give the below ouput:
"/home/msvensson/mysql/mysql-5.0.21-standard/sql/.libs/lt-mysqld  Ver 5.0.21-standard-max-debug for pc-linux-gnu on i686 (MySQL Pushbuild Edition)" and the function will does not get a match. An error will be returned.
[26 Apr 2006 10:45] 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/5559
[27 Apr 2006 14:14] Joerg Bruehe
Isn't that a duplicate of bug#15934, filed last December for 5.0.18 ?
[27 Apr 2006 19:56] Magnus Blåudd
Pushed a patch to 5.0.21 that make it possible to run  instance manager in a not installed distributions. Ie. when the mysqld binary is either a script or a symlink.
[10 May 2006 16:31] Paul DuBois
No changelog entry needed.