Skip to content

Fix hang in --print=file-names in bootstrap #142928

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

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

Noratrieb
Copy link
Member

@Noratrieb Noratrieb commented Jun 23, 2025

In an interactive context, the subprocess inherited a real tty stdin, which lead it it waiting for something to happen, even though nothing happened. By explicitly passing null as stdin we make sure an empty file is passed, which achieves the desired behavior.

Fixes #142926 (verified locally by cherry-picking the patch onto beta where I was building).

In an interactive context, the subprocess inherited a real tty stdin,
which lead it it waiting for something to happen, even though nothing
happened. By explicitly passing null as stdin we make sure an empty file
is passed, which achieves the desired behavior.
@rustbot
Copy link
Collaborator

rustbot commented Jun 23, 2025

r? @clubby789

rustbot has assigned @clubby789.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jun 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 23, 2025

⚠️ Warning ⚠️

@clubby789
Copy link
Contributor

LGTM, r=me when green

@saethlin
Copy link
Member

@bors r=clubby789

@bors
Copy link
Collaborator

bors commented Jun 23, 2025

📌 Commit 3003050 has been approved by clubby789

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 23, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 24, 2025
Fix hang in --print=file-names in bootstrap

In an interactive context, the subprocess inherited a real tty stdin, which lead it it waiting for something to happen, even though nothing happened. By explicitly passing null as stdin we make sure an empty file is passed, which achieves the desired behavior.

Fixes rust-lang#142926 (verified locally by cherry-picking the patch onto beta where I was building).
bors added a commit that referenced this pull request Jun 24, 2025
Rollup of 8 pull requests

Successful merges:

 - #140622 (compiletest: Improve diagnostics for line annotation mismatches)
 - #142641 (Generate symbols.o for proc-macros too)
 - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system)
 - #142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2)
 - #142894 (phantom_variance_markers: fix identifier usage in macro)
 - #142928 (Fix hang in --print=file-names in bootstrap)
 - #142930 (Account for beta revisions when normalizing versions)
 - #142932 (rustdoc-json: Keep empty generic args if parenthesized)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Jun 24, 2025
Rollup of 9 pull requests

Successful merges:

 - #140005 (Set MSG_NOSIGNAL for UnixStream)
 - #140622 (compiletest: Improve diagnostics for line annotation mismatches)
 - #142354 (Fixes firefox copy paste issue)
 - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system)
 - #142779 (Add note about `str::split` handling of no matches.)
 - #142894 (phantom_variance_markers: fix identifier usage in macro)
 - #142928 (Fix hang in --print=file-names in bootstrap)
 - #142932 (rustdoc-json: Keep empty generic args if parenthesized)
 - #142933 (Simplify root goal API of solver a bit)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7375c44 into rust-lang:master Jun 24, 2025
10 checks passed
@rustbot rustbot added this to the 1.90.0 milestone Jun 24, 2025
rust-timer added a commit that referenced this pull request Jun 24, 2025
Rollup merge of #142928 - Noratrieb:no-more-hang, r=clubby789

Fix hang in --print=file-names in bootstrap

In an interactive context, the subprocess inherited a real tty stdin, which lead it it waiting for something to happen, even though nothing happened. By explicitly passing null as stdin we make sure an empty file is passed, which achieves the desired behavior.

Fixes #142926 (verified locally by cherry-picking the patch onto beta where I was building).
@wesleywiser
Copy link
Member

Nominating for beta-backport. #142591 appears to be the injecting PR and is in 1.89 so it would be nice to have this fixed since it can cause issues for developers or downstream builds.

@rustbot label beta-nominated

@rustbot rustbot added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Jun 24, 2025
@Noratrieb Noratrieb deleted the no-more-hang branch June 24, 2025 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-nominated Nominated for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interactive cross compilation hangs
6 participants