fix: exe path resolution bug#358
Merged
ethanpailes merged 1 commit intomasterfrom May 1, 2026
Merged
Conversation
954fc13 to
c79d22b
Compare
4af41fb to
f6c8ec0
Compare
maxhbooth
approved these changes
Apr 30, 2026
|
|
||
| if cfg!(target_os = "linux") { | ||
| if let Some(path_str) = path.to_str() { | ||
| if let Some(stripped) = path_str.strip_suffix(" (deleted)") { |
There was a problem hiding this comment.
I think you should include a comment string here explaining a little more of why we need to do this since it's not obvious why a path would ever contain deleted anyway (e.g. that /usr/bin/shpool (deleted) is clearly not the actual path, but it could get output when we ask the linux kernel.)
Contributor
Author
There was a problem hiding this comment.
Good point, done.
When the shpool daemon binary gets overwritten, linux will start appending ' (deleted)' to the exe path. This causes problems when we self-exec. This has started happening to me pretty regularly and I think it is because of package updates silently overwriting the binary with a new version under the hood. I think this is the underlying cause that caused the bug I fixed in #348. This bug was introduced when we did the mac port (in 7030966).
f6c8ec0 to
a679370
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Link
n/a I just hit this myself and spotted it in the logs. There is a google internal bug that's pretty useless on a public issue tracker that I think is relevant.
AI Policy Ack
ack
This PR was:
I meat coded the fix and vibed the test.
Description
When the shpool daemon binary gets overwritten, linux will start appending ' (deleted)' to the exe path. This causes problems when we self-exec. This has started happening to me pretty regularly and I think it is because of package updates silently overwriting the binary with a new version under the hood.
I think this is the underlying cause that caused the bug I fixed in #348.
This bug was introduced when we did the mac port (in 7030966).