Subject: Re: onlinedeadline prevents checksum from running

From: Sergey Matveev <[email-masked]>
Date: Sun, 30 May 2021 19:53:44 +0300

Greetings!

*** John Goerzen [2021-05-09 21:22]:
>why it got interrupted -- it seems maybe a locking issue with nncp-toss
>-- but anyhow, it did.  I was running nncp-call -onlinedeadline 10 in a loop
>(making sure to download all the packets from the remote).  I noticed it
>wasn't progressing -- getting about 2GB in and then hanging.  Why was that?

While trying to hang it up, I met that occasions several times when my
CPU and HDD were heavily pressured, especially with ZFS filesystem and
vfs.zfs.dirty_data_sync=2GiB -- it can buffer up to 2GiB of data, before
trying to release it to the disk. In that cases NNCP timeout can occur.
But that is just highly loaded system and far from being real-time Go's
goroutines scheduling.

>I think there needs to be logic that the checksumming of a completed packet
>doesn't get interrupted by the onlinedeadline, since it could take
>significantly longer than one might tend to set the onlinedeadline for.

I will add waiting of checksumming in next releases. If someone does not
want it, then he should use -nock anyway.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: CF60 E89A 5923 1E76 E263  6422 AE1A 8109 E498 57EF