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

Improve diagnostics on closed or corrupted file descriptors #51

Open
petrochenkov opened this issue Mar 10, 2023 · 1 comment
Open

Improve diagnostics on closed or corrupted file descriptors #51

petrochenkov opened this issue Mar 10, 2023 · 1 comment

Comments

@petrochenkov
Copy link
Contributor

This issue is a continuation of #27 (comment).

Jobserver users may want to report warnings or errors if the jobserver cannot be correctly inherited from the environment.

For example, rustc previously ICEd on jobserver errors (rust-lang/rust#46981), but now it either swallows them (when jobserver acquire or release fails) or silently creates a new jobserver.
However, for diagnosing issues in the build environment we'd ideally want to

  • Warn if the jobserver descriptors were passed but couldn't be parsed or turned out closed
    • both name of the used env var (e.g MAKEFLAGS) and possible parsing errors should be available for reporting
  • Error or warn if the jobserver descriptors are open/accessible, but corrupted, i.e. reopened by someone else and no longer refer to pipes
    • name of the used env var should be available in this case as well

Cargo probably wants something like this as well.

This crate can support producing extended error types from Client::from_env to support such diagnostics.

@petrochenkov
Copy link
Contributor Author

@belovdv is currently working on this.

@petrochenkov petrochenkov changed the title Improve diagnostics on closed or corrupted or closed file descriptors Improve diagnostics on closed or corrupted file descriptors Mar 10, 2023
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

1 participant