Flaky SQLite test: caller_deadline_caps_open_startup_execution_and_async_execution sees Timeout instead of TimeBudgetExceeded
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
Hướng nghiên cứu
Bắt đầu trong crates/registry-platform-sqlite/src/statement.rs: đọc assertion đang thất bại gần dòng 1427 rồi đến execute_until, đặc biệt là việc chờ permit gần dòng 393 và ánh xạ tokio::time::timeout_at sang Timeout gần dòng 418. Quyết định xem việc hết hạn caller-deadline bất đồng bộ cũng nên báo TimeBudgetExceeded hay test nên chấp nhận một trong hai kết quả, sau đó chạy cargo test -p registry-platform-sqlite statement::tests::caller_deadline_caps_open_startup_execution_and_async_execution lặp lại, lý tưởng nhất là dưới tải. Hoàn tất nghĩa là test không còn phụ thuộc vào bên nào thắng cuộc đua và vẫn chứng minh rằng deadline ngắt công việc đang chạy.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
The Rust tests (platform) job failed in the merge group for #2727 (run 44767589662, 20 Nov 2026). #2727 does not touch registry-platform-sqlite. The next merge-group run for the same PR passed, and #2727 merged.
test statement::tests::caller_deadline_caps_open_startup_execution_and_async_execution ... FAILED
panicked at crates/registry-platform-sqlite/src/statement.rs:1427:9:
assertion `left == right` failed
left: Timeout
right: TimeBudgetExceeded
test result: FAILED. 7 passed; 1 failed; 0 ignored
Likely cause
The failing assertion is the last one in the test. It calls execute_before with a caller deadline 1 ms away and expects TimeBudgetExceeded.
In execute_until, two observers watch the same deadline:
- The blocking worker runs the statement, and SQLite's progress check stops it at the deadline. That returns
TimeBudgetExceeded. - The async side waits for the worker with
tokio::time::timeout_at(async_deadline, execution), and maps expiry toTimeout(line 418). The permit wait at line 393 does the same.
When the worker has not returned its result by the time the timer fires, the async side reports Timeout. With a 1 ms deadline this depends on how quickly the blocking thread starts and notices the deadline, so a loaded runner can lose the race. The synchronous startup case (line 1417) has no async timer and is not affected.
The known consumer maps both kinds to the same code: registry-adapter-engine reports Timeout and TimeBudgetExceeded as adapter.sqlite.statement-budget. So this looks like a test race rather than a defect that users would see.
Suggested fix
One of:
- In the test, accept either
TimeoutorTimeBudgetExceededfor the 1 ms async case. Both show that the caller deadline stopped the work. - If one kind per cause is the intended contract, map expiry of the caller's deadline on the async side to
TimeBudgetExceededas well, and keep the strict assertion.
Do not lengthen the deadline to hide the race. The test is meant to prove the deadline interrupts running work.
Impact
Merge-queue entries that select the platform Rust tests can be dropped. Rerunning the entry has passed so far.
- Ngôn ngữ chính
- Rust
- Star
- 2
- Fork
- 0
- Merge trung bình
- 9 giờ 48 phút
- Pull request đã merge (30 ngày)
- 151
Chuẩn bị môi trường
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 registrystack/registry-stack
-
area:breg enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
registrystack/registry-stack#2765 ·
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 62/100
registrystack/registry-stack#2761 ·
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 76/100
registrystack/registry-stack#2706 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
macOS contributor gates: Messaging config tests fail under the symlinked macOS temporary directoryĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
registrystack/registry-stack#2704 ·
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 75/100
registrystack/registry-stack#2698 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của registrystack/registry-stack
Issue tương tự
-
[Bug] 建议把黑白主题设置同步到启动页面Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
AstrBotDevs/AstrBot-desktop#197 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
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 68/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
stackabletech/airflow-operator#898 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
2 advisory ignore entries no longer match anything (`bytes`, `time` already patched in `Cargo.lock`)Có thể đã có người làm @zyl71 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100