Hello Mathias,

Matthias Klose schrieb/wrote:
> On 20.12.2015 15:52, Thilo Six wrote:
>> Hello
>>
>> it seems this bug occurs only with mawk as system default awk (Debians 
>> default).
>> When gawk is used instead ... well at least it spews out a different error:
>>
>>
>> ,----[  cli output  ]--------
>>
>> root@debiansid ~ # sll =awk
>> lrwxrwxrwx 1 root root 21  2015-04-25 16:03  /usr/bin/awk -> 
>> /etc/alternatives/awk
>> lrwxrwxrwx 1 root root 13  2015-04-25 16:03  /etc/alternatives/awk -> 
>> /usr/bin/mawk
>> -rwxr-xr-x 1 root root 116K  2012-03-23 23:19  /usr/bin/mawk
>> root@debiansid ~ # LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk
>> '/Maximum/ {print int($NF / 4)}'
>> 1.15292e+18
> 
> xargs is independent of gawk/mawk. however I can't even reproduce this one:
> 
> LC_ALL=C xargs --show-limits < /dev/null 2>&1 | awk '/Maximum/ {print int($NF 
> / 4)}'
> 523680
> 

for me this is reproducible:
luke@debiansid ~ % LC_ALL=C xargs --show-limits < /dev/null 2>&1 | /usr/bin/mawk
'/Maximum/ {print int($NF / 4)}'
1.15292e+18

luke@debiansid ~ % LC_ALL=C xargs --show-limits < /dev/null 2>&1 | /usr/bin/gawk
'/Maximum/ {print int($NF / 4)}'
1152921504606842880


At a first glance i admit you are also right, as i had set up a new user without
any modifications where this does not happen.

Now what is strange is this:


bash:
schnubbel@debiansid:~$ LC_ALL=C xargs --show-limits < /dev/null 2>&1
Your environment variables take up 1758 bytes
POSIX upper limit on argument length (this system): 2093346
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2091588
Size of command buffer we are actually using: 131072

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?

I need time to track this down to a possible easy to reproduce case.
Currently most obvious settings to track down are:
limits
locale
shell

and any duration of them.

@Roderich:
Although the hostname suggest s.th. different this is "plain" debian testing.

luke@debiansid ~ % show findutils
Package: findutils
Essential: yes
State: installed
Automatically installed: no
Multi-Arch: foreign
Version: 4.4.2-10
Priority: required
Section: utils
Maintainer: Andreas Metzler <[email protected]>
Architecture: amd64
Uncompressed Size: 1592 k
PreDepends: libc6 (>= 2.17)
Suggests: mlocate | locate
Description: utilities for finding files--find, xargs
 GNU findutils provides utilities to find files meeting specified criteria and
perform various actions on the files which are
 found. This package contains 'find' and 'xargs'; however, 'locate' has been
split off into a separate package.
Homepage: http://savannah.gnu.org/projects/findutils/
Tags: implemented-in::c, interface::commandline, role::program, scope::utility,
suite::gnu, use::searching, works-with::file


Though i think your remark about xargs output change is worthwhile considering.


I will come back here in few days, probably not before christmas.



kind regards,

     Thilo

Reply via email to