Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findutils tests fails #80352

Closed
truls opened this issue Feb 17, 2020 · 9 comments
Closed

findutils tests fails #80352

truls opened this issue Feb 17, 2020 · 9 comments
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: non-nixos

Comments

@truls
Copy link

truls commented Feb 17, 2020

Describe the bug
Building the findutils package on old linuxes (I tried CentOS 6, kernel 2.6.32) fails due to two failing tests involving the getdtablesize function. I can only reproduce this problem when building the package using the nix toolchain on CentOS 6. Building directly on CentOS 6 and building with nix on Fedora 31 works.

The findutils package was previosly patched by nix to disable the failing tests (https://github.com/NixOS/nixpkgs/pull/67753/files), but these patches were removed when updating the package to its current version

To Reproduce
Steps to reproduce the behavior:

  1. Find a CentOS 6 (2.6.32) box
  2. Build the findutils nix package

Quck test to see if the problem is present:

  1. Configure the findutils source
  2. Go to the gnulib-tests directory
  3. Build the failing test:
    gcc -o test-getdtablesize -I .. test-getdtablesize.c
  4. ./test-getdtablesize

Expected behavior
The package should build without test failures.

Metadata

[trulsas@centos610 bin]$ nix-shell -p nix-info --run "nix-info -m"
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
these paths will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/2lv26r396jarxmjlfflxm28q2vdh22hb-nix-info
copying path '/nix/store/2lv26r396jarxmjlfflxm28q2vdh22hb-nix-info' from 'https://cache.nixos.org'...
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
 - system: `"x86_64-linux"`
 - host os: `Linux 2.6.32-754.27.1.el6.x86_64`
 - multi-user?: `no`
 - sandbox: `no`
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
 - version: `nix-env (Nix) 2.3.2`
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
 - channels(trulsas): `"nixpkgs-20.03pre212770.cc1ae9f21b9"`
GC Warning: pthread_getattr_np or pthread_attr_getstack failed for main thread
 - nixpkgs: `/home/trulsas/.nix-defexpr/channels/nixpkgs`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: findutils
# a list of nixos modules affected by the problem
module:
@veprbl
Copy link
Member

veprbl commented Feb 17, 2020

In principle we could re-revert the patch. The tests are not so useful in the first place. But just in case, I'm going to ask: have you considered overriding findutils with doCheck = false in an overlay? Or you need to use the binary cache?

@truls
Copy link
Author

truls commented Feb 17, 2020

Yes, that's what I'm doing currently. However, even though my setup may not be that common I still think that the package should build out of the box?

@veprbl
Copy link
Member

veprbl commented Feb 17, 2020

It seems like when doing #46669 I found whole bunch of reasons why those tests are not so great. A correct way to proceed, I think, would be to first ask upstream it they would be willing to remove these tests. @truls do you think you could try?

@truls
Copy link
Author

truls commented Feb 17, 2020

@veprbl https://savannah.gnu.org/bugs/index.php?57839

@veprbl veprbl added 2.status: wait-for-upstream Waiting for upstream fix (or their other action). and removed 2.status: wait-for-upstream Waiting for upstream fix (or their other action). labels Feb 17, 2020
@truls
Copy link
Author

truls commented Feb 19, 2020

Same problem occurs with gnutls which includes the same testsuite

@truls
Copy link
Author

truls commented Feb 19, 2020

findutils maintainer believes the failing test uncovers a real issue with the glibc 2.30/kernel 2.6.32 combination. Looking at the glibc README, it seems glibc 2.30 officially requires kernel >= 3.2, so maybe it doesn't make a lot of sense to add patches to work around an unsupported configuration.

@veprbl
Copy link
Member

veprbl commented Feb 24, 2020

@truls,
Thank you for getting this started. I think we could have made an argument that the test in question tests a very specific property of the getdtablesize() function rather than dup2() and then make a case for former to be non-essential for findutils. But there is that fact that the test comes as a part of the established gnulib testsuite and maintainers might be reluctant to tailor the tests for their specific application. So this doesn't appear to be the path of the least resistance.

I've submitted a PR with your proposed solution. It should fix the issue for findutils and elsewhere.

@stale

This comment has been minimized.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Aug 22, 2020
@veprbl veprbl closed this as completed Aug 22, 2020
@veprbl
Copy link
Member

veprbl commented Aug 22, 2020

This was fixed by #80961, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: non-nixos
Projects
None yet
Development

No branches or pull requests

2 participants