Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Concurrency docs and the race gate: state that a user data race is UNDEFINED (allocator corruption), enumerate the process-global surfaces for embedders, and extend the TSan slice to the shapes it never runs

未关闭
#1,152 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
45/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
c

调研方向

Start with docs/CONCURRENCY.md and docs/EMBEDDING.md, then inspect eigs_embed.h, src/embed_concurrent.c, and tests/test_tsan.sh. Compare the documented guarantees and existing TSan shapes with the listed probes and missing controls. Done means the process-global surfaces and undefined race behavior are documented and the specified clean concurrency shapes are covered by the gate.

由索引模型根据 Issue 内容生成。

描述

area:concurrency area:docs area:gates kind:docs-drift

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}/.

Doc corrections (each verified by execution)

  • docs/CONCURRENCY.md says a closure race is "yours to avoid, exactly as in C" but frames it as lost updates. Measured: two workers appending to one list → realloc(): invalid old size / SIGSEV / double free or corruption (rc=134/139) within 10k iterations, 3/3 runs; a single WRITER plus a single READER on a module-level STRING binding crashes (slot_incref src/value_slot.h:91-93 from vm_run_ex src/vm.c:3597 outside g_module_env_lock vs env_set_hashed freeing the old value) — reads count. State plainly: any concurrent access to a shared container or binding, reads included, is undefined and can crash the process; #607's lock protects array growth only.
  • "messages copy" — see the buffer/text_builder/closure issue.
  • Worker exit semantics — see the worker-exit issue.
  • "collection resumes once all workers are joined" — see the GC issue.
  • "Replay boundary": any nondeterministic builtin on a worker while a tape is open is also unreplayable (torn tape) — see the tape issue.
  • EIGS_JIT_STATS=1 prints its footer once per worker detach (N+1 times) — cosmetic (reading).

Embed API (docs/EMBEDDING.md, eigs_embed.h)

Claims independent concurrent interpreters but does not enumerate the process-global surfaces reachable from two states on two threads: tape/sink/replay, arming sets, g_trace_current_line (vm.c:6148 writes it whenever the STATE is single-threaded — two states race on it), g_source_provider (eigs_embed.c:396-402), g_module_ns_tab, g_random_seeded, SIGPIPE. Only eigs_set_abort_flag is documented as process-global. src/embed_concurrent.c covers thresholds/globals/error flag only — no tape, no import, no nondet builtin, no close-while-other-runs — and is not in tests/test_tsan.sh.

Gate gaps (tests/test_tsan.sh, 13-file slice census)

Every file is main + 1-3 workers with 2-party channels. Never run: 3+ threads on one channel, close-while-blocked, nested spawn, worker throw, worker exit, cross-thread/double join, load_file/import/eval in a worker, tasks in a worker, a worker writing a NEW dict key, EIGS_TRACE/EIGS_REPLAY with workers, two embed states. The review's clean shapes (fan-in 3, close-while-blocked, nested spawn, worker errors, worker exit, tasks in workers, spawn while emitted JIT code runs, replay boundary #1112) should be enrolled as controls; the red shapes belong to their issues. #1139 adds the TSan-with-HTTP lane.

主要语言
C
星标
3
派生
7
平均合并
4 小时 15 分钟
30 天内合并 PR
106

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。