Bug #27344 Total failure to start the server
Submitted: 21 Mar 2007 16:55 Modified: 27 May 2007 9:39
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.38 OS:HP/UX (HP-UX (11.00 + 11.23) 64 bit)
Assigned to: Magnus Blåudd CPU Architecture:Any

[21 Mar 2007 16:55] Joerg Bruehe
Description:
Happened during release builds of 5.0.38.

=====
alias                          [ fail ]

ERROR: Failed to start master mysqld 0
=====

Continued for *all* tests in these runs.

Affected:
hp3750-64bit-5.0-enterprise-gpl.log   debug
hp3750-64bit-5.0-enterprise-gpl.log   normal
hp3750-64bit-5.0-enterprise.log   debug
hpita2-64bit-5.0-enterprise-gpl.log   debug

How to repeat:
I cannot yet tell whether this is repeatable.
We had it similar in 5.1.14, but that was not reported (lack of time).
[4 Apr 2007 17:02] Magnus Blåudd
Found it
[4 Apr 2007 17:04] Magnus Blåudd
Can't see that the server should have crashed from looking at the master.err file
[4 Apr 2007 17:06] Magnus Blåudd
Repeated
[4 Apr 2007 17:07] Magnus Blåudd
070404 20:06:44 [ERROR] The socket file path is too long (> 91): /data/mysqldev/
tmp-200703151749-5.0.38-3032/tmp-3032/my_build-hpita2-64bit-29744/master.sock
[4 Apr 2007 17:09] Magnus Blåudd
If running without --tmpdir, the "too long" condition will be auto detected and a shorter socket patch will be used, see below:
master.err>>
Version: '5.0.38-enterprise-gpl-debug-log'  socket: '/tmp/8Qo9tmB3QQ/master.sock
'  port: 10170  MySQL Enterprise Server - Debug (GPL)
[4 Apr 2007 17:11] Magnus Blåudd
Apparently the check in mysql-test-run.pl does not work?

  # On some operating systems, there is a limit to the length of a
  # UNIX domain socket's path far below PATH_MAX, so try to avoid long
  # socket path names.
  $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 );
[4 Apr 2007 17:16] 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/23822

ChangeSet@1.2437, 2007-04-04 19:16:09+02:00, msvensson@pilot.blaudden +1 -0
  Bug#27344 Total failure to start the server
   - length($sockdir) >= 80 !!
[4 Apr 2007 17:20] 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/23824

ChangeSet@1.2635, 2007-04-04 19:19:26+02:00, msvensson@pilot.blaudden +1 -0
  Bug#27344 Total failure to start the server
     - length($sockdir) >= 80 !!
[26 Apr 2007 11:32] Bugs System
Pushed into 4.1.23
[26 Apr 2007 11:34] Bugs System
Pushed into 5.0.42
[26 Apr 2007 11:35] Bugs System
Pushed into 5.1.18-beta
[27 Apr 2007 4:00] Paul DuBois
Test suite change. No changelog entry needed.
[9 May 2007 11:08] Joerg Bruehe
Sorry, I have to re-open this bug:

In the build of 5.1.18, it occurred again - but only for tests involving NDB.
Then, it does not affect "master 0" but rather "master 1":
   ERROR: Failed to start master mysqld 1

In that test run, those tests which did not use NDB were executed normally;
and the sources contain the patches for this bug.

So it seems the fix does not cover the use of NDB.
[10 May 2007 9:48] Magnus Blåudd
When the socket base path is longer than 80 chars we use a temporary directory name. This works fine for the first master where we append master.sock to the sockdir, but on the second master we user master1.sock and that is _one_ char longer and thus we exceed the max socket path limit on the system -> mysqld doesn't start.

We can just lower the limit when to create the tmpdir from 80 to 70 chars?
[10 May 2007 11:28] 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/26432

ChangeSet@1.2651, 2007-05-10 13:28:24+02:00, msvensson@pilot.blaudden +1 -0
  Bug#27344 Total failure to start the server
  - Give some more protection against "too long socket name by setting the max
  length when to use a tmpdir for sockets to 70
[15 May 2007 14:03] 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/26699

ChangeSet@1.2477, 2007-05-15 16:03:38+02:00, msvensson@pilot.blaudden +1 -0
  Bug#27344 Total failure to start the server
   - Give some more protection against "too long socket name by setting the max
     length when to use a tmpdir for sockets to 70
[22 May 2007 17:00] Bugs System
Pushed into 5.1.19-beta
[22 May 2007 17:02] Bugs System
Pushed into 5.0.44
[22 May 2007 17:03] Bugs System
Pushed into 4.1.23
[27 May 2007 9:39] Paul DuBois
Still no changelog entry needed.