I noticed a weird behavior when trying to set both hard and soft limits of
nofile regarding my user (which of course has
My overall system bound is 2^22, and I tried to do the following even after setting it up to 2^23.
I managed to perfectly set both soft and hard limits up to 2^20, without any problems. (meaning that after I sample them using
ulimit -Sn,and -Hn I get the values I just set).
When I set them to 2^21 or higher, after I relog the user (in order to apply the changes), the hard limit and soft limit are both decreased to 4096 and 1024 respectively .
I can't find anything online about it, and I suspect it has something to do with the types of the variables which are used to store these values (personally I'd expect it to be somewhere around 2^32 or even 2^33 if they are defined as
uint, but it's definitely not the case).