Thilo Six schrieb/wrote:

-- <snip> --
> zsh custom config:
> luke@debiansid ~ % LC_ALL=C xargs --show-limits < /dev/null 2>&1
> Your environment variables take up 7058 bytes
> POSIX upper limit on argument length (this system): 4611686018427378797
> POSIX smallest allowable upper limit on argument length (all systems): 4096
> Maximum length of command we could actually use: 4611686018427371739
> Size of command buffer we are actually using: 131072
> 
> zsh plain:
> debiansid% LC_ALL=C xargs --show-limits < /dev/null 2>&1
> Your environment variables take up 347 bytes
> POSIX upper limit on argument length (this system): 2094757
> POSIX smallest allowable upper limit on argument length (all systems): 4096
> Maximum length of command we could actually use: 2094410
> Size of command buffer we are actually using: 131072
> 
> 
> Notice the huge number for 'Maximum length of command' with custom config.
> As i had understand the maximum size of input is defined by a buffer size 
> built
> into the kernel. How can this change by config at runtime?
> Or am i completely wrong?

Turns out this is the root cause.

(Zsh)
% LC_ALL=C xargs --show-limits < /dev/null 2>&1 | /usr/bin/mawk '/Maximum/
{print int($NF / 4)}'
520310

% builtin unlimit
% LC_ALL=C xargs --show-limits < /dev/null 2>&1 | /usr/bin/mawk '/Maximum/
{print int($NF / 4)}'
1.15292e+18

So after runing 'unlimit' maximum length of command is set to s.th.
4,61e18 ish (exa byte) here. Not quite sure this comes close to the definition
of "The resource limit for each resource is set to the hard limit."
Obviously mawk other then gawk transforms this number then automatically to the
exponent syntax.
As mentioned ealier xargs then even bails out when run with this input size
with: "xargs: memory exhausted".

So i think as far as the maintainer scripts for python are concerned we are
safe. I will redirect this bug here to Zsh maintainers to ask whether this is
expected zsh behaviour or a bug.

Thank you for your patience.



kind regards,

     Thilo

Reply via email to