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: disable a bogus test #46669

Merged
merged 2 commits into from Sep 15, 2018
Merged

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Sep 14, 2018

findutils fails to pass checkPhase on my Linux system that has a sysconf(_SC_OPEN_MAX) limit set. The test itself appears to be a common copypasta between gnu projects. Poking limits of available fd's is irrelevant to what findutils is designed to do, so I consider the test to be bogus.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: findutils

Partial log (click to expand)

shrinking /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/bin/find
shrinking /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/bin/xargs
shrinking /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/bin/locate
gzipping man pages under /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/share/man/
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/libexec  /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0/bin
checking for references to /build in /nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0...
shrinking RPATHs of ELF executables and libraries in /nix/store/bjwdb2yx1vdlw178g440bhz449al9a2l-findutils-4.6.0-info
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
checking for references to /build in /nix/store/bjwdb2yx1vdlw178g440bhz449al9a2l-findutils-4.6.0-info...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: findutils

Partial log (click to expand)

shrinking /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0/bin/xargs
shrinking /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0/bin/find
gzipping man pages under /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0/share/man/
strip is /nix/store/8zbl35kgg8v7gircl3pvy9027vslll1q-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0/libexec  /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0/bin
checking for references to /build in /nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0...
shrinking RPATHs of ELF executables and libraries in /nix/store/sfvmbz4zfpi442xdph8iywckbwg3vp89-findutils-4.6.0-info
strip is /nix/store/8zbl35kgg8v7gircl3pvy9027vslll1q-bootstrap-tools/bin/strip
checking for references to /build in /nix/store/sfvmbz4zfpi442xdph8iywckbwg3vp89-findutils-4.6.0-info...
/nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: findutils

Partial log (click to expand)

cannot build derivation '/nix/store/nppq35402zrgdqiwh4sbzyir1lkgmwrl-binutils-wrapper-2.30.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/dz9qibb8fdin5vqhm85crv8jdhyvknx7-bash-4.4-p23.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/prwxx61njc9zmagvyzsvhij67ha39mj0-bootstrap-stage3-binutils-wrapper.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/qhk8z0am0mh3z0101k3mi64kpzk52nfy-bootstrap-stage3-clang-wrapper.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/a95409hpgycqv8qmxcmvs44ig7r9cnvs-bootstrap-stage3-stdenv-darwin.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/qf02k13w4p4g0l467dvhm6rqjvf5i03z-gmp-6.1.2.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/zc9dqlh6dlfndgxhz86zc9c4cdkfpivp-xz-5.2.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rcqzrdb2dn52ghqwwizm60wpg1hh3gxs-coreutils-8.29.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv': 3 dependencies couldn't be built
error: build of '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv' failed

@veprbl
Copy link
Member Author

veprbl commented Sep 14, 2018

After some more investigation I found that findutils ships their own gnulib which implements getdtablesize() using getrlimit(). Latter doesn't work very well with older kernels with our glibc (perhaps too new). These two conditions seem to produce the test fail. I still think that the test itself is unnecessary, because the getdtablesize() is not used anywhere in the code that is actually run by user.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: findutils

Partial log (click to expand)

/nix/store/pb8rmhpjskvxqgnnh0cgwxniwnlrxgxk-findutils-4.6.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: findutils

Partial log (click to expand)

/nix/store/7pvrvimvn8jd3zmcvs6cpsayfnbky422-findutils-4.6.0

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: findutils

Partial log (click to expand)

cannot build derivation '/nix/store/nppq35402zrgdqiwh4sbzyir1lkgmwrl-binutils-wrapper-2.30.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/dz9qibb8fdin5vqhm85crv8jdhyvknx7-bash-4.4-p23.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/prwxx61njc9zmagvyzsvhij67ha39mj0-bootstrap-stage3-binutils-wrapper.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/qhk8z0am0mh3z0101k3mi64kpzk52nfy-bootstrap-stage3-clang-wrapper.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/a95409hpgycqv8qmxcmvs44ig7r9cnvs-bootstrap-stage3-stdenv-darwin.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/qf02k13w4p4g0l467dvhm6rqjvf5i03z-gmp-6.1.2.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/zc9dqlh6dlfndgxhz86zc9c4cdkfpivp-xz-5.2.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rcqzrdb2dn52ghqwwizm60wpg1hh3gxs-coreutils-8.29.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv': 3 dependencies couldn't be built
error: build of '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv' failed

ASSERT (close (255) == 0);
ASSERT (close (256) == 0);
}
- ASSERT (dup2 (fd, bad_fd - 1) == bad_fd - 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the value of bad_fd also getdtablesize()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

./no-install-statedir.patch

# prevent tests from failing on old kernels
./disable-getdtablesize-test.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to report this also upstream.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure which of the cases should I bring up:

  • remove the test
  • for them to not use getdtablesize() from gnulib that fall backs on a too high arbitrary guess value when getrlimits fails in my case

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No sure, what would you recommend? @jamesyoungman

./memory-leak.patch
./no-install-statedir.patch

# prevent tests from failing on old kernels
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be also interesting to add here, what your kernel version was (also you don't know the exact one).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.6.32-696.18.7.el6.x86_64, and also 2.6.32-754.3.5.el6.x86_64

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ancient.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Mic92 These are branches supported by RedHat, they come with backported features as well. I believe the "-754" version came out last month.

@Mic92 Mic92 merged commit 017d86b into NixOS:staging Sep 15, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: findutils

Partial log (click to expand)

shrinking /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/bin/locate
shrinking /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/bin/find
shrinking /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/bin/xargs
gzipping man pages under /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/share/man/
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/libexec  /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0/bin
checking for references to /build in /nix/store/rwdpcb15h2hc2ar3a8jw21ipyzwahkl3-findutils-4.6.0...
shrinking RPATHs of ELF executables and libraries in /nix/store/v42vbj0czq954a86717xnnmk18rjisy7-findutils-4.6.0-info
strip is /nix/store/n9acaakxahkv1q3av11l93p7rgd4xqsf-bootstrap-tools/bin/strip
checking for references to /build in /nix/store/v42vbj0czq954a86717xnnmk18rjisy7-findutils-4.6.0-info...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: findutils

Partial log (click to expand)

shrinking /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0/bin/xargs
shrinking /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0/bin/find
gzipping man pages under /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0/share/man/
strip is /nix/store/8zbl35kgg8v7gircl3pvy9027vslll1q-bootstrap-tools/bin/strip
stripping (with command strip and flags -S) in /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0/libexec  /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0/bin
checking for references to /build in /nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0...
shrinking RPATHs of ELF executables and libraries in /nix/store/qwzn8gyzscp9cjffrk5zlnhal50ygx2z-findutils-4.6.0-info
strip is /nix/store/8zbl35kgg8v7gircl3pvy9027vslll1q-bootstrap-tools/bin/strip
checking for references to /build in /nix/store/qwzn8gyzscp9cjffrk5zlnhal50ygx2z-findutils-4.6.0-info...
/nix/store/lkknkfq4nc6xgkqkmlfvsclcv9fmw7sm-findutils-4.6.0

@GrahamcOfBorg
Copy link

Timed out, unknown build status on x86_64-darwin (full log)

Attempted: findutils

Partial log (click to expand)

cannot build derivation '/nix/store/nppq35402zrgdqiwh4sbzyir1lkgmwrl-binutils-wrapper-2.30.drv': 5 dependencies couldn't be built
cannot build derivation '/nix/store/dz9qibb8fdin5vqhm85crv8jdhyvknx7-bash-4.4-p23.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/prwxx61njc9zmagvyzsvhij67ha39mj0-bootstrap-stage3-binutils-wrapper.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/qhk8z0am0mh3z0101k3mi64kpzk52nfy-bootstrap-stage3-clang-wrapper.drv': 6 dependencies couldn't be built
cannot build derivation '/nix/store/a95409hpgycqv8qmxcmvs44ig7r9cnvs-bootstrap-stage3-stdenv-darwin.drv': 9 dependencies couldn't be built
cannot build derivation '/nix/store/qf02k13w4p4g0l467dvhm6rqjvf5i03z-gmp-6.1.2.drv': 3 dependencies couldn't be built
cannot build derivation '/nix/store/zc9dqlh6dlfndgxhz86zc9c4cdkfpivp-xz-5.2.4.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/rcqzrdb2dn52ghqwwizm60wpg1hh3gxs-coreutils-8.29.drv': 4 dependencies couldn't be built
cannot build derivation '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv': 3 dependencies couldn't be built
error: build of '/nix/store/al7q6g46y9gn197dl2bpm4ppp9k7s08w-findutils-4.6.0.drv' failed

@veprbl veprbl mentioned this pull request Feb 17, 2020
@veprbl veprbl deleted the findutils_fix_staging branch December 1, 2020 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants