Bug 439168
Summary: | xargs aborts at __assert_fail | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mamoru TASAKA <mtasaka> |
Component: | findutils | Assignee: | Vitezslav Crhonek <vcrhonek> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rawhide | CC: | adam, bruno, esm, jakub, john.ellson, mail, oliva, richard, sangu.fedora, silfreed, stickster, valdis.kletnieks, vcrhonek |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-03-28 13:43:28 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mamoru TASAKA
2008-03-27 13:18:04 UTC
Which glibc-2.7.90-9 this issue does not happen. What does getconf ARG_MAX print? ulimit -s ? For 2.6.23+ kernels glibc returns `ulimit -s` / 4, as that's those kernels use as argument size limit. [root@localhost i386]# getconf ARG_MAX 131072 [root@localhost i386]# ulimit -s 10240 Note that current glibc is 2.7.90-9. urrent glibc is 2.7.90-12, not -9. Anyway, the bug is in xargs, the assert is bogus. With the 2.6.23+ kernels sysconf (_SC_ARG_MAX) can return large value than ARG_MAX macro. While bc_get_arg_max handles that correctly, xargs.c instead of asserting say assert(bc_ctl.arg_max <= bc_ctl.posix_arg_size_max); or (more expensive): assert(bc_ctl.arg_max <= bc_get_arg_max() - 2048); asserts: assert(bc_ctl.arg_max <= (ARG_MAX-2048)); which of course fails if sysconf (_SC_ARG_MAX) > ARG_MAX. *** Bug 439184 has been marked as a duplicate of this bug. *** Next rawhide glibc will #undef ARG_MAX, which is more POSIXly correct and for findutils just a rebuild will be needed (though the assert is still a bad idea, otherwise whenever some OS changes from a fixed arg size limit to a dynamic one xargs will need rebuild), though it can break other programs which use ARG_MAX incorrectly (google codesearch e.g. showed arla, some ksh variants, etc.). Programs should use sysconf (_SC_ARG_MAX) if ARG_MAX is not defined, and _SC_ARG_MAX is defined. Jakub, is that release note-worthy? No, fortunately ARG_MAX isn't used in too many programs. I'll post about it to fedora-devel-list though. This problem also breaks graphviz builds on x86_64 *** Bug 439610 has been marked as a duplicate of this bug. *** |