Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-20 Thread Todd C . Miller
On Tue, 20 Sep 2022 08:50:10 +0200, Florian Obser wrote:

> Is this somehow coming from the non-blocking connect diff? I can't spot
> it though...

I don't think so, the ktrace shows that read(2) is returning 0 long
after connect.  If the socket was left in non-blocking mode I could
see that causing problems but the file flags get restored.

 - todd



Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-20 Thread Theo de Raadt
Florian Obser  wrote:

> On 2022-09-19 22:27 +02, Hrvoje Popovski  wrote:
> > Hi all,
> >
> > when doing sysupgrade few minutes ago on multiple machines i'm getting
> > error in subject
> >
> > smc24# sysupgrade -s
> > Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
> > SHA256.sig   100% |*|
> > 2144   00:00
> > Signature Verified
> > INSTALL.amd64 100% ||
> > 43554   00:00
> > base72.tgz   100% |*|
> > 331 MB00:16
> > bsd  100% |*|
> > 22449 KB00:05
> > bsd.mp   100% |*|
> > 22562 KB00:04
> > bsd.rd   100% |*|
> > 4533 KB00:01
> > comp72.tgz   100% |*|
> > 74598 KB00:09
> > game72.tgz   100% |*|
> > 2745 KB00:01
> > man72.tgz100% |*|
> > 7610 KB00:02
> > xbase72.tgz   29% |**   |
> > 15744 KB00:14 ETAsysupgrade: Reading from socket: Undefined error: 0
> > smc24#
> >
> 
> Is this somehow coming from the non-blocking connect diff? I can't spot
> it though...

This was reproduced with ktrace.  It was a read() on the TLS socket, returning
0, or EOF.  Thus, errno is irrelevant.  The error printing code is being
dumb by printing this as an error.  But anyways, the connection was terminated,
and ...



Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-20 Thread Hrvoje Popovski
On 20.9.2022. 8:50, Florian Obser wrote:
> On 2022-09-19 22:27 +02, Hrvoje Popovski  wrote:
>> Hi all,
>>
>> when doing sysupgrade few minutes ago on multiple machines i'm getting
>> error in subject
>>
>> smc24# sysupgrade -s
>> Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
>> SHA256.sig   100% |*|
>> 2144   00:00
>> Signature Verified
>> INSTALL.amd64 100% ||
>> 43554   00:00
>> base72.tgz   100% |*|
>> 331 MB00:16
>> bsd  100% |*|
>> 22449 KB00:05
>> bsd.mp   100% |*|
>> 22562 KB00:04
>> bsd.rd   100% |*|
>> 4533 KB00:01
>> comp72.tgz   100% |*|
>> 74598 KB00:09
>> game72.tgz   100% |*|
>> 2745 KB00:01
>> man72.tgz100% |*|
>> 7610 KB00:02
>> xbase72.tgz   29% |**   |
>> 15744 KB00:14 ETAsysupgrade: Reading from socket: Undefined error: 0
>> smc24#
>>
> 
> Is this somehow coming from the non-blocking connect diff? I can't spot
> it though...
> 

I've managed to reproduce it only once. After that on all machines in my
lab sysupgrade is working as expected.



Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-20 Thread Florian Obser
On 2022-09-19 22:27 +02, Hrvoje Popovski  wrote:
> Hi all,
>
> when doing sysupgrade few minutes ago on multiple machines i'm getting
> error in subject
>
> smc24# sysupgrade -s
> Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
> SHA256.sig   100% |*|
> 2144   00:00
> Signature Verified
> INSTALL.amd64 100% ||
> 43554   00:00
> base72.tgz   100% |*|
> 331 MB00:16
> bsd  100% |*|
> 22449 KB00:05
> bsd.mp   100% |*|
> 22562 KB00:04
> bsd.rd   100% |*|
> 4533 KB00:01
> comp72.tgz   100% |*|
> 74598 KB00:09
> game72.tgz   100% |*|
> 2745 KB00:01
> man72.tgz100% |*|
> 7610 KB00:02
> xbase72.tgz   29% |**   |
> 15744 KB00:14 ETAsysupgrade: Reading from socket: Undefined error: 0
> smc24#
>

Is this somehow coming from the non-blocking connect diff? I can't spot
it though...

-- 
I'm not entirely sure you are real.



Re: sysupgrade - Reading from socket: Undefined error: 0

2022-09-19 Thread Hrvoje Popovski
On 19.9.2022. 22:27, Hrvoje Popovski wrote:
> Hi all,
> 
> when doing sysupgrade few minutes ago on multiple machines i'm getting
> error in subject
> 
> smc24# sysupgrade -s
> Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
> SHA256.sig   100% |*|
> 2144   00:00
> Signature Verified
> INSTALL.amd64 100% ||
> 43554   00:00
> base72.tgz   100% |*|
> 331 MB00:16
> bsd  100% |*|
> 22449 KB00:05
> bsd.mp   100% |*|
> 22562 KB00:04
> bsd.rd   100% |*|
> 4533 KB00:01
> comp72.tgz   100% |*|
> 74598 KB00:09
> game72.tgz   100% |*|
> 2745 KB00:01
> man72.tgz100% |*|
> 7610 KB00:02
> xbase72.tgz   29% |**   |
> 15744 KB00:14 ETAsysupgrade: Reading from socket: Undefined error: 0
> smc24#
> 

If I run it again sysupgrade seems fine

smc24# sysupgrade -s
Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
SHA256.sig   100% |*|
2144   00:00
Signature Verified
Verifying old sets.
xbase72.tgz  100% |*|
52806 KB00:07
xfont72.tgz  100% |*|
22967 KB00:05
xserv72.tgz  100% |*|
14815 KB00:03
xshare72.tgz 100% |*|
4559 KB00:01
Verifying sets.
Fetching updated firmware.
fw_update: added none; updated none; kept vmm
Upgrading.



sysupgrade - Reading from socket: Undefined error: 0

2022-09-19 Thread Hrvoje Popovski
Hi all,

when doing sysupgrade few minutes ago on multiple machines i'm getting
error in subject

smc24# sysupgrade -s
Fetching from https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/
SHA256.sig   100% |*|
2144   00:00
Signature Verified
INSTALL.amd64 100% ||
43554   00:00
base72.tgz   100% |*|
331 MB00:16
bsd  100% |*|
22449 KB00:05
bsd.mp   100% |*|
22562 KB00:04
bsd.rd   100% |*|
4533 KB00:01
comp72.tgz   100% |*|
74598 KB00:09
game72.tgz   100% |*|
2745 KB00:01
man72.tgz100% |*|
7610 KB00:02
xbase72.tgz   29% |**   |
15744 KB00:14 ETAsysupgrade: Reading from socket: Undefined error: 0
smc24#