Bug 275321 - xargs generates too long argument lists
Summary: xargs generates too long argument lists
Alias: None
Product: Fedora
Classification: Fedora
Component: findutils   
(Show other bugs)
Version: rawhide
Hardware: i386
OS: All
Target Milestone: ---
Assignee: Vitezslav Crhonek
QA Contact: Fedora Extras Quality Assurance
: 366481 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2007-09-03 16:15 UTC by Horst H. von Brand
Modified: 2008-04-23 09:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-04-23 09:51:24 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Horst H. von Brand 2007-09-03 16:15:33 UTC
Description of problem:
E.g. when building git- from the shipped SRPM, I get:

   + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
   xargs: /usr/lib/rpm/check-rpaths-worker: Argument list too long
   error: Bad exit status from /var/tmp/rpm-tmp.31449 (%install)

I get similar errors when I try to clean up my MH folders (delete all junk
starting with ',', I've got some 11000 of those right now), in my $HOME:

   $ find Mail -name ',*' | xargs rm -f
   xargs: rm: Argument list too long

Same annoyance when cleaning a kernel source for building, etc.

Version-Release number of selected component (if applicable):

How reproducible:
Very often (makes it almost useless)

Steps to Reproduce:
Sorry, I seem not to be able to create a synthetic testcase where it fails. In
any case, a "make clean" in a built kernel tree is a reliable way to trigger it
Actual results:

Expected results:

Additional info:

Comment 1 Vitezslav Crhonek 2007-11-07 08:18:38 UTC
*** Bug 366481 has been marked as a duplicate of this bug. ***

Comment 2 Horst H. von Brand 2008-01-02 19:11:41 UTC
Still the same... on x86_64 this doesn't show. BTW, this is a dual-core i686.

Strange thing is that this shows up all over the place, e.g. today when trying
to build a new nmh RPM I got:

  + /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
  xargs: /usr/lib/rpm/check-rpaths-worker: Argument list too long
  error: Bad exit status from /var/tmp/rpm-tmp.39544 (%install)

Comment 3 Horst H. von Brand 2008-01-14 12:07:44 UTC
I just can't understand how you people can build new packages when /every/
package build fails here...

Comment 4 Eric Paris 2008-01-14 19:00:39 UTC
maybe it is, maybe it isn't, the solution to this bug, but if you are not trying
to collect execve argument auditing with the audit system (auditctl -l shows
nothing) feel free to up /proc/sys/kernel/audit_argv_kb.  If this solves the
problem a real solution will be in 2.6.25 kernel.

that has nothing to do with the huge lists that you are seeing, maybe them being
so big is a bug, maybe not, but at least this might help you get work done.

Comment 5 Horst H. von Brand 2008-01-14 20:37:54 UTC
I haven't touched auditctl(8) at all, first time I hear about this...

  # auditctl -l
  LIST_RULES: exit,always syscall=chroot
  LIST_RULES: exit,always obj_type=dhclient_t (0xa) syscall=chdir
  LIST_RULES: exit,always obj_type=sendmail_t (0xa) syscall=chdir
  LIST_RULES: exit,always obj_type=mcstransd_t (0xb) syscall=chdir
  LIST_RULES: exit,always obj_type=sshd_t (0x6) syscall=chdir
  LIST_RULES: exit,always obj_type=ntpd_t (0x6) syscall=chdir
  LIST_RULES: exit,always obj_type=samba_t (0x7) syscall=chdir
  LIST_RULES: exit,always obj_type=named_t (0x7) syscall=chdir
  LIST_RULES: exit,always obj_type=klogd_t (0x7) syscall=chdir
  LIST_RULES: exit,always obj_type=crond_t (0x7) syscall=chdir
  LIST_RULES: exit,always obj_type=httpd_t (0x7) syscall=chdir
  LIST_RULES: exit,always obj_type=auditd_t (0x8) syscall=chdir
  LIST_RULES: exit,always obj_type=portmap_t (0x9) syscall=chdir
  LIST_RULES: exit,always obj_type=syslogd_t (0x9) syscall=chdir

sysstat(rpm) is up, in any case.

/proc/sys/kernel/audit_argv_kb is 32 (Is this that ARGV <= 32KiB?!). If so,
there is something very wrong... isn't it supposed that xargs(1) (and its ilk)
gets the maximal size of ARGV form the kernel?

What would a reasonable value be here?

Comment 6 Horst H. von Brand 2008-01-14 20:40:19 UTC
After "echo 128 > /proc/sys/kernel/audit_argv_kb" a "make clean" in the kernel
goes through.

Comment 7 Penelope Fudd 2008-02-03 23:49:15 UTC
Hey, yeah, that solves my problems too.  I had a directory containing ~5000
files, and had to move all those ending with 'png' to a new directory:
  mv *.png newdir   : /bin/mv: Argument list too long.
echo 128 > /proc/sys/kernel/audit_argv_kb
  mv *.png newdir   : success!

Who messed up the audit_argv_kb parameter?  :-)

Comment 8 Vitezslav Crhonek 2008-04-23 09:51:24 UTC
I'm not able to reproduce it, I think this is not problem anymore. Closing it.
If I'm wrong, please reopen and update.

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