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

ETXTBSY on execute_install() #51

Closed
Kiskae opened this issue Nov 2, 2023 · 4 comments
Closed

ETXTBSY on execute_install() #51

Kiskae opened this issue Nov 2, 2023 · 4 comments

Comments

@Kiskae
Copy link

Kiskae commented Nov 2, 2023

Recently been getting run failures with an Error: spawn ETXTBSY error.

Tracking down the source appears to show

const spawned = spawn(`${binary_path}`, args, {
env: merged_env,
});
failing and causing an uncaught exception to propagate through the action.

This specific failure reminds me of the race condition mentioned in the README of https://github.com/buildbarn/bb-remote-execution - requiring separate processes to handle downloading of an executable and executing that executable.

Excerpt from workflow log:

2023-11-02T13:53:48.8844243Z ##[group]Run DeterminateSystems/nix-installer-action@v6
2023-11-02T13:53:48.8844899Z with:
2023-11-02T13:53:48.8845200Z   flakehub: false
2023-11-02T13:53:48.8845821Z   github-token: ***
2023-11-02T13:53:48.8846200Z   modify-profile: true
2023-11-02T13:53:48.8846748Z   reinstall: false
2023-11-02T13:53:48.8847092Z   start-daemon: true
2023-11-02T13:53:48.8847777Z   diagnostic-endpoint: https://install.determinate.systems/nix/diagnostic
2023-11-02T13:53:48.8848606Z   trust-runner-user: true
2023-11-02T13:53:48.8848997Z ##[endgroup]
2023-11-02T13:53:49.0060064Z Fetching binary from https://install.determinate.systems/nix/nix-installer-x86_64-linux?ci=github&correlation=GH-599763b2-1658-467b-abe6-984a90a66e96
2023-11-02T13:53:49.5869054Z Downloaded `nix-installer` to `/tmp/nix-installer-7iB0Nw/nix-installer-x86_64-linux`
2023-11-02T13:53:49.5897493Z Execution environment: {
2023-11-02T13:53:49.5903883Z     "NIX_INSTALLER_NO_CONFIRM": "true",
2023-11-02T13:53:49.5904829Z     "NIX_INSTALLER_DIAGNOSTIC_ATTRIBUTION": "GH-599763b2-1658-467b-abe6-984a90a66e96",
2023-11-02T13:53:49.5905559Z     "NIX_INSTALLER_MODIFY_PROFILE": "true",
2023-11-02T13:53:49.5906364Z     "NIX_INSTALLER_DIAGNOSTIC_ENDPOINT": "https://install.determinate.systems/nix/diagnostic",
2023-11-02T13:53:49.5907140Z     "NIX_INSTALLER_START_DAEMON": "true",
2023-11-02T13:53:49.5909417Z     "NIX_INSTALLER_EXTRA_CONF": "access-tokens = github.com=***\ntrusted-users = root runner\n"
2023-11-02T13:53:49.5910164Z }
2023-11-02T13:53:49.6049345Z ##[error]Error: spawn ETXTBSY
2023-11-02T13:53:49.6219046Z Post job cleanup.
@Hoverbear
Copy link
Contributor

Thanks for the report!

@colemickens prepared a possible fix with #47, I'll be cutting that this morning.

@Kiskae
Copy link
Author

Kiskae commented Nov 2, 2023

I'm not sure how useful it would be, but perhaps the error should be propagated instead of going through the uncaught exception handler?

const exit_code: number = await new Promise((resolve, _reject) => {
spawned.on("close", resolve);
});

const exit_code: number = await new Promise((resolve, reject) => {
  spawned.on("close", resolve);
  spawned.on("error", reject);
});

EDIT: might need to replace close with exit, since close gets emitted after error or exit

@Kiskae
Copy link
Author

Kiskae commented Nov 13, 2023

Haven't seen the error since updating the action, will reopen if it shows up again.

@Kiskae Kiskae closed this as completed Nov 13, 2023
@Hoverbear
Copy link
Contributor

Great!

detsys-pr-bot pushed a commit to detsys-pr-bot/nix-installer-action that referenced this issue Jun 5, 2024
…eterminateSystems/add-missing-actions-to-update-matrix

Add missing Actions to update matrix (515d00bc192ae4460e2122572ebc24020c58ea95)
lucperkins added a commit that referenced this issue Jun 5, 2024
…92ae4460e2122572ebc24020c58ea95

Update detsys-ts: Merge pull request #51 from DeterminateSystems/add-missing-actions-to-update-matrix

Add missing Actions to update matrix
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