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

Speed up tuf.CheckExecutable #1585

Open
RebeccaMahany opened this issue Feb 7, 2024 · 2 comments
Open

Speed up tuf.CheckExecutable #1585

RebeccaMahany opened this issue Feb 7, 2024 · 2 comments
Assignees

Comments

@RebeccaMahany
Copy link
Contributor

RebeccaMahany commented Feb 7, 2024

We make 2+ calls to tuf.CheckExecutable during startup (two to verify the osqueryd binary, and zero or more to verify the selected launcher binary if updates are present). These calls can take up to 5 seconds and block startup.

@James-Pickett suggested caching the filepath, checksum, and result of executable checks so that we can avoid re-doing the checks multiple times. These could go in kv.sqlite so they're available to the lookup library on launcher startup.

@directionless
Copy link
Contributor

Hrm... Under what circumstance does it take 5s, and if that happens, is it indicative of an issue?

Caching could handle corruption, and we can add in file mode.

What about stapling/gatekeeper things? Is it reasonable to assume those are cached forever, or can we only cache things on an app bundle path?

@RebeccaMahany
Copy link
Contributor Author

Hrm... Under what circumstance does it take 5s, and if that happens, is it indicative of an issue?

@directionless a lot of the time I see executable checks time out on Windows specifically -- you suspected because of AV and that seems likely to me. So, no, probably not indicative of an issue with the binary itself.

@RebeccaMahany RebeccaMahany self-assigned this Mar 27, 2024
@RebeccaMahany RebeccaMahany changed the title Speed up autoupdate.CheckExecutable Speed up tuf.CheckExecutable Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants