Re: weird Ctrl-T debug messages

2020-06-27 Thread Chris

On Sat, 27 Jun 2020 11:59:10 +0200 Michael Gmelin free...@grem.de said


On Sat, 27 Jun 2020 12:06:17 +0300
Andriy Gapon  wrote:

> On 27/06/2020 10:44, Li-Wen Hsu wrote:
> > On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
> >  wrote:  
> >>

> >> Running poudriere on recent CURRENT with (recent) 12-STABLE and
> >> CURRENT jails reveals a weird behaviour recently when hitting
> >> Ctrl-T:  
> > ...  
> >> Is this debug fallout from /bin/sh?  
> > 
> > It's because kern.tty_info_kstacks is on by default now:
> > 
> > https://svnweb.freebsd.org/changeset/base/362141  
> 
> May I suggest that the stack trace is printed procstat -kk style

> (single line) ? I think that the more compact output would be more
> convenient.

It's a cool feature and having it on by default on CURRENT certainly
helps to discover it, which is great. Thanks for implementing this!

I wouldn't enable it by default on RELEASE versions though, as CTRL-T
is a user interface to get status information (at least this is how I
use it personally, e.g., while running commands like dd[0], cp, mv,
poudriere etc.), not for getting debug output.

Getting debug information every time I want to get the status seems
like something that would make my user experience worse. I understand
that this can be disabled locally, but that's a bit like changing
the default syslog.conf to write messages of log level LOG_DEBUG
to /var/log/messages.

So, in the long run (before 13-RELEASE) I would prefer to disable it by
default again, but maybe alter the default sysctl.conf to contain:

# Uncomment this to show stack traces on SIGINFO (ctrl-t)
#kern.tty_info_kstacks=1

Question: Speaking of discovering the feature, wouldn't it make sense
to document this tunable on the stack(9) and/or tty(4) man page(s)?

Just my 2 cents

A huge +1 here.

I think you captured it well, Michael.

Thanks.

--Chris


[0] Typical use case:

$ dd if=/dev/random of=/dev/da0 bs=1m

load: 0.37  cmd: dd 32247 [running] 0.91r 0.00u 0.88s 8% 2672k
149+0 records in
149+0 records out
156237824 bytes transferred in 0.922956 secs (169279818 bytes/sec)

load: 0.42  cmd: dd 32247 [running] 2.52r 0.00u 2.46s 21% 2676k
398+0 records in
398+0 records out
417333248 bytes transferred in 2.528253 secs (165067835 bytes/sec)
...

--
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"



___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Warner Losh
On Sat, Jun 27, 2020 at 8:50 AM Michael Gmelin  wrote:

>
>
> On Sat, 27 Jun 2020 06:21:17 -0700
> John Baldwin  wrote:
>
> > On 6/27/20 2:59 AM, Michael Gmelin wrote:
> > >
> > >
> > > On Sat, 27 Jun 2020 12:06:17 +0300
> > > Andriy Gapon  wrote:
> > >
> > >> On 27/06/2020 10:44, Li-Wen Hsu wrote:
> > >>> On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
> > >>>  wrote:
> > 
> >  Running poudriere on recent CURRENT with (recent) 12-STABLE and
> >  CURRENT jails reveals a weird behaviour recently when hitting
> >  Ctrl-T:
> > >>> ...
> >  Is this debug fallout from /bin/sh?
> > >>>
> > >>> It's because kern.tty_info_kstacks is on by default now:
> > >>>
> > >>> https://svnweb.freebsd.org/changeset/base/362141
> > >>
> > >> May I suggest that the stack trace is printed procstat -kk style
> > >> (single line) ? I think that the more compact output would be more
> > >> convenient.
> > >
> > > It's a cool feature and having it on by default on CURRENT certainly
> > > helps to discover it, which is great. Thanks for implementing this!
> > >
> > > I wouldn't enable it by default on RELEASE versions though, as
> > > CTRL-T is a user interface to get status information (at least this
> > > is how I use it personally, e.g., while running commands like
> > > dd[0], cp, mv, poudriere etc.), not for getting debug output.
> >
> > I agree with this.
> >
> > > Question: Speaking of discovering the feature, wouldn't it make
> > > sense to document this tunable on the stack(9) and/or tty(4) man
> > > page(s)?
> >
> > This sounds like a great idea.  Would you able to come up with a
> > patch? I'd be happy to review it.
>
> Sure, it actually seems like that termios(4) is the best
> place to put this information.
>
> https://reviews.freebsd.org/D25488


Damn, when I read this, I thought it was patches to control this on a
per-tty basis by putting it in termios... That would be even cooler :)

Warner
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Michael Gmelin



On Sat, 27 Jun 2020 06:21:17 -0700
John Baldwin  wrote:

> On 6/27/20 2:59 AM, Michael Gmelin wrote:
> > 
> > 
> > On Sat, 27 Jun 2020 12:06:17 +0300
> > Andriy Gapon  wrote:
> >   
> >> On 27/06/2020 10:44, Li-Wen Hsu wrote:  
> >>> On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
> >>>  wrote:
> 
>  Running poudriere on recent CURRENT with (recent) 12-STABLE and
>  CURRENT jails reveals a weird behaviour recently when hitting
>  Ctrl-T:
> >>> ...
>  Is this debug fallout from /bin/sh?
> >>>
> >>> It's because kern.tty_info_kstacks is on by default now:
> >>>
> >>> https://svnweb.freebsd.org/changeset/base/362141
> >>
> >> May I suggest that the stack trace is printed procstat -kk style
> >> (single line) ? I think that the more compact output would be more
> >> convenient.  
> > 
> > It's a cool feature and having it on by default on CURRENT certainly
> > helps to discover it, which is great. Thanks for implementing this!
> > 
> > I wouldn't enable it by default on RELEASE versions though, as
> > CTRL-T is a user interface to get status information (at least this
> > is how I use it personally, e.g., while running commands like
> > dd[0], cp, mv, poudriere etc.), not for getting debug output.  
> 
> I agree with this.
> 
> > Question: Speaking of discovering the feature, wouldn't it make
> > sense to document this tunable on the stack(9) and/or tty(4) man
> > page(s)?  
> 
> This sounds like a great idea.  Would you able to come up with a
> patch? I'd be happy to review it.

Sure, it actually seems like that termios(4) is the best
place to put this information.

https://reviews.freebsd.org/D25488

Best,
Michael

-- 
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Hartmann, O.
On Sat, 27 Jun 2020 06:21:17 -0700
John Baldwin  wrote:

> On 6/27/20 2:59 AM, Michael Gmelin wrote:
> > 
> > 
> > On Sat, 27 Jun 2020 12:06:17 +0300
> > Andriy Gapon  wrote:
> >   
> >> On 27/06/2020 10:44, Li-Wen Hsu wrote:  
> >>> On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
> >>>  wrote:
> 
>  Running poudriere on recent CURRENT with (recent) 12-STABLE and
>  CURRENT jails reveals a weird behaviour recently when hitting
>  Ctrl-T:
> >>> ...
>  Is this debug fallout from /bin/sh?
> >>>
> >>> It's because kern.tty_info_kstacks is on by default now:
> >>>
> >>> https://svnweb.freebsd.org/changeset/base/362141
> >>
> >> May I suggest that the stack trace is printed procstat -kk style
> >> (single line) ? I think that the more compact output would be more
> >> convenient.  
> > 
> > It's a cool feature and having it on by default on CURRENT certainly
> > helps to discover it, which is great. Thanks for implementing this!
> > 
> > I wouldn't enable it by default on RELEASE versions though, as
> > CTRL-T is a user interface to get status information (at least this
> > is how I use it personally, e.g., while running commands like
> > dd[0], cp, mv, poudriere etc.), not for getting debug output.  
> 
> I agree with this.
> 
> > Question: Speaking of discovering the feature, wouldn't it make
> > sense to document this tunable on the stack(9) and/or tty(4) man
> > page(s)?  
> 
> This sounds like a great idea.  Would you able to come up with a
> patch? I'd be happy to review it.
> 

Thanks for the explanation.

Regards,
oh


pgp47kg139VAL.pgp
Description: OpenPGP digital signature


Re: weird Ctrl-T debug messages

2020-06-27 Thread John Baldwin
On 6/27/20 2:59 AM, Michael Gmelin wrote:
> 
> 
> On Sat, 27 Jun 2020 12:06:17 +0300
> Andriy Gapon  wrote:
> 
>> On 27/06/2020 10:44, Li-Wen Hsu wrote:
>>> On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
>>>  wrote:  

 Running poudriere on recent CURRENT with (recent) 12-STABLE and
 CURRENT jails reveals a weird behaviour recently when hitting
 Ctrl-T:  
>>> ...  
 Is this debug fallout from /bin/sh?  
>>>
>>> It's because kern.tty_info_kstacks is on by default now:
>>>
>>> https://svnweb.freebsd.org/changeset/base/362141  
>>
>> May I suggest that the stack trace is printed procstat -kk style
>> (single line) ? I think that the more compact output would be more
>> convenient.
> 
> It's a cool feature and having it on by default on CURRENT certainly
> helps to discover it, which is great. Thanks for implementing this!
> 
> I wouldn't enable it by default on RELEASE versions though, as CTRL-T
> is a user interface to get status information (at least this is how I
> use it personally, e.g., while running commands like dd[0], cp, mv,
> poudriere etc.), not for getting debug output.

I agree with this.

> Question: Speaking of discovering the feature, wouldn't it make sense
> to document this tunable on the stack(9) and/or tty(4) man page(s)?

This sounds like a great idea.  Would you able to come up with a patch?
I'd be happy to review it.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Michael Gmelin



On Sat, 27 Jun 2020 12:06:17 +0300
Andriy Gapon  wrote:

> On 27/06/2020 10:44, Li-Wen Hsu wrote:
> > On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.
> >  wrote:  
> >>
> >> Running poudriere on recent CURRENT with (recent) 12-STABLE and
> >> CURRENT jails reveals a weird behaviour recently when hitting
> >> Ctrl-T:  
> > ...  
> >> Is this debug fallout from /bin/sh?  
> > 
> > It's because kern.tty_info_kstacks is on by default now:
> > 
> > https://svnweb.freebsd.org/changeset/base/362141  
> 
> May I suggest that the stack trace is printed procstat -kk style
> (single line) ? I think that the more compact output would be more
> convenient.

It's a cool feature and having it on by default on CURRENT certainly
helps to discover it, which is great. Thanks for implementing this!

I wouldn't enable it by default on RELEASE versions though, as CTRL-T
is a user interface to get status information (at least this is how I
use it personally, e.g., while running commands like dd[0], cp, mv,
poudriere etc.), not for getting debug output.

Getting debug information every time I want to get the status seems
like something that would make my user experience worse. I understand
that this can be disabled locally, but that's a bit like changing
the default syslog.conf to write messages of log level LOG_DEBUG
to /var/log/messages.

So, in the long run (before 13-RELEASE) I would prefer to disable it by
default again, but maybe alter the default sysctl.conf to contain:

# Uncomment this to show stack traces on SIGINFO (ctrl-t)
#kern.tty_info_kstacks=1

Question: Speaking of discovering the feature, wouldn't it make sense
to document this tunable on the stack(9) and/or tty(4) man page(s)?

Just my 2 cents

[0] Typical use case:

$ dd if=/dev/random of=/dev/da0 bs=1m

load: 0.37  cmd: dd 32247 [running] 0.91r 0.00u 0.88s 8% 2672k
149+0 records in
149+0 records out
156237824 bytes transferred in 0.922956 secs (169279818 bytes/sec)

load: 0.42  cmd: dd 32247 [running] 2.52r 0.00u 2.46s 21% 2676k
398+0 records in
398+0 records out
417333248 bytes transferred in 2.528253 secs (165067835 bytes/sec)
...

-- 
Michael Gmelin
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Andriy Gapon
On 27/06/2020 10:44, Li-Wen Hsu wrote:
> On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.  wrote:
>>
>> Running poudriere on recent CURRENT with (recent) 12-STABLE and CURRENT
>> jails reveals a weird behaviour recently when hitting Ctrl-T:
> ...
>> Is this debug fallout from /bin/sh?
> 
> It's because kern.tty_info_kstacks is on by default now:
> 
> https://svnweb.freebsd.org/changeset/base/362141

May I suggest that the stack trace is printed procstat -kk style (single line) ?
I think that the more compact output would be more convenient.


-- 
Andriy Gapon
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread myfreeweb



On June 27, 2020 7:04:06 AM UTC, "Hartmann, O."  wrote:
>Running poudriere on recent CURRENT with (recent) 12-STABLE and CURRENT
>jails reveals a weird behaviour recently when hitting Ctrl-T:
>
>[...]
>
>[13:37:48] [01] [00:00:00] Building databases/sqlitestudio |
>sqlitestudio-3.2.1.1002 load: 26.95  cmd: sh 99331 [piperd] 49375.18r
>0.59u 0.59s 0% 2144k #0 0x80924ace at mi_switch+0xbe
>#1 0x809781d4 at sleepq_catch_signals+0x4a4
>#2 0x80977d19 at sleepq_wait_sig+0x9
>#3 0x809241ad at _sleep+0x1ad
>#4 0x8098ae5a at pipe_read+0x43a
>#5 0x80987a85 at dofileread+0x85
>#6 0x8098766f at sys_read+0xcf
>#7 0x80d70229 at amd64_syscall+0x119
>#8 0x80d47bf0 at fast_syscall_common+0x101
>
>Is this debug fallout from /bin/sh?

Haha, no (how would /bin/sh affect all programs?)

It's kern.tty_info_kstacks now being on by default in current. It's very useful 
(not when running poudriere, but when investigating hanging programs) and I 
probably wouldn't have ever discovered it without the commit making it default.
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: weird Ctrl-T debug messages

2020-06-27 Thread Li-Wen Hsu
On Sat, Jun 27, 2020 at 3:04 PM Hartmann, O.  wrote:
>
> Running poudriere on recent CURRENT with (recent) 12-STABLE and CURRENT
> jails reveals a weird behaviour recently when hitting Ctrl-T:
...
> Is this debug fallout from /bin/sh?

It's because kern.tty_info_kstacks is on by default now:

https://svnweb.freebsd.org/changeset/base/362141

Li-Wen
___
freebsd-current@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


weird Ctrl-T debug messages

2020-06-27 Thread Hartmann, O.
Running poudriere on recent CURRENT with (recent) 12-STABLE and CURRENT
jails reveals a weird behaviour recently when hitting Ctrl-T:

[...]

[13:37:48] [01] [00:00:00] Building databases/sqlitestudio |
sqlitestudio-3.2.1.1002 load: 26.95  cmd: sh 99331 [piperd] 49375.18r
0.59u 0.59s 0% 2144k #0 0x80924ace at mi_switch+0xbe
#1 0x809781d4 at sleepq_catch_signals+0x4a4
#2 0x80977d19 at sleepq_wait_sig+0x9
#3 0x809241ad at _sleep+0x1ad
#4 0x8098ae5a at pipe_read+0x43a
#5 0x80987a85 at dofileread+0x85
#6 0x8098766f at sys_read+0xcf
#7 0x80d70229 at amd64_syscall+0x119
#8 0x80d47bf0 at fast_syscall_common+0x101

Is this debug fallout from /bin/sh?

Kind regards,

oh


pgpyb1uNGroDb.pgp
Description: OpenPGP digital signature