Bug #66783 mysql fails to start on system bootup with ldap
Submitted: 12 Sep 2012 10:27 Modified: 24 Sep 2012 2:06
Reporter: wu lixue Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Websites: bugs.mysql.com Severity:S3 (Non-critical)
Version:5.1.45 OS:Linux (fails to start)
Assigned to: CPU Architecture:Any
Tags: fails to start, openldap

[12 Sep 2012 10:27] wu lixue
Description:
I build mysql server 5.1.45 in CentOS box on 40~50 machines. Then I enable ldap user authentication on these machines.
Now there are 10~20 CentOS machines have mysql start problem. Without ldap, I do not have this problem.

The problem is:
When I reboot CentOS system, the mysql server cannot start up automatically, but I can start mysql manually with 'root' login the OS.

I already enable nscd using 'chkconfig nscd on', and the nscd can start smoothly on system boot up.

The mysql log shows the following:

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mysqld got signal 11 ;
 This could be because you hit a bug. It is also possible that this binary  or one of the libraries it was linked against is corrupt, improperly built,  or misconfigured. This error can also be caused by malfunctioning hardware.
  We will try our best to scrape up some info that will hopefully help diagnose  the problem, but since we have already crashed, something is definitely wrong  and this may fail.
  
  key_buffer_size=0
  read_buffer_size=1048576
  max_used_connections=0
  max_threads=200
  threads_connected=0
  It is possible that mysqld could use up to  key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 616434 K  bytes of memory  Hope that's ok; if not, decrease some variables in the equation.
  
  thd: 0x0
  Attempting backtrace. You can use the following information to find out  where mysqld died. If you see no messages after this, something went  terribly wrong...
  stack_bottom = (nil) thread_stack 0x30000  [0x737004]  [0x4afe32]  [0x610920]
  /lib64/libnss_ldap.so.2(_nss_ldap_inc_depth+0xc) [0x2aaaaae3ca7c]  The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains  information that should help you find out what is causing the crash.
  
  This crash occured while the server was calling initgroups(). This is  often due to the use of a mysqld that is statically linked against glibc  and configured to use LDAP in /etc/nsswitch.conf. You will need to either  upgrade to a version of glibc that does not have this problem (2.3.4 or  later when used with nscd), disable LDAP in your nsswitch.conf, or use a  mysqld that is not statically linked.
 mysqld_safe mysqld from pid file /neworiental/data/mysql/data/xm-crmcc-230.248.pid ended
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
I already search the bug list of mysql and found similar problem. But it was said the problem solved in latest version. Now the problem comes up again. Do you have any idea?

Thanks!

How to repeat:
The problem does not repeat as expected. It occurs occasionally on the same machine. So it is very odd.

Maybe you can repeat it by chance.

My box is:

CentOS release 5.6 (Final) 
Kernel 2.6.18-238.el5 x86_64 GNU/Linux
[12 Sep 2012 12:07] MySQL Verification Team
Please check if version 5.1.65 for this issue. Thanks.
[13 Sep 2012 0:32] wu lixue
Hi Miguel ,

Is it a bug for 5.1.45 and the version 5.1.65 does not have this issue? Thanks!
[13 Sep 2012 1:50] MySQL Verification Team
Thank you for the feedback.
[24 Sep 2012 2:06] wu lixue
Dear all,

Please what causes the problem with mysql 5.1.45?
I am still waiting for the proper solution to 5.1.45. There are many mysql 5.1.45 servers with openldap enabled, so it is less possible for me to upgrade mysql.

Any suggestion will be appreciated. Thanks ahead!