On Sun, Jan 14, 2007 at 09:16:39AM +0100, Andreas Metzler wrote:
> On 2007-01-14 Lionel Elie Mamane <[EMAIL PROTECTED]> wrote:

>> mailman was using the following snippet of code:

>>  find /var/lib/mailman/ -type d -print0 | xargs -r -0 chmod g+s

>> but this led, for at least one user, to a failure with the error
>> message:

>>  xargs: chmod: Argument list too long

> there used to be a bug in xargs which could have caused this error.

> | findutils (4.2.26-1) unstable; urgency=low
> [...]
> |   * New upstream version 4.2.26.
> [...]
> |     - If the input to xargs is a large number of very short options (for
> |       example, one character each), earlier versions of xargs would fail
> |       with 'Argument list too long'. This is because Linux's execve
> |       implementation requires that the sum of the sizes of all argument
> |       string pointers not exceed 128K (the actual limit is
> |       ARG_MAX - sizeof (void*)). Hopefully (Closes: #313028).
> [...]
> |  -- Andreas Metzler <[EMAIL PROTECTED]>  Sun, 20 Nov 2005 09:38:42 +0100

I presume you meant ARG_MAX/sizeof(void*), not minus?

Note that in this case, it was not "a very large number of very short
options"; each entry was strictly more than 15 characters (16 with the
terminating null). Easily at least double that in average. Would that
still count as "very short options"?

Let's see... How "very short" must these options be to hit that upper
limit? The limit is ARG_MAX/sizeof(void*), so each argument must be at
most ARG_MAX/(ARG_MAX/sizeof(void*)), that is sizeof(void*) bytes
long. sizeof(void*) would have been at most 8, so I cannot imagine the
above line to trigger that particular bug. Also not the "-2" bug, we
are far away from possibly approaching the maximum *number* of
arguments.


This being said, it is true I come with very little information to
actually reproduce and fix what I presume to be another bug :-(


-- 
Lionel


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to