Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 May 2021 18:41:33 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Michael Gmelin <freebsd@grem.de>
Cc:        "Conrad E. Meyer" <cem@freebsd.org>, FreeBSD Current <freebsd-current@freebsd.org>
Subject:   Re: Reducing SIGINFO verbosity
Message-ID:  <CANCZdfqZK8FKZOOdbk4=C8x3RswZcug7HzuOGki_EwxF5JYHZw@mail.gmail.com>
In-Reply-To: <E4BBC63A-9116-426D-BE12-66C76456DB14@grem.de>
References:  <CAG6CVpWpDYid9F0fSWyyFVuh6SuNmV4HwEBQUKTCXDGfq6KwAw@mail.gmail.com> <E4BBC63A-9116-426D-BE12-66C76456DB14@grem.de>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000fe72b905c2cc5230
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thu, May 20, 2021, 6:28 PM Michael Gmelin <freebsd@grem.de> wrote:

>
>
> On 21. May 2021, at 01:00, Conrad Meyer <cem@freebsd.org> wrote:
>
> =EF=BB=BF
> No, I don=E2=80=99t think there=E2=80=99s any reason to default it differ=
ently on stable
> vs current. I think it=E2=80=99s useful (and I prefer the more verbose fo=
rm, which
> isn=E2=80=99t the default).
>
> Conrad
>
>
> Well, to me siginfo is part of the user interface and changing the user
> interface to show lots of debug information by default feels wrong
> (especially on a 80x25 terminal, where it now takes multiple lines). A
> typical example is hitting ctrl-t a couple of times to see the progress i=
n
> a long running dd operation, all the extra clutter makes this unnecessari=
ly
> inconvenient. Maybe your use case differs, I don=E2=80=99t need to see sy=
stem call
> details when checking the poudriere build status.
>
> In the end, personally this simply means that there is one more thing I
> have to configure on every host in the future, I don=E2=80=99t really hav=
e the
> energy to fight over this.
>
> It would be nice if changing defaults of things that were the same for
> decades would be mentioned somewhere in the release notes though. Or mayb=
e
> in the verbose output itself? Just an idea, how this could be done in a
> user friendly way:
>
> Right now we have
> 0 - normal
> 1 - verbose
> 2 - very verbose
>
> What about adding a bit here that controls an extra line saying:
>
> "You can control the verbosity of siginfo output with sysctl
> kern.tty_info_kstacks"
>
> Therefore, we would have these additional values, one of them being the
> default value:
>
> 16 - normal + sysctl help message
> 17 - verbose + sysctl help message
> 18 - very verbose + sysctl message
>
> At this point the default won=E2=80=99t matter that much, as users learn =
about the
> feature after the update and can easily configure the setting that suits
> their needs.
>
> Just trying to be somehow constructive here, having this on by default
> still doesn=E2=80=99t feel right to me.
>

If this were a tunable, I think cem's default is good. We'll be able to get
more data than otherwise. Since the sysctl is writable, people can mostly
get the extra info by logging in elsewhere and setting it.

Part of me wants to have a toggle. Hit it 3 times in a second and we'd
toggle verbosity. But then we'd want to turn it off for security, so I'm
not so sure the complexity is worth it..

Warner


Michael
>
>
> On Thu, May 20, 2021 at 11:59 John-Mark Gurney <jmg@funkthat.com> wrote:
>
>> Michael Gmelin wrote this message on Thu, May 20, 2021 at 18:01 +0200:
>> > I'm leaving this here, mostly so that others (or future me) can google
>> > it up.
>> >
>> > Traditionally, CTRL-t would give a one-line output + whatever the
>> > process specific signal handler comes up with:
>> >
>> >   # sleep 120 <--- hits CTRL-t
>> >   load: 0.27  cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.00s 0% 1780k
>> >   sleep: about 119 second(s) left out of the original 120
>> >
>> >   # cat <--- hits CTRL-t
>> >   load: 0.02  cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s 0% 2308k
>> >
>> >
>> > On 13 I get:
>> >
>> >   # sleep 120 <--- hits CTRL-t
>> >   load: 0.12  cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00s 0% 2172k
>> >   mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait_sig+0x12
>> >   _sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b
>> >   amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about 119
>> >   second(s) left out of the original 120
>> >
>> >   # cat <--- hits CTRL-t
>> >   load: 0.09  cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0% 2300k
>> >   mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+0x9
>> >   _cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_read+0x56
>> >   devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_syscall+0x10c
>> >   fast_syscall_common+0xf8
>> >
>> > which is quite way too verbose when checking the progress of
>> > long-running processes, like cp, dd, or poudriere. Especially as CTRL-=
t
>> > is part of the user experience to me - I use it to interact with the
>> > machine outside of debugging software issues.
>> >
>> > Setting
>> >
>> >   sysctl kern.tty_info_kstacks=3D0
>> >   echo kern.tty_info_kstacks=3D0 >>/etc/sysctl.conf
>> >
>> > fixes this permanently.
>> >
>> > Apparently, this was enabled by default on purpose[0], so that people
>> > find the feature (which certainly worked ^_^), but I think it would
>> > been worth mentioning the sysctl somewhere in the release notes/errata=
,
>> > so that people understand how to disable it again.
>>
>> I think the original intent was to disable this on -stable or at least
>> -RELEASEs, but it looks like this didn't happen.  This is VERY helpful
>> for a developer, but not as helpful for most users.
>>
>> Conrad,
>>
>> Should this be disabled on -stable now?
>>
>> --
>>   John-Mark Gurney                              Voice: +1 415 225 5579
>>
>>      "All that I will do, has been done, All that I have, has not."
>>
>

--000000000000fe72b905c2cc5230
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Thu, May 20, 2021, 6:28 PM Michael Gmelin &lt;<a hr=
ef=3D"mailto:freebsd@grem.de">freebsd@grem.de</a>&gt; wrote:<br></div><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc=
c solid;padding-left:1ex"><div dir=3D"auto"><div dir=3D"ltr"><div dir=3D"lt=
r"><br></div><div dir=3D"ltr"><br><blockquote type=3D"cite">On 21. May 2021=
, at 01:00, Conrad Meyer &lt;<a href=3D"mailto:cem@freebsd.org" target=3D"_=
blank" rel=3D"noreferrer">cem@freebsd.org</a>&gt; wrote:<br><br></blockquot=
e></div><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<div dir=3D"aut=
o">No, I don=E2=80=99t think there=E2=80=99s any reason to default it diffe=
rently on stable vs current. I think it=E2=80=99s useful (and I prefer the =
more verbose form, which isn=E2=80=99t the default).</div><div dir=3D"auto"=
><br></div><div dir=3D"auto">Conrad=C2=A0</div></div></blockquote><div><br>=
</div><div>Well, to me siginfo is part of the user interface and changing t=
he user interface to show lots of debug information by default feels wrong =
(especially on a 80x25 terminal, where it now takes multiple lines). A typi=
cal example is hitting ctrl-t a couple of times to see the progress in a lo=
ng running dd operation, all the extra clutter makes this unnecessarily inc=
onvenient. Maybe your use case differs, I don=E2=80=99t need to see system =
call details when checking the poudriere build status.</div><div><br></div>=
<div>In the end, personally this simply means that there is one more thing =
I have to configure on every host in the future, I don=E2=80=99t really hav=
e the energy to fight over this.</div><div><br></div><div>It would be nice =
if changing defaults of things that were the same for decades would be ment=
ioned somewhere in the release notes though. Or maybe in the verbose output=
 itself? Just an idea, how this could be done in a user friendly way:</div>=
<div><br></div><div>Right now we have=C2=A0</div><div>0 - normal</div><div>=
1 - verbose</div><div>2 - very verbose</div><div><br></div><div>What about =
adding a bit here that controls an extra line saying:</div><div><br></div><=
div>&quot;You can control the verbosity of siginfo output with sysctl kern.=
tty_info_kstacks&quot;</div><div><br></div><div>Therefore, we would have th=
ese additional values, one of them being the default value:</div><div><br><=
/div><div>16 - normal + sysctl help message</div><div>17 - verbose + sysctl=
 help message</div><div>18 - very verbose + sysctl message</div><div><br></=
div><div>At this point the default won=E2=80=99t matter that much, as users=
 learn about the feature after the update and can easily configure the sett=
ing that suits their needs.</div><div><br></div><div>Just trying to be some=
how constructive here, having this on by default still doesn=E2=80=99t feel=
 right to me.</div></div></div></blockquote></div></div><div dir=3D"auto"><=
br></div><div dir=3D"auto">If this were a tunable, I think cem&#39;s defaul=
t is good. We&#39;ll be able to get more data than otherwise. Since the sys=
ctl is writable, people can mostly get the extra info by logging in elsewhe=
re and setting it.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Part =
of me wants to have a toggle. Hit it 3 times in a second and we&#39;d toggl=
e verbosity. But then we&#39;d want to turn it off for security, so I&#39;m=
 not so sure the complexity is worth it..</div><div dir=3D"auto"><br></div>=
<div dir=3D"auto">Warner=C2=A0</div><div dir=3D"auto"><br></div><div dir=3D=
"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><div dir=3D"auto"><div dir=3D"ltr"><div>Michael</div><div=
><br></div><blockquote type=3D"cite"><div dir=3D"ltr"><div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 20, 2021=
 at 11:59 John-Mark Gurney &lt;<a href=3D"mailto:jmg@funkthat.com" target=
=3D"_blank" rel=3D"noreferrer">jmg@funkthat.com</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #=
ccc solid;padding-left:1ex">Michael Gmelin wrote this message on Thu, May 2=
0, 2021 at 18:01 +0200:<br>
&gt; I&#39;m leaving this here, mostly so that others (or future me) can go=
ogle<br>
&gt; it up.<br>
&gt; <br>
&gt; Traditionally, CTRL-t would give a one-line output + whatever the<br>
&gt; process specific signal handler comes up with:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# sleep 120 &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.27=C2=A0 cmd: sleep 38162 [nanslp] 0.64r 0.00u 0.0=
0s 0% 1780k<br>
&gt;=C2=A0 =C2=A0sleep: about 119 second(s) left out of the original 120<br=
>
&gt; <br>
&gt;=C2=A0 =C2=A0# cat &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.02=C2=A0 cmd: cat 24379 [ttyin] 0.63r 0.00u 0.00s =
0% 2308k<br>
&gt; <br>
&gt;=C2=A0 =C2=A0<br>
&gt; On 13 I get:<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# sleep 120 &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.12=C2=A0 cmd: sleep 3241 [nanslp] 0.52r 0.00u 0.00=
s 0% 2172k<br>
&gt;=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_timedwait=
_sig+0x12<br>
&gt;=C2=A0 =C2=A0_sleep+0x199 kern_clock_nanosleep+0x1e1 sys_nanosleep+0x3b=
<br>
&gt;=C2=A0 =C2=A0amd64_syscall+0x10c fast_syscall_common+0xf8 sleep: about =
119<br>
&gt;=C2=A0 =C2=A0second(s) left out of the original 120<br>
&gt; <br>
&gt;=C2=A0 =C2=A0# cat &lt;--- hits CTRL-t<br>
&gt;=C2=A0 =C2=A0load: 0.09=C2=A0 cmd: cat 3240 [ttyin] 0.23r 0.00u 0.00s 0=
% 2300k<br>
&gt;=C2=A0 =C2=A0mi_switch+0xc1 sleepq_catch_signals+0x2e6 sleepq_wait_sig+=
0x9<br>
&gt;=C2=A0 =C2=A0_cv_wait_sig+0xe4 tty_wait+0x1c ttydisc_read+0x2ac ttydev_=
read+0x56<br>
&gt;=C2=A0 =C2=A0devfs_read_f+0xd5 dofileread+0x81 sys_read+0xbc amd64_sysc=
all+0x10c<br>
&gt;=C2=A0 =C2=A0fast_syscall_common+0xf8 <br>
&gt; <br>
&gt; which is quite way too verbose when checking the progress of<br>
&gt; long-running processes, like cp, dd, or poudriere. Especially as CTRL-=
t<br>
&gt; is part of the user experience to me - I use it to interact with the<b=
r>
&gt; machine outside of debugging software issues.<br>
&gt; <br>
&gt; Setting<br>
&gt; <br>
&gt;=C2=A0 =C2=A0sysctl kern.tty_info_kstacks=3D0<br>
&gt;=C2=A0 =C2=A0echo kern.tty_info_kstacks=3D0 &gt;&gt;/etc/sysctl.conf<br=
>
&gt; <br>
&gt; fixes this permanently.<br>
&gt; <br>
&gt; Apparently, this was enabled by default on purpose[0], so that people<=
br>
&gt; find the feature (which certainly worked ^_^), but I think it would<br=
>
&gt; been worth mentioning the sysctl somewhere in the release notes/errata=
,<br>
&gt; so that people understand how to disable it again.<br>
<br>
I think the original intent was to disable this on -stable or at least<br>
-RELEASEs, but it looks like this didn&#39;t happen.=C2=A0 This is VERY hel=
pful<br>
for a developer, but not as helpful for most users.<br>
<br>
Conrad,<br>
<br>
Should this be disabled on -stable now?<br>
<br>
-- <br>
=C2=A0 John-Mark Gurney=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Voice: +1 415 225 5579=
<br>
<br>
=C2=A0 =C2=A0 =C2=A0&quot;All that I will do, has been done, All that I hav=
e, has not.&quot;<br>
</blockquote></div></div>
</div></blockquote></div></div></blockquote></div></div></div>

--000000000000fe72b905c2cc5230--



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