[debian-mysql] Bug#651002: good news; bad news

Nicholas Bamber nicholas at periapt.co.uk
Sat Mar 17 11:46:35 UTC 2012


The good news is that the patch in itself worked and allowed the build.
The bad news is that the tests failed.


Using suites: main,sys_vars,binlog,federated,rpl,innodb,perfschema
Collecting tests...
 - adding combinations for binlog
 - adding combinations for rpl
vardir: /home/periapt/mysql-5.5-5.5.20/builddir/mysql-test/var
Removing old var directory...
Creating var directory
'/home/periapt/mysql-5.5-5.5.20/builddir/mysql-test/var'...
mysql-test-run: *** ERROR: Socket path '/tmp/wXM23NFbaV' too long, it
would be  truncated and thus not possible to use for connection to
MySQL Server. Set a shorter with --tmpdir=<path> option
make[4]: *** [mysql-test/CMakeFiles/test-force] Error 1
make[4]: Leaving directory `/home/periapt/mysql-5.5-5.5.20/builddir'
make[3]: *** [mysql-test/CMakeFiles/test-force.dir/all] Error 2
make[3]: Leaving directory `/home/periapt/mysql-5.5-5.5.20/builddir'
make[2]: *** [mysql-test/CMakeFiles/test-force.dir/rule] Error 2
make[2]: Leaving directory `/home/periapt/mysql-5.5-5.5.20/builddir'
make[1]: *** [test-force] Error 2
make[1]: Leaving directory `/home/periapt/mysql-5.5-5.5.20/builddir'
touch testsuite-stamp


The finction that has come to this conclusion is
My::Platform::check_socket_path_length:

sub check_socket_path_length {
  my ($path)= @_;

  return 0 if IS_WINDOWS;
  # This may not be true, but we can't test for it on AIX due to Perl bug
  # See Bug #45771
  return 0 if ($^O eq 'aix');

  require IO::Socket::UNIX;

  my $truncated= undef;

  # Create a tempfile name with same length as "path"
  my $tmpdir = tempdir( CLEANUP => 0);
  my $len = length($path) - length($tmpdir) - 1;
  my $testfile = $tmpdir . "/" . "x" x ($len  > 0 ? $len : 1);
  my $sock;
  eval {
    $sock= new IO::Socket::UNIX
      (
       Local => $testfile,
       Listen => 1,
      );
    $truncated= 1; # Be negatvie

    die "Could not create UNIX domain socket: $!"
      unless defined $sock;

    die "UNIX domain socket path was truncated"
      unless ($testfile eq $sock->hostpath());

    $truncated= 0; # Yes, it worked!

  };

  die "Unexpected failure when checking socket path length: $@"
    if $@ and not defined $truncated;

  $sock= undef;  # Close socket
  rmtree($tmpdir); # Remove the tempdir and any socket file created
  return $truncated;
}

The crucial error is from inside the eval:
Bad arg length for Socket::unpack_sockaddr_un, length is 3, should be
110 at /usr/lib/perl/5.14/Socket.pm line 278.

This can be reduced down to the attached a.pl if you run it on
exodar.debian.net.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.pl
Type: text/x-perl
Size: 221 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20120317/5eeb15a3/attachment.pl>


More information about the pkg-mysql-maint mailing list