[Pkg-zsh-devel] Bug#807836: Bug#807836: builtin unlimit leads to "xargs: invalid number for -s"

Thilo Six debian at Xk2c.de
Mon Jan 4 15:23:35 UTC 2016


Hello

i thought i had sent this here already to bts. Turn out i missed it.
So here it goes.


Thilo Six schrieb/wrote:
> 
> just a short addition, see below
> 
>>>> May i ask then what is a real world use case for the unlimit builtin then?
>>>> (Just to make it clear, i am not ironic here, just interested trying to
>>>> understand it.)
>>>
>>> You might as well ask what's the purpose of having separate soft and
>>> hard limits.
>>>
>>> The hard limit is the value that even malicious or compromised user accounts
>>> may not exceed.
>>>
>>> I do not know what's the historical reason for having a separate soft
>>> limit.  However, I can imagine a multiuser system with a social
>>> expectation that if you run into the soft limit you reschedule your
>>> resource-heavy job to off-peak hours.  Or on a desktop system, you might
>>> selectively increase the limit for specific resource-hungry
>>> applications, giving each application a limit of, say, 5% above its
>>> normal usage.
>>
>> Now we are back were this bug started.
>> I do not argue soft vs. hard limit or their existence at all. They are useful.
>> I do not even argue that temporarily lifting current limits upwards is useful.
>>
>> I do argue (and that is what has caused this bug) that setting a limit that far
>> beyond anything capable on this current system that it is not even technical
>> able to handle that size of such a limit is useful.
>> And that is just what unlimit does (at least that is what i gather from this
>> bugs history).
>>
>> After unlimit has been run the max input size is set to a that large integer
>> that i would need to go and buy a rather professional SAN System to back that
>> setting up with actually s.th. capable for it.
>> And just that is what i simply do not understand, as that behaviour of unlimit
>> is the opposite of being useful in real world.

I just verified upstream git also has this:

,----[  ./StartupFiles/zshrc  ]--------
# Use hard limits, except for a smaller stack and no core dumps
unlimit
`-----------------------------------------------------------------------

This very example has lead me to the impression that setting this would actually
be ok. Which turned out not. So i suggest to at least comment that out and add a
pointer to this discussion here. Maybe this will prevent some other naive user
from falling into the same pit as happend to me.


>> Now if unlimit would instead evaluate the maximum physical possible size for
>> that limit and activate that, i would say nice.
>> As in your example that would be as pushing the super-turbo-charger button for
>> current session. And actually that is what i had expected when using it.
>>
>> question:
>> Something i was not be able to 100% verify up to now, but i guess from what i
>> read so far that input size on shell prompt relates to stack size in terms of
>> rlimit?
>>
>> After all if nothing else this bug has served my self for learning quite a bit
>> so far. At least i do count that as "worth it".
>>
>> Again thanks for your input. It is appreciated.
>>
>>
>>
>> kind regards,
>>
>>      Thilo
>>
> 



More information about the Pkg-zsh-devel mailing list