Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing digest on main and 2.13.x branch #15995

Closed
tdyas opened this issue Jun 29, 2022 · 16 comments · Fixed by #16075
Closed

missing digest on main and 2.13.x branch #15995

tdyas opened this issue Jun 29, 2022 · 16 comments · Fixed by #16075
Assignees
Labels

Comments

@tdyas
Copy link
Contributor

tdyas commented Jun 29, 2022

Observed a missing digest on main even with backtracking changes in place:

Engine traceback:
  in select
  in pants.core.goals.test.run_tests
  in pants.backend.python.goals.pytest_runner.run_python_test (src/python/pants/jvm/compile_test.py:tests)
  in pants.backend.python.goals.pytest_runner.setup_pytest_for_target
  in pants.backend.python.util_rules.pex.create_venv_pex (pytest_runner.pex)
  in pants.backend.python.util_rules.pex.build_pex (pytest_runner.pex)
  in pants.engine.process.fallible_to_exec_result_or_raise
  in process
Traceback (no traceback):
  <pants native internals>
Exception: Could not recover from missing digest: Was not present in either the local or remote store: Digest { hash: Fingerprint<217f1d5845a05a89384e5d1e58b23372731b447685ef36c4b204845c2d6ae231>, size_bytes: 2768 }
Error: Process completed with exit code 1.

https://github.com/pantsbuild/pants/runs/7113601869?check_suite_focus=true#step:13:424

@tdyas tdyas added the bug label Jun 29, 2022
@tdyas
Copy link
Contributor Author

tdyas commented Jun 29, 2022

cc @stuhood

@tdyas
Copy link
Contributor Author

tdyas commented Jun 29, 2022

Another example (but on 2.13.x branch):

Engine traceback:
  in select
  in pants.core.goals.lint.lint
  in pants.backend.scala.lint.scalafmt.rules.scalafmt_fmt (scalafmt)
  in pants.engine.process.fallible_to_exec_result_or_raise
  in process
Traceback (no traceback):
  <pants native internals>
Exception: Could not recover from missing digest: Was not present in either the local or remote store: Digest { hash: Fingerprint<9484ac95856510459d1bd52a77a6b93cdd641560decdf9910395ee4d17e88163>, size_bytes: 121417 }
Error: Process completed with exit code 1.

https://github.com/pantsbuild/pants/runs/7116113010?check_suite_focus=true#step:9:279

@tdyas
Copy link
Contributor Author

tdyas commented Jun 29, 2022

Same build failed again but only with local store this time:

Engine traceback:
  in select
  in pants.core.goals.lint.lint
  in pants.backend.python.lint.black.rules.black_fmt (black)
  in pants.engine.process.fallible_to_exec_result_or_raise
  in process
Traceback (no traceback):
  <pants native internals>
Exception: Could not recover from missing digest: Was not present in the local store: Digest { hash: Fingerprint<740528d33c19eca061f11cbee7fd7b030928a8b7b53a5023da6e6168236cc0b9>, size_bytes: 1817 }
Error: Process completed with exit code 1.

https://github.com/pantsbuild/pants/runs/7116545174?check_suite_focus=true#step:9:242

@tdyas tdyas changed the title missing digest on main missing digest on main and 2.13.x branch Jun 29, 2022
@tdyas
Copy link
Contributor Author

tdyas commented Jun 29, 2022

Would cherry-picking #15979 help?

@stuhood
Copy link
Member

stuhood commented Jun 29, 2022

Would cherry-picking #15979 help?

No, it won't: this is an async method failing rather than a sync method failing. Thanks for the cherry-pick though anyway!

I'll need to re-audit whether the MissingDigest error is being properly preserved when invoking a process.

@stuhood
Copy link
Member

stuhood commented Jun 29, 2022

Same build failed again but only with local store this time:

This is apparently because that build failed to authenticate to Toolchain:

16:43:31.72 [WARN] Auth failed - BuildSense plugin is disabled.

...and so remote caching was disabled. How it then encountered an unrecoverable MissingDigest is a mystery though.

@stuhood
Copy link
Member

stuhood commented Jun 29, 2022

#16008 should slightly adjust the output for this error. I'll be on the lookout for additional cases, but please report them if you see them.

@stuhood
Copy link
Member

stuhood commented Jun 30, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 2, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 2, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 3, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 3, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 3, 2022

@jsirois
Copy link
Contributor

jsirois commented Jul 3, 2022

Noting these last 3 above were all from the same PR / were re-runs. They all failed on the same missing digest. The 4th run succeeded apparently only because of a failure acquiring BuildSense auth.

@stuhood
Copy link
Member

stuhood commented Jul 5, 2022

If this is causing folks enough trouble, we can re-enable eager_fetch until it is resolved:

pants/pants.toml

Lines 71 to 72 in 8efc396

# See https://github.com/pantsbuild/pants/issues/11331.
remote_cache_eager_fetch = false

@jsirois
Copy link
Contributor

jsirois commented Jul 5, 2022

I'm prepping that PR presently - red main should not be tolerated / this is in fact causing pain.

jsirois added a commit to jsirois/pants that referenced this issue Jul 5, 2022
stuhood pushed a commit that referenced this issue Jul 5, 2022
Band-aids #15995 in CI.

[ci skip-rust]
stuhood added a commit that referenced this issue Jul 6, 2022
A race condition was possible in backtracking where if a `Node` which produced a particular `Digest` had already been invalidated by one consumer, a second consumer would fail to find a source for the `Digest`, and would report "Could not identify a process to backtrack to". 

Fixes #15995.
stuhood added a commit to stuhood/pants that referenced this issue Jul 7, 2022
A race condition was possible in backtracking where if a `Node` which produced a particular `Digest` had already been invalidated by one consumer, a second consumer would fail to find a source for the `Digest`, and would report "Could not identify a process to backtrack to".

Fixes pantsbuild#15995.

[ci skip-build-wheels]
stuhood added a commit that referenced this issue Jul 7, 2022
A race condition was possible in backtracking where if a `Node` which produced a particular `Digest` had already been invalidated by one consumer, a second consumer would fail to find a source for the `Digest`, and would report "Could not identify a process to backtrack to". 

Fixes #15995.

[ci skip-build-wheels]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants