TraceMachina / TraceMachina/nativelink

Sanitizer tracking issue

Open
#188 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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 in get_test and update_test. POI:

ThreadSanitizer:

  • Data race in cas/worker:running_actions_manager_test in cleanup_happens_on_job_failure. POI:

    • Creation of fast_store in the setup_stores for these tests.
    • The try_join in running_actions_manager.rs in upload_results.
  • Data race in cas/worker:local_worker_test in new_local_worker_removes_work_directory_before_start_test. POI:

    • The new_local_worker in the failing test.
    • The fs::canonicalize call in new_local_worker in cas/worker/local_worker.rs.
  • Data race in cas/store:filesystem_store_test in oldest_entry_evicted_with_access_times_loaded_from_disk. POI:

    • The match statement at the end of the test on store.get_file_entry_for_digest.
    • The fs::create_dir_all call in the test.
    • The write_file calls in that test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.