Bug 276852

Summary: Intermittent file truncation when fetched from port builder servers
Product: Services Reporter: Yuri Victorovich <yuri>
Component: Core InfrastructureAssignee: Cluster Admin <clusteradm>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: philip
Priority: ---    
Version: unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
run.sh none

Description Yuri Victorovich freebsd_committer freebsd_triage 2024-02-06 08:55:19 UTC
Please run the attached script that fetches the URL through the Tor SOCKS5 proxy.

Most transfers are like the first and the third below, but for some of them the socket is closed in the middle like the second one.

100 5982k  100 5982k    0     0  1035k      0  0:00:05  0:00:05 --:--:-- 1195k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 30 5982k   30 1798k    0     0   153k      0  0:00:39  0:00:11  0:00:28  1099
curl: (18) transfer closed with 4284491 bytes remaining to read
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 5982k  100 5982k    0     0   498k      0  0:00:11  0:00:11 --:--:--  482k
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-02-06 08:58:02 UTC
Created attachment 248216 [details]
run.sh

This script fetches many times from the same URL.
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-02-06 09:01:34 UTC
For the context:
This file is periodically re-written by poudriere.
It's possible that the failure occurs when poudriere re-writes the file.
However, poudriere uses the rename(2) function to replace the file, which is supposed to be atomic.
Comment 3 Philip Paeps freebsd_committer freebsd_triage 2024-02-06 09:20:07 UTC
Does this problem happen without your SOCKS5 proxy?
Comment 4 Philip Paeps freebsd_committer freebsd_triage 2024-02-06 09:21:34 UTC
Tried your script without a proxy.  Cannot reproduce.  Not our problem.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2024-02-06 09:37:00 UTC
How can I try it without a proxy?
Does this server have an IPv4 address?
Comment 6 Philip Paeps freebsd_committer freebsd_triage 2024-02-06 09:43:05 UTC
Our builders only use 21st century IP addresses.

https://pkg-status.freebsd.org is also reachable from 20th century IP.

E.g. https://pkg-status.freebsd.org/ampere3/.