`start_fuzzer_thread` populates `OnceCell` channels before fallible tokenization, poisoning `Tsffs` on startup error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
Research direction
Start in src/fuzzer/mod.rs: read start_fuzzer_thread at the two cited ranges (lines 114-130 and 168-186) and trace the ordering. The channels and their OnceCell fields (fuzzer_tx, fuzzer_rx, fuzzer_shutdown, fuzzer_messages) are set before tokenize_executable_file/tokenize_src_file and fuzz_thread run; move all fallible tokenization and map-pointer lookups ahead of channel creation. Done when a tokenization error leaves the OnceCells unset so a retry no longer fails with "Fuzzer sender already set"; build the crate to confirm.
Written by the indexing model from the issue text.
Description
Where
- https://github.com/intel/tsffs/blob/ed67e1c07ffb59ca45d4cd1ab1ed50a61effb60c/src/fuzzer/mod.rs#L114-L130
- https://github.com/intel/tsffs/blob/ed67e1c07ffb59ca45d4cd1ab1ed50a61effb60c/src/fuzzer/mod.rs#L168-L186
Problem
start_fuzzer_thread sets fuzzer_tx, fuzzer_rx, fuzzer_shutdown, and fuzzer_messages in their OnceCell fields before running fallible tokenize_executable_file / tokenize_src_file calls and before spawning fuzz_thread. If tokenization fails (for example, a bad path), the peer ends of all four channels are dropped while the four OnceCell fields remain set.
Impact
A single recoverable configuration error (e.g. a typo in token_executables or token_src_files) permanently poisons the Tsffs object so any retry fails with "Fuzzer sender already set".
Suggested fix
Perform all fallible setup (tokenization, map pointer lookups, etc.) before creating channels and populating the OnceCell fields.
Status
Found by reading the code at ed67e1c; not reproduced under SIMICS.
- Dominant language
- Rust
- Stars
- 337
- Forks
- 26
- Avg merge
- 5h 33m
- Merged PRs (30d)
- 30
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from intel/tsffs
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
awxkee/yuvutils-rs#149 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Ignore entry for RUSTSEC-2026-0002 no longer matches anything (`lru` is no longer in `Cargo.lock`)Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
influxdata/influxdb#27767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
shell-pool/shpool#463 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
oras-project/rust-oci-client-node#132 ·
Maintainers usually reply within 2 days