Stabilize tls_stress_test metrics queries under exhausted session caps
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- networking, testing-qa
Hướng nghiên cứu
Bắt đầu trong tests/connections.py tại get_session_metrics(), run_connection_caps_tests() và hàm lồng nhau create_connections_until_exhaustion(), sau đó kiểm tra tests/infra/clients.py về việc chuyển đổi httpx.ReadError. Chạy tls_stress_test nhiều lần thông qua tests.sh trên Azure Linux 4 và xác định hành vi dự kiến của các session hiện có khi đạt đến các cap. Hoàn thành khi các lỗi metric nhất thời không còn khiến test bị flaky, trong khi các assertion về session đang hoạt động, đỉnh, soft-cap và hard-cap vẫn có thể xử lý được.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
tls_stress_test is intermittently failing in AL4 VMSS Virtual C while the
connection-cap scenario deliberately exhausts sessions and file descriptors.
After expected connection failures, the test performs an unguarded
GET /node/metrics through clients[0]. That request may be reset or receive
503 SessionCapExhausted, failing the whole CI job.
This has occurred on unrelated PRs and predates the PR where it was most
recently observed.
Most recent occurrence
- PR: https://github.com/microsoft/CCF/pull/8165
- Failed job:
https://github.com/microsoft/CCF/actions/runs/32135397827/job/95705417848 - Workflow/job:
Continuous Integration AL4/AL4 VMSS Virtual C - Test:
tls_stress_test - Failure path:
tests/connections.py:231 run_connection_caps_tests
tests/connections.py:176 create_connections_until_exhaustion
r = clients[0].get("/node/metrics")
tests/infra/clients.py:696
raise CCFIOException from exc
infra.clients.CCFIOException
The underlying exception was:
ConnectionResetError: [Errno 104] Connection reset by peer
httpx.ReadError: [Errno 104] Connection reset by peer
The normal VMSS Virtual C job passed on the same PR commit; only the AL4 job
failed:
- Passed:
https://github.com/microsoft/CCF/actions/runs/32135397799/job/95705418136 - Failed:
https://github.com/microsoft/CCF/actions/runs/32135397827/job/95705417848
Evidence that this is pre-existing and intermittent
The same request at tests/connections.py:176 failed with
infra.clients.CCFIOException on July 26:
- Historical job:
https://github.com/microsoft/CCF/actions/runs/30214888955/job/89827281197 - Unrelated recovery PR:
https://github.com/microsoft/CCF/pull/8092
That recovery PR did not modify tests/connections.py or the TLS/session-cap
implementation. Its preceding AL4 run passed, this run failed, and its next 11
AL4 runs passed without a change to tests/connections.py.
Related failures in the same connection-cap scenario have also returned
503 SessionCapExhausted from metrics queries:
- https://github.com/microsoft/CCF/actions/runs/30554767740/job/90912282664
- https://github.com/microsoft/CCF/actions/runs/30549183462/job/90893078340
- https://github.com/microsoft/CCF/actions/runs/30535447937/job/90847555194
The metrics request at tests/connections.py:176 dates from 2021. The loop
immediately before it already treats CCFConnectionException,
CCFIOException, and RuntimeError as expected while searching for the
session/file-descriptor limit, but the subsequent metrics request has no
equivalent handling.
Relevant code
tests/connections.pyget_session_metrics()run_connection_caps_tests()- nested
create_connections_until_exhaustion() - particularly the unguarded
clients[0].get("/node/metrics")
tests/infra/clients.py- conversion of
httpx.ReadErrortoCCFIOException
- conversion of
Investigation notes
Determine which invariant is intended:
- An already admitted session must remain usable while new sessions are
rejected. If so, the reset/503 may expose a CCF session-cap bug and the test
should retain a strict assertion. - A reset or temporary 503 is valid while the test is deliberately exhausting
file descriptors and session caps. If so, the test should explicitly wait
for cap state to settle and retry the metrics query using an appropriate
existing session, rather than failing on a timing-dependent request.
Avoid simply swallowing the exception. Preserve the assertions on active/peak
session metrics and ensure a persistent inability to query metrics still fails
with useful diagnostics.
Also check whether the test should use the existing get_session_metrics()
helper consistently rather than making a separate direct request.
Suggested validation
- Build Debug on Azure Linux 4, matching the failing workflow.
- Run
tls_stress_testrepeatedly through the repositorytests.shwrapper. - Confirm the connection-cap assertions still detect real cap regressions.
- Confirm transient reset/503 behavior no longer fails the test if it is
considered valid. - Run the complete AL4 bucket C job.
Acceptance criteria
- The intended behavior of existing sessions at the soft/hard cap is explicit
in the test. tls_stress_testis stable under repeated AL4 runs.- Persistent metrics-query failure remains actionable and fails the test.
- Session active/peak/soft-cap/hard-cap assertions are preserved.
- Ngôn ngữ chính
- C++
- Star
- 876
- Fork
- 264
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 138
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/CCF
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
raft.h hardeningĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoft/CCF#8606 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
microsoft/CCF#8184 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của microsoft/CCF
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
NVIDIA-Omniverse/PhysX#590 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/rocketmq-clients#1469 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 9 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
compiler-explorer/compiler-explorer#9402 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
自定义颜色添加为常用颜色Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
mg-chao/snow-apps#2227 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày