user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: "Štěpán Němec" <stepnem@smrk.net>
Cc: meta@public-inbox.org
Subject: Re: OpenBSD debugging
Date: Wed, 29 Nov 2023 22:38:16 +0000	[thread overview]
Message-ID: <20231129223816.M525917@dcvr> (raw)
In-Reply-To: <20231023222143+0200.165893-stepnem@smrk.net>

Štěpán Němec <stepnem@smrk.net> wrote:
> 
> I apologize for the late response.

No worries, I still have mails in other places from months
ago I've been meaning to get to :x

> On Mon, 23 Oct 2023 19:58:18 +0000
> Eric Wong wrote:
> 
> > Thanks for the info.  Just curious, what HW specs (ncpus, RAM)
> > is available on that system?  I wonder if that affects timing
> > somehow...
> 
> dmesg:
> https://dmesgd.nycbug.org/index.cgi?do=view&id=7357
> ncpus = 2 (so it's running the MP (multiprocessor) kernel), 1GB RAM

Alright, will keep that in mind.  OpenBSD doesn't seem to
benefit from having many cores and I stress out about the
test suite taking ~30s on my fastest HW.

> > Unfortunately, my *BSD debugging knowledge is far behind my
> > Linux; so I'm not sure how much help it'd be...
> 
> If nothing else, you could do some tests on an otherwise
> idle machine with good Internet connectivity (unless the
> connection issues you keep mentioning are mainly on your
> end, that is).

Yeah, it's mainly on my end, but seems improved in the past
2 weeks or so.

> > Some examples of things I miss on OpenBSD:
> >
> > * /proc/$PID/fdinfo/$FD_OF_EPOLL on Linux is immensely helpful
> >   for knowing what and how epoll is watching target FDs.  I'm
> >   not sure if there's a way to introspect kqueue like that
> 
> Yeah, most likely there isn't, though I'm not quite sure
> what exactly "like that" entails.  Care to expand a bit upon
> the immense usefulness mentioned, i.e., how this helps you
> specifically?

Knowing which EVFILT_*  and EV_* flags are in use for a
given target FD would be useful (analogous to the single
events: field printed in /proc/$pid/fdinfo/$epfd that
corresponds to struct epoll_event.events)

> OpenBSD fstat(1) prints the kqueue memory addresses, so I
> suppose a sufficiently determined individual could get
> arbitrary info from the running kernel based on that,
> although at that point there are probably better ways to get
> the address than running fstat...

I'll have to remember that next time I need to and RTFM for it.
I didn't know about the fstat(1) command until a few weeks ago
(horrible naming conflict with the fstat(2) syscall didn't
help with discovery)

<snip>  I'll keep the rest in mind next time I need it.

> > * Linux strace decodes more struct args info than kdump
> 
> strace is certainly more featureful, though in the specific
> case of kqueue/kevent I think kdump does show everything one
> would expect to see?

Ah, I think I was going off my FreeBSD experience, there;
OpenBSD does seem to decode sendmsg/recvmsg args well.
FreeBSD doesn't tell me which FDs are being sent/received
via SCM_RIGHTS, maybe that's improved in FreeBSD 14...

But yeah, still lots of work to do elsewhere; but OpenBSD seems
like an important driver in keeping Perl5 stable and
widely-installed.  *BSDs in general have been great at finding
bugs that might eventually impact my GNU/Linux systems.

      reply	other threads:[~2023-11-29 22:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18 15:01 imapd.t failing on OpenBSD, bisects to 13a2088c74fd (kqnotify: drop EV_CLEAR (edge triggering)) Štěpán Němec
2023-10-18 19:06 ` Eric Wong
2023-10-18 19:18   ` Štěpán Němec
2023-10-18 21:23     ` Eric Wong
2023-10-19  8:43       ` Štěpán Němec
2023-10-23 19:58         ` Eric Wong
2023-11-27 11:20           ` OpenBSD debugging Štěpán Němec
2023-11-29 22:38             ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231129223816.M525917@dcvr \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    --cc=stepnem@smrk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).