From ecbdb8486e1ec45a839ef09c174036126ef6e29a Mon Sep 17 00:00:00 2001 From: touka shiro Date: Sun, 27 Sep 2026 12:22:47 -0400 Subject: [PATCH] =?UTF-8?q?ci:=201=20=E4=B8=87=E3=83=9D=E3=83=BC=E3=83=88?= =?UTF-8?q?=E3=81=AE=E7=AF=84=E5=9B=B2=E3=81=AE=E7=A2=BA=E8=AA=8D=E3=82=92?= =?UTF-8?q?=E3=80=81=E3=83=AB=E3=83=BC=E3=83=AB=E3=81=AE=E3=82=BD=E3=82=B1?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=81=AE=E6=95=B0=E3=81=A7=E6=95=B0=E3=81=88?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 開いているファイルの数の差で数えていたため、ほかの接続がその間に閉じると 9999 になり、たまたま落ちることがあった(#109 の CI)。範囲のポートで rproxy が開いている UDP のソケットを ss で数える。 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01UyWFKfK7QhjFLgRBF1V9Bu --- scripts/interop/media.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/interop/media.sh b/scripts/interop/media.sh index af2169c..2414c48 100755 --- a/scripts/interop/media.sh +++ b/scripts/interop/media.sh @@ -138,11 +138,13 @@ rule '{"protocol":"udp","listen_addr":"127.0.0.1","listen_port":2000,"listen_por ms=$(( ($(date +%s%N) - start) / 1000000 )) during_fds=$(fds) during_rss=$(rss) +# count the rule's own sockets: the fd total also moves when other connections close meanwhile +range_socks=$(sudo ss -Hunlp 'sport >= :2000 and sport <= :11999' | grep -c 'rproxy-api' || true) curl -s -o /dev/null -X DELETE "$API/rules/udp/127.0.0.1/2000" sleep 1 after_fds=$(fds) -echo "range 10000 ports: created in ${ms} ms; fds ${before_fds} -> ${during_fds} -> ${after_fds}; RSS ${before_rss} -> ${during_rss} kB" -[ $((during_fds - before_fds)) -ge 10000 ] || fail "the range did not open 10000 sockets" +echo "range 10000 ports: created in ${ms} ms; sockets ${range_socks}; fds ${before_fds} -> ${during_fds} -> ${after_fds}; RSS ${before_rss} -> ${during_rss} kB" +[ "$range_socks" -ge 10000 ] || fail "the range did not open 10000 sockets" [ $((after_fds - before_fds)) -lt 50 ] || fail "sockets were not released after DELETE" [ "$ms" -lt 30000 ] || fail "creating the range took ${ms} ms" [ $((during_rss - before_rss)) -lt 262144 ] || fail "the range took more than 256 MiB"