Index | Thread | Search

From:
James Cook <falsifian@falsifian.org>
Subject:
Re: mosh aborts with pledge failure after network interruption or SIGSTOP
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
ports@openbsd.org, Jeremie Courreges-Anglas <jca@wxcvbn.org>
Date:
Thu, 10 Sep 2026 18:56:20 +0000

Download raw body.

Thread
"Theo de Raadt" <deraadt@openbsd.org> wrote:
> James Cook <falsifian@falsifian.org> wrote:
> 
> > "Theo de Raadt" <deraadt@openbsd.org> wrote:
> > > 105 is setsockopt
> > > 
> > > Please ktrace -di, and kdump to identify the parameters to the final setsockopt
> > > before it gets pledge SIGABRT.
> > > 
> > > The first argument to setsockopt is the socket fd, and it has 2 arguments
> > > are level and optname.
> > > 
> > > Scan up the kdump manually to see how that fd is allocated.  My guess is that
> > > this socket is created as AF_INET6, and the setsockopt parameters are IP_TOS.
> > > But this could be another new setsockopt that also needs bypass treatment in
> > > pledge.
> > > 
> > > Show the combination of proto, level, and optname.
> > > 
> > > Please don't send a massive kdump.  Try to do what I've explained.
> > 
> > Here are the last few lines of output from kdump:
> > 
> >  26783 mosh-client CALL  socket(AF_INET6,0x2<SOCK_DGRAM>,0)
> >  26783 mosh-client RET   socket 5
> >  26783 mosh-client CALL  setsockopt(5,0<ip>,3,0x7207d0cea92c,4)
> >  26783 mosh-client PLDG  setsockopt, "inet", errno 1 Operation not permitted
> >  26783 mosh-client PSIG  SIGABRT SIG_DFL
> > 
> > Looks like you were right; 3 is IP_TOS.
> 
> OK.  Try the newest snapshot please.

With the newest snapshot, the problem is gone, thanks.

$ sysctl kern.version
kern.version=OpenBSD 8.0-beta (GENERIC.MP) #31: Thu Sep 10 08:45:41 MDT 2026
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP

-- 
James