Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
status: open
kind: finding
kind: defect
opened: 2026-09-08
---

Expand All @@ -26,3 +26,14 @@ answer; what it costs to leave is that the one caller of `getsockname` in a
POSIX program is the one that then advertises an address nothing can reach.
Nothing in the tree reads it today, which is why this is a finding and not a
defect.

**Now a defect, 2026-11-01.** std carries the same literal:
`sdk/std/sys/net/connection.rs`'s `TcpStream::socket_addr` answers
`10.0.2.15` with the stream's local port. Since #1122, osbench's
`sys::link_of` names a connection's link by its local address, so on any
network that leases another address `osbench_lan` refuses the group. The
T14 session for the ramp issue read `bench=lan refused=no_netstack_link_holds_10.0.2.15`
on a lease from the bench's router. QEMU's guest test passes only because
slirp leases that address. The fix gives a stream's local address with
its port: netstack's connect and accept answers carry it, and the SDK's
`stream::endpoints`, std and libc return it.
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,25 @@ receiver's window growth, which both senders share.
(`peer_received_by_<ms>ms_bytes`), so a session gives five connections a
run and the run's own spread.

**The exit's first session read no ToyOS row, 2026-11-01**
([evidence](https://github.com/ToyOSOrg/evidence/tree/35f09268e09714a8547496bdd766bcd3ca998325/r1)). This was Linux, ToyOS at `4f52c3056`, Linux, all
exiting 0. ToyOS's `osbench_lan` found the peer and then refused the group:
`no netstack link holds 10.0.2.15`. std's `TcpStream::local_addr` answers
QEMU's user-network address whatever the lease is, and since #1122 osbench
names a connection's link by that address. The T14's lease is not it. So the
session does not decide, and the next one waits on
`issues/getsockname-answers-an-address-nobody-asked-netstack-for.md`.

Its Linux runs do give the per-connection spread the rule needs:

- p50 113 and 113 MB/s.
- At 100 ms the rounds ran 5.82–6.63 MB and 5.13–6.38 MB, a standard
deviation of 478 KB over the ten. The parity boot's 30 KB miss is a
sixteenth of that.
- At 300 ms they ran 28.8–30.0 MB and 27.7–29.7 MB.
- The two runs do not differ: the two-sided rank test gives p = 0.69 at
100 ms and 0.42 at 300 ms. So the rule's exchangeability check passes.

**Exit**: in one T14 session, Linux, ToyOS, Linux, `osbench_lan`'s
`lan.wired.tcp.upload` reads:

Expand Down