Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2022 03:18:06 +0300
From:      Mehmet Erol Sanliturk <m.e.sanliturk@gmail.com>
To:        Mark Johnston <markj@freebsd.org>
Cc:        Larry Rosenman <ler@lerctr.org>, Freebsd current <freebsd-current@freebsd.org>
Subject:   Re: limits.conf/stacksize doesn't seem to work?
Message-ID:  <CAOgwaMuRGFo3Yev0R0QVXvBS33HAbiYzbtftsvKuWBV=XsA=mQ@mail.gmail.com>
In-Reply-To: <YtHq9bT3jJSlT6jW@nuc>
References:  <d997dadc5e1b09fa6af0419f6641ed7f@lerctr.org> <YtHnsCfIwe%2BK6RMF@nuc> <32dc6f5b56a749f9b8e26330f9f2e8e0@lerctr.org> <YtHpJEzN7OHmvle4@nuc> <51ef4fe0c8c5bbe251d3e75084847a6e@lerctr.org> <YtHq9bT3jJSlT6jW@nuc>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sat, Jul 16, 2022 at 1:32 AM Mark Johnston <markj@freebsd.org> 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:<elided>: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

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;font-size:large"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 16, 2022 at 1:32 AM Mark Johnston &lt;<a href="mailto:markj@freebsd.org">markj@freebsd.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, Jul 15, 2022 at 05:26:09PM -0500, Larry Rosenman wrote:<br>
&gt; On 07/15/2022 5:24 pm, Mark Johnston wrote:<br>
&gt; &gt; On Fri, Jul 15, 2022 at 05:21:27PM -0500, Larry Rosenman wrote:<br>
&gt; &gt;&gt; On 07/15/2022 5:18 pm, Mark Johnston wrote:<br>
&gt; &gt;&gt; &gt; On Fri, Jul 15, 2022 at 05:04:18PM -0500, Larry Rosenman wrote:<br>
&gt; &gt;&gt; &gt;&gt; I&#39;m using the following kernel config:<br>
&gt; &gt;&gt; &gt;&gt; [...]<br>
&gt; &gt;&gt; &gt;&gt; and the following login.conf:<br>
&gt; &gt;&gt; &gt;&gt; [...]<br>
&gt; &gt;&gt; &gt;&gt; bacula_dir:\<br>
&gt; &gt;&gt; &gt;&gt;         :stacksize-max=68719476736:\<br>
&gt; &gt;&gt; &gt;&gt;         :stacksize-cur=68719476736:\<br>
&gt; &gt;&gt; &gt;&gt;         :tc=daemon:<br>
&gt; &gt;&gt; &gt;&gt; [...]<br>
&gt; &gt;&gt; &gt;&gt; I&#39;ve updated my (ler) password entry to reference bacula_dir:<br>
&gt; &gt;&gt; &gt;&gt; ler:&lt;elided&gt;:1001:1001:bacula_dir:0:0:Larry<br>
&gt; &gt;&gt; &gt;&gt; Rosenman:/home/ler:/usr/local/bin/zsh<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt; when I ssh in, the stacklimit is still:<br>
&gt; &gt;&gt; &gt;&gt; ❯ ulimit -H -s<br>
&gt; &gt;&gt; &gt;&gt; 2097152<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; What is the value of the kern.maxssiz sysctl on this system?<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt;&gt; ler in 🌐 borg in sys/amd64/conf🔒 on  ler/freebsd-main-changes:main on<br>
&gt; &gt;&gt; &gt;&gt; ☁️  (us-east-1)<br>
&gt; &gt;&gt; &gt;&gt; ❯ ulimit -S -s<br>
&gt; &gt;&gt; &gt;&gt; 2097152<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt; ler in 🌐 borg in sys/amd64/conf🔒 on  ler/freebsd-main-changes:main on<br>
&gt; &gt;&gt; &gt;&gt; ☁️  (us-east-1)<br>
&gt; &gt;&gt; &gt;&gt; ❯<br>
&gt; &gt;&gt; &gt;&gt;<br>
&gt; &gt;&gt; &gt;&gt; Where does this number come from?  What am I missing here?<br>
&gt; &gt;&gt; &gt;<br>
&gt; &gt;&gt; &gt; The stack limit cannot be set to an arbitrarily large number.  It will<br>
&gt; &gt;&gt; &gt; silently be clamped to maxssiz.<br>
&gt; &gt;&gt; <br>
&gt; &gt;&gt; ❯ sysctl kern.maxssiz<br>
&gt; &gt;&gt; kern.maxssiz: 2147483648<br>
&gt; &gt; <br>
&gt; &gt; Then what you&#39;re seeing is expected.  The kernel is clamping the stack<br>
&gt; &gt; segment limit to 2GB.<br>
&gt; <br>
&gt; I assume this is the default for MAXSSIZ?  and if I change that in the <br>
&gt; kernel config, it will<br>
&gt; allow bigger?  Where is this default defined?<br>
<br>
The default value is platform dependent.  On amd64 it&#39;s 512MB, so I&#39;m<br>
not sure where your value is coming from. </blockquote><div><br></div><div><br></div><div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">-------------------------------------------------------</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> It&#39;s defined in a header.<br>
You can set it in the kernel configuration, or as a tunable or sysctl.<br>
<br></blockquote><div><div><br></div><div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">-------------------------------------------------------</div><br></div><div><br></div></div><div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">My opinion is that , there is some one ( or more ) constant(s) <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">defined elsewhere , because <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">setting  MAXSSIZ  is  NOT WORKING when it is larger than</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">the &quot;unknown&quot; default value ...</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">With my best wishes for all ,</div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default">Mehmet Erol Sanliturk <br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><div style="font-family:tahoma,sans-serif;font-size:large" class="gmail_default"><br></div><br></div><div><br></div><div><br></div><div><br></div><div> </div></div></div>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgwaMuRGFo3Yev0R0QVXvBS33HAbiYzbtftsvKuWBV=XsA=mQ>