Skip to content

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

Closed
@gen-xu

Description

@gen-xu

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

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 25, 2023
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[/+] on Aug 25, 2023
gen-xu

gen-xu commented on Aug 26, 2023

@gen-xu
Author

seems to be related #115216

iacore

iacore commented on Aug 27, 2023

@iacore

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

Compiling rfd hangs forever

added this to the 1.72.0 milestone on Aug 31, 2023
added
I-compiletimeIssue: Problems and improvements with respect to compile times.
regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.
on Aug 31, 2023
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on Aug 31, 2023
removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Aug 31, 2023
wesleywiser

wesleywiser commented on Aug 31, 2023

@wesleywiser
Member

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

wesleywiser

wesleywiser commented on Oct 6, 2023

@wesleywiser
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.I-hangIssue: The compiler never terminates, due to infinite loops, deadlock, livelock, etc.P-highHigh priorityregression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @wesleywiser@gen-xu@rustbot@iacore

        Issue actions

          rustc 1.72.0 hangs on release build of the `simple` example in `rfd` crate · Issue #115207 · rust-lang/rust