#prog #rust #rustasync #article
Tokio Gives Progress, Not Ordering: Scheduling 1M Tasks
TL;DR:
Tokio Gives Progress, Not Ordering: Scheduling 1M Tasks
TL;DR:
Spawned early doesn't mean first-polled early. First-polled early doesn't mean completed early.
If there is an application-level unit of fairness you expect Tokio to honor, like the event in our case, the runtime doesn't know it exists. The bounds should be added by the application.
👍3🤔2
#prog #rust #suckassstory
Rust issue
Из-за небольшого смешивания стейта просто совпадения текста без сепараторов недостаточно, нужно ещё, чтобы звёзды сошлись по длине компонентов.
rustcuses thePathhash code to identify files, and thePathhash implementation is particularly weak because it ignores separators. As of PR #127297, it tries to compensate by mixing the component lengths into the hash, but it's still easy to manufacture collisions. That includes collisions where both sides look like plausible source paths, not gibberish, e.g.data/baselines/table.rswill conflict withdatabase/line/stable.rs.
When the hash codes of two paths collide,rustcsubstitutes the first file's contents when compiling the second one.
Rust issue
Из-за небольшого смешивания стейта просто совпадения текста без сепараторов недостаточно, нужно ещё, чтобы звёзды сошлись по длине компонентов.
GitHub
miscompilation via engineered StableSourceFileId hash collisions · Issue #164348 · rust-lang/rust
rustc uses the Path hash code to identify files, and the Path hash implementation is particularly weak because it ignores separators. As of PR #127297, it tries to compensate by mixing the componen...
🤯5🤣4