Synchronisation of `wait()` and `kill()`
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ó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
The issue names no files, tests or entry points, so first find where the worker threads call kill() and where the OS handler calls wait(). The open question is the synchronization design: the issue asks that the two never run at the same time for the same process identifier, and that a worker which loses the race backs out. Done means the design is agreed, the race is covered by a test, and a worker that loses the race leaves no stray kill().
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What
My understanding of POSIX is as follows:
When a process has terminated, it stays in the kernel's table as a zombie process until the parent has read its exit status using wait(). As soon as wait() returns, the kernel is free to delete the process and reuse its identifier.
Therefore, if we attempt to call kill() after wait(), there is a chance that we kill some completely unrelated process.
Although process identifiers are usually sequential, making this very unlikely, there is nothing which says they must be allocated that way. And even if they are, the point where the number wraps around can be arbitrarily low.
Acceptance Criteria (DoD)
- Use of invalid process identifiers is prevented
How
If my understanding is correct, then we must guarantee that these do not happen simultanously:
- Worker threads calling
kill() - The OS handler calling
wait()
If kill() goes first, it will find the zombie process and return ESRCH. We already handle this case properly.
If wait() goes first, and a worker thread is waiting to kill() the same identifier, the worker thread must back out without doing anything.
- Ngôn ngữ chính
- C++
- Star
- 6
- Fork
- 35
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 93
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
- Không 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 eclipse-score/lifecycle
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
eclipse-score/lifecycle#407 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
cleanup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
eclipse-score/lifecycle#375 ·
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
eclipse-score/lifecycle#817 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
eclipse-score/lifecycle#815 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 54/100
eclipse-score/lifecycle#814 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của eclipse-score/lifecycle
Issue tương tự
-
needs-format
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 69/100
Niko1221/Strata#3368 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
dragonflydb/dragonfly#8617 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] lock-app: endpoint 0 has the OTA Requestor cluster without the OTA Requestor device typeĐang mởbug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
project-chip/connectedhomeip#74842 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
drivedb: TOSHIBA HDWG82CUZSVBĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
smartmontools/smartmontools#670 ·
Maintainer thường phản hồi trong vòng 1 ngày