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

rustc 1.72.0 hangs on release build of the simple example in rfd crate #115207

Closed
gen-xu opened this issue Aug 25, 2023 · 4 comments
Closed

rustc 1.72.0 hangs on release build of the simple example in rfd crate #115207

gen-xu opened this issue Aug 25, 2023 · 4 comments
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Milestone

Comments

@gen-xu
Copy link

gen-xu commented Aug 25, 2023

I tried this code:

https://github.com/PolyMeilex/rfd/tree/0.11.4
with

cargo build --example simple --release --no-default-features --features xdg-portal

seems like it would basically hang on the following code

        Box::pin(async {
            OpenFileRequest::default()
                .accept_label("Pick file")
                .multiple(false)
                .title(&*self.title.unwrap_or_else(|| "Pick a file".to_string()))
                .filters(self.filters.into_iter().map(From::from))
                .send()
                .await
                .ok()
                .and_then(|request| request.response().ok())
                .and_then(|response| {
                    response
                        .uris()
                        .get(0)
                        .and_then(|uri| uri.to_file_path().ok())
                })
                .map(FileHandle::from)
        })

with RUSTC_LOG=TRACE hangs here

INFO rustc_trait_selection::traits::query::normalize normalize::<rustc_middle::ty::subst::GenericArg>: result=Ok(std::vec::IntoIter<T, A>) with 0 obligations
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=Binder { value: TraitPredicate(<[closure@src/backend/xdg_desktop_portal.rs:36:18: 36:35] as std::marker::Freeze>, polarity:Positive), bound_vars: [] }
┘
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=()
┘
┐rustc_trait_selection::traits::project::normalize_with_depth_to depth=1, value=Binder { value: TraitPredicate(<std::pin::Pin<&mut [async block@src/backend/xdg_desktop_portal.rs:43:18: 60:10]> as std::marker::Freeze>, polarity:Positive), bound_vars: [] }

I expected to see this happen: rustc 1.71.1 finishes same command above within 10 seconds

   Compiling zbus v3.14.1
   Compiling futures-executor v0.3.28
   Compiling futures v0.3.28
   Compiling ashpd v0.6.2
    Finished release [optimized] target(s) in 9.99s

Instead, this happened: rustc 1.72.0 stuck at compiling rfd for more than 5 minutes

   ...
   Compiling futures v0.3.28
   Compiling ashpd v0.6.2
    Building [=======================> ] 154/156: rfd 

Note that only --release build hangs, dev profile build works fine

Meta

rustc --version --verbose:

rustc 1.71.1 (eb26296b5 2023-08-03)
binary: rustc
commit-hash: eb26296b556cef10fb713a38f3d16b9886080f26
commit-date: 2023-08-03
host: x86_64-unknown-linux-gnu
release: 1.71.1
LLVM version: 16.0.5
rustc 1.72.0 (5680fa18f 2023-08-23)
binary: rustc
commit-hash: 5680fa18feaa87f3ff04063800aec256c3d4b4be
commit-date: 2023-08-23
host: x86_64-unknown-linux-gnu
release: 1.72.0
LLVM version: 16.0.5
Backtrace

No backtrace as it just hangs. Rustc trace level log provided though.

https://github.com/rust-lang/rust/files/12438619/rustc-trace.zip

@gen-xu gen-xu added the C-bug Category: This is a bug. label Aug 25, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Aug 25, 2023
@gen-xu gen-xu changed the title rustc 1.72.0 hangs on release build of the simble example in rfd crate rustc 1.72.0 hangs on release build of the simple example in rfd crate Aug 25, 2023
@gen-xu
Copy link
Author

gen-xu commented Aug 26, 2023

seems to be related #115216

@iacore
Copy link

iacore commented Aug 27, 2023

Here's another command that fails: cargo install --git https://github.com/lapce/floem widget-gallery.

Compiling rfd hangs forever

@wesleywiser wesleywiser added this to the 1.72.0 milestone Aug 31, 2023
@wesleywiser wesleywiser added I-compiletime Issue: Problems and improvements with respect to compile times. regression-from-stable-to-stable Performance or correctness regression from one stable version to another. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. labels Aug 31, 2023
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 31, 2023
@wesleywiser wesleywiser removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Aug 31, 2023
@wesleywiser
Copy link
Member

Marking as P-high for now. I can confirm that #114948 fixes the compile time regression/hang.

@wesleywiser
Copy link
Member

Closing since the fix in #114948 has shipped to 1.72.1 and 1.73 (current stable).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-compiletime Issue: Problems and improvements with respect to compile times. I-hang Issue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc. P-high High priority regression-from-stable-to-stable Performance or correctness regression from one stable version to another.
Projects
None yet
Development

No branches or pull requests

4 participants