coreutils 8.5-1ubuntu1 FTBFS on armel, powerpc, sparc (test-linkat assert fail)

Bug #591968 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Fix Released
Critical
John Rigby
Maverick
Fix Released
Critical
John Rigby

Bug Description

Binary package hint: coreutils

The latest coreutils upload is consistently failing to build on armel, powerpc, and sparc ports with an assertion failure in the gnulib test suite. Example:
  http://launchpadlibrarian.net/49967083/buildlog_ubuntu-maverick-armel.coreutils_8.5-1ubuntu1_FAILEDTOBUILD.txt.gz

The failing test is:
[...]
/bin/bash: line 1: 2407 Aborted EXEEXT='' srcdir='.' USE_ACL=1 LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_TR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' LOCALE_TR_UTF8='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' LOCALE_FR_UTF8='none' LOCALE_ZH_CN='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' PATH='/build/buildd/coreutils-8.5/build-aux':"$PATH" PATH='/build/buildd/coreutils-8.5/build-aux':"$PATH" LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' "$tst" > test-linkat.log-t 2>&1
FAIL: test-linkat
[...]

This appears to be a regression in coreutils itself, not in the toolchain or libraries; the 'linkat' test is newly added in the newer upstream version, it was not present at all in the source to coreutils 7.4.

Interestingly, the coreutils 8.5-1 build succeeded on all these architectures in Debian.

Testing on both armel and amd64, I see that REPLACE_LINKAT is being defined to 1 in the build (but the gnulib linkat replacement is not being linked into the testsuite), and LINK_FOLLOWS_SYMLINKS is being defined to 0.

Running the test by itself gives this output:

$ EXEEXT='' srcdir='.' USE_ACL=1 LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_TR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' LOCALE_TR_UTF8='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' LOCALE_FR_UTF8='none' LOCALE_ZH_CN='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_FR='none' LOCALE_FR_UTF8='none' PATH='/home/devel/canonical/maverick/coreutils-8.5/build-aux':"$PATH" PATH='/home/devel/canonical/maverick/coreutils-8.5/build-aux':"$PATH" LOCALE_FR='none' LOCALE_FR_UTF8='none' LOCALE_JA='none' LOCALE_ZH_CN='none' ./test-linkat
test-linkat.c:76: assertion failed
Aborted
$

Differential strace - amd64:

linkat(3, "test-linkat.tlink1", 3, "test-linkat.tlink5", 0) = 0
lstat("test-linkat.tlink1", {st_dev=makedev(254, 0), st_ino=115037, st_mode=S_IFLNK|0777, st_nlink=2, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=17, st_atime=2010/06/09-23:09:34, st_mtime=2010/06/09-23:09:34, st_ctime=2010/06/09-23:09:34}) = 0
lstat("test-linkat.tlink5", {st_dev=makedev(254, 0), st_ino=115037, st_mode=S_IFLNK|0777, st_nlink=2, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=17, st_atime=2010/06/09-23:09:34, st_mtime=2010/06/09-23:09:34, st_ctime=2010/06/09-23:09:34}) = 0
readlink("test-linkat.tlink1", "test-linkat.tsub1"..., 18) = 17
readlink("test-linkat.tlink5", "test-linkat.tsub1"..., 18) = 17
unlink("test-linkat.tlink5") = 0

and armel:

linkat(3, "test-linkat.tlink1", 3, "test-linkat.tlink5", 0) = 0
lstat64("test-linkat.tlink1", {st_dev=makedev(179, 2), st_ino=60332, st_mode=S_IFLNK|0777, st_nlink=2, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=17, st_atime=2010/06/09-23:09:26, st_mtime=2010/06/09-23:09:26, st_ctime=2010/06/09-23:09:26}) = 0
lstat64("test-linkat.tlink5", {st_dev=makedev(179, 2), st_ino=60332, st_mode=S_IFLNK|0777, st_nlink=2, st_uid=1000, st_gid=1000, st_blksize=4096, st_blocks=0, st_size=17, st_atime=2010/06/09-23:09:26, st_mtime=2010/06/09-23:09:26, st_ctime=2010/06/09-23:09:26}) = 0
readlink("test-linkat.tlink1", "test-linkat.tsub1"..., 1025) = 17
readlink("test-linkat.tlink5", "test-linkat.tsub1", 1025) = 17
fstat64(1, {st_dev=makedev(0, 12), st_ino=4, st_mode=S_IFCHR|0620, st_nlink=1, st_uid=1000, st_gid=5, st_blksize=1024, st_blocks=0, st_rdev=makedev(136, 1), st_atime=2010/06/09-23:09:25, st_mtime=2010/06/09-23:09:26, st_ctime=2010/06/08-23:49:49}) = 0

Related branches

Revision history for this message
Steve Langasek (vorlon) wrote :

Failure is reproducible on a beagleboard running the 2.6.33-500-omap kernel with maverick userspace; reproducible on both ext3 and tmpfs; /proc is correctly mounted.

Changed in coreutils (Ubuntu Maverick):
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → John Rigby (jcrigby)
Revision history for this message
John Rigby (jcrigby) wrote :

On careful inspection of the armel strace output we can
see that the result buffer of the first readlink result has
extra non null garbage after the 17 bytes copied in by
readlink:

readlink("test-linkat.tlink1", "test-linkat.tsub1"..., 1025) = 17
readlink("test-linkat.tlink5", "test-linkat.tsub1", 1025) = 17

so the strcmp in check_same_link in test-linkat.c fails

this is to be expected because the readlink man page says:
readlink() places the contents of the symbolic link path in the
buffer buf, which has size bufsiz. readlink() does not append a
null byte to buf.

So the test needs to add the null termination or the areadlink_with_size
library routine in lib/areadlink-with-size.c needs to.

Revision history for this message
John Rigby (jcrigby) wrote :

Steve pointed out that areadlink_with_size does append the null byte so this theory was bogus.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package coreutils - 8.5-1ubuntu2

---------------
coreutils (8.5-1ubuntu2) maverick; urgency=low

  [ John Rigby ]
  * debian/patches/99_stat_prototype_for_linkat.dpatch: Add missing header
    include for stat() prototype. LP: #591968.
 -- Steve Langasek <email address hidden> Fri, 11 Jun 2010 06:03:58 +0000

Changed in coreutils (Ubuntu Maverick):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.