TraceMachina / TraceMachina/nativelink
Sanitizer tracking issue
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 244
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 54
Description
Sanitizer integration in rust is still quite experimental and tends to produce false positives. I went through a bunch of logs and think the issues below could be real bugs. I've added a few points of interest to key points in the codebase after some initial disentangling of the error logs.
AddressSanitizer:
- #187 A lot of leaked memory during
cas/store:ref_store_test. Seems to occur inget_testandupdate_test. POI:- The
setup_storescall inupdate_test, inref_store_owned. Seemingly during some clone operations. - The
add_storecall insetup_stores. - The first scope in each of the tests.
- The
ref_storefield in theRefStore::newimplementation. - The
unsafe impl Sync for StoreReference {}. - The
RefStorestruct. - The
name.to_stringcall instores.insertincas/store/lib.rsinadd_store. - Seems like everything points to the string keys of the hashmap. in the
stores.insertcall. - Related issues:
- The
ThreadSanitizer:
-
Data race in
cas/worker:running_actions_manager_testincleanup_happens_on_job_failure. POI:- Creation of
fast_storein thesetup_storesfor these tests. - The
try_joininrunning_actions_manager.rsinupload_results.
- Creation of
-
Data race in
cas/worker:local_worker_testinnew_local_worker_removes_work_directory_before_start_test. POI:- The
new_local_workerin the failing test. - The
fs::canonicalizecall innew_local_workerincas/worker/local_worker.rs.
- The
-
Data race in
cas/store:filesystem_store_testinoldest_entry_evicted_with_access_times_loaded_from_disk. POI:- The
matchstatement at the end of the test onstore.get_file_entry_for_digest. - The
fs::create_dir_allcall in the test. - The
write_filecalls in that test.
- The
Contributor 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.
Research direction
Start by running the listed AddressSanitizer and ThreadSanitizer tests, especially cas/store:ref_store_test and the three cas/worker or cas/store tests. Trace the points of interest in ref_store_owned, running_actions_manager.rs, local_worker.rs, and filesystem_store tests. Done means determining whether each reported sanitizer finding is a real bug and resolving or documenting the remaining findings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100