Bug 1889862 - FTBFS: Unit tests failed with latest glibc
Summary: FTBFS: Unit tests failed with latest glibc
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: fakeroot
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F34FTBFS
TreeView+ depends on / blocked
 
Reported: 2020-10-20 18:03 UTC by Lukas Slebodnik
Modified: 2020-11-25 10:53 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)

Description Lukas Slebodnik 2020-10-20 18:03:55 UTC
Description of problem:
I was debugging some failures(segfault) in tests with fakeroot related to stat64
It looks like issue are introduced in glibc-2.32.9000-11.fc34 https://koji.fedoraproject.org/koji/buildinfo?buildID=1627018

Its changelog mentioned stat/mknod related changes:

- linux: Use INTERNAL_SYSCALL on fstatat{64}
- statfs: add missing f_flags assignment
- y2038: Remove not used __fstatat_time64 define
- Add missing stat/mknod symbol on libc.abilist some ABIs
- linux: Move xmknod{at} to compat symbols
- linux: Add {f}stat{at} y2038 support
- linux: Move {f}xstat{at} to compat symbols
- linux: Disentangle fstatat from fxstatat
- linux: Implement {l}fstat{at} in terms of fstatat
- linux: Move the struct stat{64} to struct_stat.h
- Remove mknod wrapper functions, move them to symbols
- Remove stat wrapper functions, move them to exported symbols

I tried to rebuild fakeroot with latest glibc but unit tests failed

Version-Release number of selected component (if applicable):
sh$ rpm -q glibc fakeroot
glibc-2.32.9000-11.fc34
fakeroot-1.25.3-1.fc34

How reproducible:
Deterministic

Steps to Reproduce:
1. dnf install -y fedpkg
2. fedpkg clone --anonymous fakeroot
3. cd fakeroot
4. fedpkg build --scratch

Actual results:
Failed scratch build
https://koji.fedoraproject.org/koji/taskinfo?taskID=53849715

Expected results:
It should pass in the same way as in f33
https://koji.fedoraproject.org/koji/taskinfo?taskID=53851079

Additional info:

make  check-TESTS
make[2]: Entering directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[3]: Entering directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
FAIL: t.chmod_dev
PASS: t.cp-a
PASS: t.echoarg
PASS: t.falsereturn
FAIL: t.mknod
PASS: t.no_ld_preload
PASS: t.no_ld_preload_link
PASS: t.option
FAIL: t.tar
PASS: t.touchinstall
PASS: t.truereturn
PASS: t.xattr
==========================================
   fakeroot 1.25.3: test/test-suite.log
==========================================
# TOTAL: 12
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: t.chmod_dev
=================
mknod: t.chmod_dev.dir/hda3: Operation not permitted
FAIL t.chmod_dev (exit status: 1)
FAIL: t.mknod
=============
mknod: t.mknod.dir/hda3: Operation not permitted
ls: cannot access 't.mknod.dir/hda3': No such file or directory
FAIL t.mknod (exit status: 1)
FAIL: t.tar
===========
tartest:
compare-tar:
tar files differ:
1,66c1,66
< --------- root/root 0 tar/hello/
< --------- root/root 0 tar/hello/1/
< --------- root/root 0 tar/hello/1289/
< --------- root/root 0 tar/hello/2/
< --------- root/root 0 tar/hello/3/
< --------- root/root 0 tar/hello/4/
< --------- root/root 0 tar/hello/5/
< --------- root/root 0 tar/hello/6/
< --------- root/root 0 tar/hello/fjsdk/
< --------- root/root 0 tar/hello/vn.34.654l./
< rw-r--r-- daemon/root 0 tar/3/3/file
< rw-r--r-- daemon/root 0 tar/4/4/file
< rw-r--r-- root/root 0 tar/1.file
< rw-r--r-- root/root 0 tar/1/1/file
< rw-r--r-- root/root 0 tar/1289.file
< rw-r--r-- root/root 0 tar/1289/1289/file
< rw-r--r-- root/root 0 tar/2.file
< rw-r--r-- root/root 0 tar/3.file
< rw-r--r-- root/root 0 tar/4.file
< rw-r--r-- root/root 0 tar/5.file
< rw-r--r-- root/root 0 tar/5/5/file
< rw-r--r-- root/root 0 tar/6.file
< rw-r--r-- root/root 0 tar/6/6/file
< rw-r--r-- root/root 0 tar/fjsdk.file
< rw-r--r-- root/root 0 tar/fjsdk/fjsdk/file
< rw-r--r-- root/root 0 tar/hello/1/file
< rw-r--r-- root/root 0 tar/hello/1289/file
< rw-r--r-- root/root 0 tar/hello/2/file
< rw-r--r-- root/root 0 tar/hello/3/file
< rw-r--r-- root/root 0 tar/hello/4/file
< rw-r--r-- root/root 0 tar/hello/5/file
< rw-r--r-- root/root 0 tar/hello/6/file
< rw-r--r-- root/root 0 tar/hello/fjsdk/file
< rw-r--r-- root/root 0 tar/hello/vn.34.654l./file
< rw-r--r-- root/root 0 tar/vn.34.654l..file
< rw-r--r-- root/root 0 tar/vn.34.654l./vn.34.654l./file
< rw-r--r-- root/root 14 tar/hello/hello
< rwsr--r-- daemon/sys 0 tar/2/2/file
< rwsr-xr-x daemon/sys 0 tar/2/
< rwsr-xr-x daemon/sys 0 tar/2/2/
< rwsr-xr-x daemon/sys 0 tar/2/2/2.hello/
< rwsr-xr-x root/root 0 tar/5/
< rwxr-xr-x daemon/root 0 tar/3/
< rwxr-xr-x daemon/root 0 tar/3/3/
< rwxr-xr-x daemon/root 0 tar/3/3/3.hello/
< rwxr-xr-x daemon/root 0 tar/4/
< rwxr-xr-x daemon/root 0 tar/4/4/
< rwxr-xr-x daemon/root 0 tar/4/4/4.hello/
< rwxr-xr-x root/root 0 tar/
< rwxr-xr-x root/root 0 tar/1/
< rwxr-xr-x root/root 0 tar/1/1/
< rwxr-xr-x root/root 0 tar/1/1/1.hello/
< rwxr-xr-x root/root 0 tar/1289/
< rwxr-xr-x root/root 0 tar/1289/1289/
< rwxr-xr-x root/root 0 tar/1289/1289/1289.hello/
< rwxr-xr-x root/root 0 tar/5/5/
< rwxr-xr-x root/root 0 tar/5/5/5.hello/
< rwxr-xr-x root/root 0 tar/6/
< rwxr-xr-x root/root 0 tar/6/6/
< rwxr-xr-x root/root 0 tar/6/6/6.hello/
< rwxr-xr-x root/root 0 tar/fjsdk/
< rwxr-xr-x root/root 0 tar/fjsdk/fjsdk/
< rwxr-xr-x root/root 0 tar/fjsdk/fjsdk/fjsdk.hello/
< rwxr-xr-x root/root 0 tar/vn.34.654l./
< rwxr-xr-x root/root 0 tar/vn.34.654l./vn.34.654l./
< rwxr-xr-x root/root 0 tar/vn.34.654l./vn.34.654l./vn.34.654l..hello/
---
> rw-r--r-- mockbuild/mock 0 tar/1.file
> rw-r--r-- mockbuild/mock 0 tar/1/1/file
> rw-r--r-- mockbuild/mock 0 tar/1289.file
> rw-r--r-- mockbuild/mock 0 tar/1289/1289/file
> rw-r--r-- mockbuild/mock 0 tar/2.file
> rw-r--r-- mockbuild/mock 0 tar/3.file
> rw-r--r-- mockbuild/mock 0 tar/3/3/file
> rw-r--r-- mockbuild/mock 0 tar/4.file
> rw-r--r-- mockbuild/mock 0 tar/4/4/file
> rw-r--r-- mockbuild/mock 0 tar/5.file
> rw-r--r-- mockbuild/mock 0 tar/5/5/file
> rw-r--r-- mockbuild/mock 0 tar/6.file
> rw-r--r-- mockbuild/mock 0 tar/6/6/file
> rw-r--r-- mockbuild/mock 0 tar/fjsdk.file
> rw-r--r-- mockbuild/mock 0 tar/fjsdk/fjsdk/file
> rw-r--r-- mockbuild/mock 0 tar/hello/1/file
> rw-r--r-- mockbuild/mock 0 tar/hello/1289/file
> rw-r--r-- mockbuild/mock 0 tar/hello/2/file
> rw-r--r-- mockbuild/mock 0 tar/hello/3/file
> rw-r--r-- mockbuild/mock 0 tar/hello/4/file
> rw-r--r-- mockbuild/mock 0 tar/hello/5/file
> rw-r--r-- mockbuild/mock 0 tar/hello/6/file
> rw-r--r-- mockbuild/mock 0 tar/hello/fjsdk/file
> rw-r--r-- mockbuild/mock 0 tar/hello/vn.34.654l./file
> rw-r--r-- mockbuild/mock 0 tar/vn.34.654l..file
> rw-r--r-- mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./file
> rw-r--r-- mockbuild/mock 14 tar/hello/hello
> rwsr--r-- mockbuild/mock 0 tar/2/2/file
> rwsr-xr-x mockbuild/mock 0 tar/2/
> rwsr-xr-x mockbuild/mock 0 tar/2/2/
> rwsr-xr-x mockbuild/mock 0 tar/2/2/2.hello/
> rwsr-xr-x mockbuild/mock 0 tar/5/
> rwx------ mockbuild/mock 0 tar/hello/
> rwx------ mockbuild/mock 0 tar/hello/1/
> rwx------ mockbuild/mock 0 tar/hello/1289/
> rwx------ mockbuild/mock 0 tar/hello/2/
> rwx------ mockbuild/mock 0 tar/hello/3/
> rwx------ mockbuild/mock 0 tar/hello/4/
> rwx------ mockbuild/mock 0 tar/hello/5/
> rwx------ mockbuild/mock 0 tar/hello/6/
> rwx------ mockbuild/mock 0 tar/hello/fjsdk/
> rwx------ mockbuild/mock 0 tar/hello/vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/
> rwxr-xr-x mockbuild/mock 0 tar/1/
> rwxr-xr-x mockbuild/mock 0 tar/1/1/
> rwxr-xr-x mockbuild/mock 0 tar/1/1/1.hello/
> rwxr-xr-x mockbuild/mock 0 tar/1289/
> rwxr-xr-x mockbuild/mock 0 tar/1289/1289/
> rwxr-xr-x mockbuild/mock 0 tar/1289/1289/1289.hello/
> rwxr-xr-x mockbuild/mock 0 tar/3/
> rwxr-xr-x mockbuild/mock 0 tar/3/3/
> rwxr-xr-x mockbuild/mock 0 tar/3/3/3.hello/
> rwxr-xr-x mockbuild/mock 0 tar/4/
> rwxr-xr-x mockbuild/mock 0 tar/4/4/
> rwxr-xr-x mockbuild/mock 0 tar/4/4/4.hello/
> rwxr-xr-x mockbuild/mock 0 tar/5/5/
> rwxr-xr-x mockbuild/mock 0 tar/5/5/5.hello/
> rwxr-xr-x mockbuild/mock 0 tar/6/
> rwxr-xr-x mockbuild/mock 0 tar/6/6/
> rwxr-xr-x mockbuild/mock 0 tar/6/6/6.hello/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/fjsdk/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/fjsdk/fjsdk.hello/
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./vn.34.654l..hello/
FAIL t.tar (exit status: 1)
============================================================================
Testsuite summary for fakeroot 1.25.3
============================================================================
# TOTAL: 12
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to clint@debian.org
============================================================================
make[3]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[2]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[1]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv'
make[3]: *** [Makefile:548: test-suite.log] Error 1
make[2]: *** [Makefile:656: check-TESTS] Error 2
make[1]: *** [Makefile:807: check-am] Error 2
make: *** [Makefile:687: check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.hhkhLU (%check)
    Bad exit status from /var/tmp/rpm-tmp.hhkhLU (%check)

Comment 1 Lukas Slebodnik 2020-10-20 18:07:45 UTC
configure on f33 says:
checking for statx... yes
checking for __xstat... yes
checking for __fxstat... yes
checking for __lxstat... yes
checking for __fxstatat... yes
checking for __xstat64... yes
checking for __fxstat64... yes
checking for __lxstat64... yes
checking for __fxstatat64... yes
checking for __xmknod... yes
checking for __xmknodat... yes

configure on rawhide says:
checking for statx... yes
checking for __xstat... no
checking for _xstat... no
checking for __stat13... no
checking for stat... yes
checking for __fxstat... no
checking for _fxstat... no
checking for __fstat13... no
checking for fstat... yes
checking for __lxstat... no
checking for _lxstat... no
checking for __lstat13... no
checking for lstat... yes
checking for __fxstatat... no
checking for _fxstatat... no
checking for __fstatat13... no
checking for fstatat... (cached) yes
checking for __xstat64... no
checking for _xstat64... no
checking for __stat6413... no
checking for stat64... yes
checking for __fxstat64... no
checking for _fxstat64... no
checking for __fstat6413... no
checking for fstat64... yes
checking for __lxstat64... no
checking for _lxstat64... no
checking for __lstat6413... no
checking for lstat64... yes
checking for __fxstatat64... no
checking for _fxstatat64... no
checking for __fstatat6413... no
checking for fstatat64... yes
checking for __xmknod... no
checking for _xmknod... no
checking for __mknod13... no
checking for mknod... yes
checking for __xmknodat... no
checking for _xmknodat... no
checking for __mknodat13... no
checking for mknodat... (cached) yes

Comment 2 Dominik 'Rathann' Mierzejewski 2020-10-21 10:33:08 UTC
FWIW, the last koschei build (https://koji.fedoraproject.org/koji/taskinfo?taskID=53672713) was done with glibc-2.32.9000-10.fc34 and the tests passed. That seems to confirm that revision 11 breaks fakeroot.

Can you provide config.log from the failing build?

Can you bisect the glibc commit that introduced this breakage? From the spec file, we can assume the following:

0f09154c64005e78b61484ae87b5ea2028051ea0 bad
72d36ffd7db55ae599f4c77feb0eae25a0f3714e good

I took a quick look at the commits between the two and there are multiple commits dealing with *stat*. I'm not familiar with the code enough to make a guess which one was the culprit.

Comment 3 Dominik 'Rathann' Mierzejewski 2020-10-21 12:19:11 UTC
According to https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UHTGT3TQ3I6RHOVC6MARZYNNTN47AO24/ , -12.fc34 build should fix it.

Comment 4 Lukas Slebodnik 2020-10-22 12:30:45 UTC
I tried scratch build with 2.32.9000-12.fc34 and it still fails
but ATM sooner (at compile time) https://koji.fedoraproject.org/koji/taskinfo?taskID=53961483

In file included from /builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../communicate.h:20,
                 from /builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:60:
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'chown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:99:40: error: '_STAT_VER' undeclared (first use in this function)
   99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
      |                                        ^~~~~~~~~
./fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64'
    9 | #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c)
      |                                           ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:811:5: note: in expansion of macro 'INT_NEXT_STAT'
  811 |   r=INT_NEXT_STAT(path, &st);
      |     ^~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:99:40: note: each undeclared identifier is reported only once for each function it appears in
   99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
      |                                        ^~~~~~~~~
./fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64'
    9 | #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c)
      |                                           ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:811:5: note: in expansion of macro 'INT_NEXT_STAT'
  811 |   r=INT_NEXT_STAT(path, &st);
      |     ^~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'lchown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function)
  100 | #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b)
      |                                          ^~~~~~~~~
./fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64'
   13 | #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c)
      |                                             ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:843:5: note: in expansion of macro 'INT_NEXT_LSTAT'
  843 |   r=INT_NEXT_LSTAT(path, &st);
      |     ^~~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'fchown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function)
  101 | #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b)
      |                                          ^~~~~~~~~
./fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64'
   11 | #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c)
      |                                             ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:864:5: note: in expansion of macro 'INT_NEXT_FSTAT'
  864 |   r=INT_NEXT_FSTAT(fd, &st);
      |     ^~~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'fchownat':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function)
  102 | #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d)
      |                                                  ^~~~~~~~~
./fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64'
   15 | #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e)
      |                                                     ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:890:5: note: in expansion of macro 'INT_NEXT_FSTATAT'
  890 |   r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT)));
      |     ^~~~~~~~~~~~~~~~

Comment 5 Jan Pazdziora 2020-11-24 11:32:22 UTC
FYI, I now see the _STAT_VER undeclared in fakechroot as well, bug 1901049.


Note You need to log in before you can comment on or make changes to this bug.