fix(daemon): on Linux a forward wall-clock step may make a live daemon's own lock read as stale
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
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- go, linux
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Start in internal/daemon/procstart_linux.go, where processStartTime combines btime from /proc/stat with the start tick from /proc/<pid>/stat, and check the lock and registry staleness comparison that uses procStartTimeSlack. First confirm the wall-clock step effect by reading btime before and after a 10 s forward step on Linux. Done means either a corroboration check against the start tick count for same-boot records, or a documented limit next to procStartTimeSlack, with the fix confirmed in the daemon tests.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happens
On Linux, processStartTime (internal/daemon/procstart_linux.go) works out a process's start time when it reads it: btime from /proc/stat plus the tick count from /proc/<pid>/stat. The kernel computes btime from the current wall-clock offset, so a step of the wall clock moves it. Two examples of such a step are an NTP step and a WSL2 resume.
After a forward step of more than procStartTimeSlack (5 s), a live daemon's own lock and registry record would read as stale. Another acquire would then remove the lock (INDX-05), and List would prune the record.
This is unconfirmed: it comes from reading the code, not from a reproduction. The problem predates #146. The #146 change narrows it, because after a backward step the record now corroborates.
To confirm
- On Linux, read
btimefrom/proc/stat. - Step the wall clock forward 10 s.
- Read
btimeagain and compare.
What should happen
If this is confirmed, corroborate a record from the same boot against a value that a clock step does not move, for example the start tick count. Otherwise, document the limit next to procStartTimeSlack.
Refs #146.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Go
- Star
- 0
- Fork
- 0
- Merge trung bình
- 7 giờ 42 phút
- Pull request đã merge (30 ngày)
- 111
Chuẩn bị môi trường
- 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 seanb4t/codegraph-go
-
chore needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
seanb4t/codegraph-go#380 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
seanb4t/codegraph-go#379 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query chore needs-triage spec-needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
seanb4t/codegraph-go#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
chore needs-triage
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
seanb4t/codegraph-go#362 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:query bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
seanb4t/codegraph-go#355 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của seanb4t/codegraph-go
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
Maintainer thường phản hồi trong vòng 1 ngày
-
automated documentation maintenance
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
github/gh-aw-mcpg#16717 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: Recording rules pages don't say what happens to a recorded metric when its rule is deletedĐang mởinternal
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
jesseduffield/lazygit#6229 ·
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 72/100
prometheus/prometheus#20482 ·
Maintainer thường phản hồi trong vòng 2 ngày