Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Mehmet Erol Sanliturk
On Sat, Jul 16, 2022 at 1:32 AM Mark Johnston  wrote:

> On Fri, Jul 15, 2022 at 05:26:09PM -0500, Larry Rosenman wrote:
> > On 07/15/2022 5:24 pm, Mark Johnston wrote:
> > > On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:
> > >> On 07/15/2022 5:18 pm, Mark Johnston wrote:
> > >> > On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
> > >> >> I'm using the following kernel config:
> > >> >> [...]
> > >> >> and the following login.conf:
> > >> >> [...]
> > >> >> bacula_dir:\
> > >> >> :stacksize-max=68719476736:\
> > >> >> :stacksize-cur=68719476736:\
> > >> >> :tc=daemon:
> > >> >> [...]
> > >> >> I've updated my (ler) password entry to reference bacula_dir:
> > >> >> ler::1001:1001:bacula_dir:0:0:Larry
> > >> >> Rosenman:/home/ler:/usr/local/bin/zsh
> > >> >>
> > >> >>
> > >> >> when I ssh in, the stacklimit is still:
> > >> >> โฏ ulimit -H -s
> > >> >> 2097152
> > >> >
> > >> > What is the value of the kern.maxssiz sysctl on this system?
> > >> >
> > >> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚ 
> ler/freebsd-main-changes:main on
> > >> >> โ˜๏ธ  (us-east-1)
> > >> >> โฏ ulimit -S -s
> > >> >> 2097152
> > >> >>
> > >> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚ 
> ler/freebsd-main-changes:main on
> > >> >> โ˜๏ธ  (us-east-1)
> > >> >> โฏ
> > >> >>
> > >> >> Where does this number come from?  What am I missing here?
> > >> >
> > >> > The stack limit cannot be set to an arbitrarily large number.  It
> will
> > >> > silently be clamped to maxssiz.
> > >>
> > >> โฏ sysctl kern.maxssiz
> > >> kern.maxssiz: 2147483648
> > >
> > > Then what you're seeing is expected.  The kernel is clamping the stack
> > > segment limit to 2GB.
> >
> > I assume this is the default for MAXSSIZ?  and if I change that in the
> > kernel config, it will
> > allow bigger?  Where is this default defined?
>
> The default value is platform dependent.  On amd64 it's 512MB, so I'm
> not sure where your value is coming from.



---



> It's defined in a header.
> You can set it in the kernel configuration, or as a tunable or sysctl.
>
>
---


My opinion is that , there is some one ( or more ) constant(s)
defined elsewhere , because

setting  MAXSSIZ  is  NOT WORKING when it is larger than

the "unknown" default value ...


With my best wishes for all ,

Mehmet Erol Sanliturk


Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Larry Rosenman

On 07/15/2022 5:32 pm, Mark Johnston wrote:

On Fri, Jul 15, 2022 at 05:26:09PM -0500, Larry Rosenman wrote:

On 07/15/2022 5:24 pm, Mark Johnston wrote:
> On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:
>> On 07/15/2022 5:18 pm, Mark Johnston wrote:
>> > On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
>> >> I'm using the following kernel config:
>> >> [...]
>> >> and the following login.conf:
>> >> [...]
>> >> bacula_dir:\
>> >>   :stacksize-max=68719476736:\
>> >>   :stacksize-cur=68719476736:\
>> >>   :tc=daemon:
>> >> [...]
>> >> I've updated my (ler) password entry to reference bacula_dir:
>> >> ler::1001:1001:bacula_dir:0:0:Larry
>> >> Rosenman:/home/ler:/usr/local/bin/zsh
>> >>
>> >>
>> >> when I ssh in, the stacklimit is still:
>> >> โฏ ulimit -H -s
>> >> 2097152
>> >
>> > What is the value of the kern.maxssiz sysctl on this system?
>> >
>> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
>> >> โ˜๏ธ  (us-east-1)
>> >> โฏ ulimit -S -s
>> >> 2097152
>> >>
>> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
>> >> โ˜๏ธ  (us-east-1)
>> >> โฏ
>> >>
>> >> Where does this number come from?  What am I missing here?
>> >
>> > The stack limit cannot be set to an arbitrarily large number.  It will
>> > silently be clamped to maxssiz.
>>
>> โฏ sysctl kern.maxssiz
>> kern.maxssiz: 2147483648
>
> Then what you're seeing is expected.  The kernel is clamping the stack
> segment limit to 2GB.

I assume this is the default for MAXSSIZ?  and if I change that in the
kernel config, it will
allow bigger?  Where is this default defined?


The default value is platform dependent.  On amd64 it's 512MB, so I'm
not sure where your value is coming from.  It's defined in a header.
You can set it in the kernel configuration, or as a tunable or sysctl.


ok, so I had (back when, heaven only knows) set it in /boot/loader.conf:
kern.maxssiz="2147483648"

thank you.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106



Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Mark Johnston
On Fri, Jul 15, 2022 at 05:26:09PM -0500, Larry Rosenman wrote:
> On 07/15/2022 5:24 pm, Mark Johnston wrote:
> > On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:
> >> On 07/15/2022 5:18 pm, Mark Johnston wrote:
> >> > On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
> >> >> I'm using the following kernel config:
> >> >> [...]
> >> >> and the following login.conf:
> >> >> [...]
> >> >> bacula_dir:\
> >> >> :stacksize-max=68719476736:\
> >> >> :stacksize-cur=68719476736:\
> >> >> :tc=daemon:
> >> >> [...]
> >> >> I've updated my (ler) password entry to reference bacula_dir:
> >> >> ler::1001:1001:bacula_dir:0:0:Larry
> >> >> Rosenman:/home/ler:/usr/local/bin/zsh
> >> >>
> >> >>
> >> >> when I ssh in, the stacklimit is still:
> >> >> โฏ ulimit -H -s
> >> >> 2097152
> >> >
> >> > What is the value of the kern.maxssiz sysctl on this system?
> >> >
> >> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
> >> >> โ˜๏ธ  (us-east-1)
> >> >> โฏ ulimit -S -s
> >> >> 2097152
> >> >>
> >> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
> >> >> โ˜๏ธ  (us-east-1)
> >> >> โฏ
> >> >>
> >> >> Where does this number come from?  What am I missing here?
> >> >
> >> > The stack limit cannot be set to an arbitrarily large number.  It will
> >> > silently be clamped to maxssiz.
> >> 
> >> โฏ sysctl kern.maxssiz
> >> kern.maxssiz: 2147483648
> > 
> > Then what you're seeing is expected.  The kernel is clamping the stack
> > segment limit to 2GB.
> 
> I assume this is the default for MAXSSIZ?  and if I change that in the 
> kernel config, it will
> allow bigger?  Where is this default defined?

The default value is platform dependent.  On amd64 it's 512MB, so I'm
not sure where your value is coming from.  It's defined in a header.
You can set it in the kernel configuration, or as a tunable or sysctl.



Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Larry Rosenman

On 07/15/2022 5:24 pm, Mark Johnston wrote:

On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:

On 07/15/2022 5:18 pm, Mark Johnston wrote:
> On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
>> I'm using the following kernel config:
>> [...]
>> and the following login.conf:
>> [...]
>> bacula_dir:\
>>:stacksize-max=68719476736:\
>>:stacksize-cur=68719476736:\
>>:tc=daemon:
>> [...]
>> I've updated my (ler) password entry to reference bacula_dir:
>> ler::1001:1001:bacula_dir:0:0:Larry
>> Rosenman:/home/ler:/usr/local/bin/zsh
>>
>>
>> when I ssh in, the stacklimit is still:
>> โฏ ulimit -H -s
>> 2097152
>
> What is the value of the kern.maxssiz sysctl on this system?
>
>> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
>> โ˜๏ธ  (us-east-1)
>> โฏ ulimit -S -s
>> 2097152
>>
>> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
>> โ˜๏ธ  (us-east-1)
>> โฏ
>>
>> Where does this number come from?  What am I missing here?
>
> The stack limit cannot be set to an arbitrarily large number.  It will
> silently be clamped to maxssiz.

โฏ sysctl kern.maxssiz
kern.maxssiz: 2147483648


Then what you're seeing is expected.  The kernel is clamping the stack
segment limit to 2GB.


I assume this is the default for MAXSSIZ?  and if I change that in the 
kernel config, it will

allow bigger?  Where is this default defined?

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106



Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Mark Johnston
On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:
> On 07/15/2022 5:18 pm, Mark Johnston wrote:
> > On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
> >> I'm using the following kernel config:
> >> [...]
> >> and the following login.conf:
> >> [...]
> >> bacula_dir:\
> >>:stacksize-max=68719476736:\
> >>:stacksize-cur=68719476736:\
> >>:tc=daemon:
> >> [...]
> >> I've updated my (ler) password entry to reference bacula_dir:
> >> ler::1001:1001:bacula_dir:0:0:Larry
> >> Rosenman:/home/ler:/usr/local/bin/zsh
> >> 
> >> 
> >> when I ssh in, the stacklimit is still:
> >> โฏ ulimit -H -s
> >> 2097152
> > 
> > What is the value of the kern.maxssiz sysctl on this system?
> > 
> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
> >> โ˜๏ธ  (us-east-1)
> >> โฏ ulimit -S -s
> >> 2097152
> >> 
> >> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
> >> โ˜๏ธ  (us-east-1)
> >> โฏ
> >> 
> >> Where does this number come from?  What am I missing here?
> > 
> > The stack limit cannot be set to an arbitrarily large number.  It will
> > silently be clamped to maxssiz.
> 
> โฏ sysctl kern.maxssiz
> kern.maxssiz: 2147483648

Then what you're seeing is expected.  The kernel is clamping the stack
segment limit to 2GB.



Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Larry Rosenman

On 07/15/2022 5:18 pm, Mark Johnston wrote:

On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:

I'm using the following kernel config:
[...]
and the following login.conf:
[...]
bacula_dir:\
:stacksize-max=68719476736:\
:stacksize-cur=68719476736:\
:tc=daemon:
[...]
I've updated my (ler) password entry to reference bacula_dir:
ler::1001:1001:bacula_dir:0:0:Larry
Rosenman:/home/ler:/usr/local/bin/zsh


when I ssh in, the stacklimit is still:
โฏ ulimit -H -s
2097152


What is the value of the kern.maxssiz sysctl on this system?


ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
โ˜๏ธ  (us-east-1)
โฏ ulimit -S -s
2097152

ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on
โ˜๏ธ  (us-east-1)
โฏ

Where does this number come from?  What am I missing here?


The stack limit cannot be set to an arbitrarily large number.  It will
silently be clamped to maxssiz.


โฏ sysctl kern.maxssiz
kern.maxssiz: 2147483648


--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 214-642-9640 E-Mail: l...@lerctr.org
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106



Re: limits.conf/stacksize doesn't seem to work?

2022-07-15 Thread Mark Johnston
On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:
> I'm using the following kernel config:
> [...]
> and the following login.conf:
> [...]
> bacula_dir:\
>   :stacksize-max=68719476736:\
>   :stacksize-cur=68719476736:\
>   :tc=daemon:
> [...]
> I've updated my (ler) password entry to reference bacula_dir:
> ler::1001:1001:bacula_dir:0:0:Larry 
> Rosenman:/home/ler:/usr/local/bin/zsh
> 
> 
> when I ssh in, the stacklimit is still:
> โฏ ulimit -H -s
> 2097152

What is the value of the kern.maxssiz sysctl on this system?

> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on 
> โ˜๏ธ  (us-east-1)
> โฏ ulimit -S -s
> 2097152
> 
> ler in ๐ŸŒ borg in sys/amd64/conf๐Ÿ”’ on ๎‚  ler/freebsd-main-changes:main on 
> โ˜๏ธ  (us-east-1)
> โฏ
> 
> Where does this number come from?  What am I missing here?

The stack limit cannot be set to an arbitrarily large number.  It will
silently be clamped to maxssiz.