Concurrency: random from parallel workers shares libc's drand48 state with a racy one-shot seed — cross-worker duplicate draws
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
- 52/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ệ
- c
- Lĩnh vực
- compilers, performance
Hướng nghiên cứu
Start in src/builtins.c around eigs_ensure_random_seeded at lines 2299-2309 and builtin_random at line 2317, then run the worker probes in ~/src/wt/briefs/conc-review/probes-{A,B,C}/. Compare sequential and parallel duplicate counts and TSan reports; done means concurrent draws no longer race or produce the observed cross-worker duplicates while EIGS_SEED behavior remains reproducible.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found by the 2026-09-14 whole-runtime concurrency review (three independent reviewers, every finding below reproduced by execution on main @ a18deac unless marked reading). Probe files live in ~/src/wt/briefs/conc-review/probes-{A,B,C}/.
g_random_seeded (src/builtins.c:2299): eigs_ensure_random_seeded :2301 reads and :2309 writes it unsynchronized (TSan reports in every worker probe that touches random); two workers can both srand48 under a running draw; builtin_random :2317 calls drand48() (unlocked glibc global state) from N threads.
Observed
Two workers × 100,000 draws, counting values present in BOTH lists: sequential control 0 of 100,000; parallel 21 / 5 / 31 of 100,000 across three runs.
Fix direction
pthread_once for the seed; a mutex around drand48/lrand48, or per-thread drand48_r state seeded from the process seed plus a thread ordinal (keeps EIGS_SEED reproducible per thread).
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 11 giờ 28 phút
- Pull request đã merge (30 ngày)
- 262
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.
- Có Dockerfile hoặc 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 InauguralSystems/EigenScript
-
area:gates area:gfx found-by:critic kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
InauguralSystems/EigenScript#1825 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Amalgamation compiles with warnings at -O0 (-Wreturn-type) and -O1 (-Wmaybe-uninitialized)Có thể đã có người làm @facelessdevhack đã nhận 4 ngày trước. Đang mởarea:embed bug found-by:code-review kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#1775 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
UB: (int) cast of a user double outside int range in dispatch / vm_index_is_int / flat_index_atĐang mởarea:runtime-vm kind:silent-wrong
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
InauguralSystems/EigenScript#1748 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:gfx bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
InauguralSystems/EigenScript#1684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
InauguralSystems/EigenScript#1679 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
FujiNetWIFI/fujinet-firmware#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug Official Image release/25.12 Supported Device target/kirkwood
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area/archive bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
DarkFlippers/qUnleashed#374 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Missing options in yara man pageĐang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
VirusTotal/yara#2255 ·
-
Add SupportsTransactions flagĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100