Skip to content

Compiler panic: found unstable fingerprints for extern_mod_stmt_cnum #83439

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
crone123 opened this issue Mar 24, 2021 · 7 comments
Closed

Compiler panic: found unstable fingerprints for extern_mod_stmt_cnum #83439

crone123 opened this issue Mar 24, 2021 · 7 comments
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@crone123
Copy link

Code

use actix_web::{HttpServer,App};

mod fighter;
mod controller;

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new()
            .service(controller::hello)
    })
    .bind("[::]:4000")?
    .run()
    .await
}

fighter:

use serde::{Serialize,Deserialize};

#[derive(Serialize,Deserialize)]
pub struct Fighter
{
    pub id: Option<String>,
    pub name: String,
    pub first_name: String,
    pub r#type: String,
    pub avatar: Option<String>,
    pub biography: String,
}

controller:

use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder};

#[get("/")]
pub async fn hello() -> impl Responder {
    "Hello world !"
}

with these dependencies:

serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.64"
mongodb = "1.2.0"
lapin = "1.6.8"
actix-web = "3"

Meta

rustc --version --verbose:

rustc 1.52.0-nightly (107896c32 2021-03-15)
binary: rustc
commit-hash: 107896c32d5dda4db508968ff34997a39d286966
commit-date: 2021-03-15
host: x86_64-apple-darwin
release: 1.52.0-nightly
LLVM version: 12.0.0

Error output

   Compiling packagename v0.1.0 (/path)
warning: unused imports: `App`, `HttpResponse`, `HttpServer`, `post`, `web`
 --> src/controller.rs:1:22
  |
1 | use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder};
  |                      ^^^^  ^^^  ^^^  ^^^^^^^^^^^^  ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

thread 'rustc' panicked at 'found unstable fingerprints for extern_mod_stmt_cnum(poc_rust[66d3]::fighter::_::_serde)', /rustc/107896c32d5dda4db508968ff34997a39d286966/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.52.0-nightly (107896c32 2021-03-15) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [extern_mod_stmt_cnum] computing crate imported by `fighter::_::_serde`
#1 [check_mod_unstable_api_usage] checking for unstable API usage in module `fighter`
end of query stack
warning: 1 warning emitted

error: could not compile
Backtrace

<backtrace>

Note: I comment some parts of the code (mod, etc...) and it compiles. After this, I run this previous code again, and it works, I don't know why.

@crone123 crone123 added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 24, 2021
@fee1-dead
Copy link
Member

If you can still reproduce the issue, please provide a backtrace.

@rustbot label: A-incr-comp

@rustbot rustbot added the A-incr-comp Area: Incremental compilation label Mar 24, 2021
@Aaron1011
Copy link
Member

This should be fixed in the latest nightly

@fee1-dead fee1-dead mentioned this issue Mar 25, 2021
@Aaron1011 Aaron1011 changed the title Compiler panic Compiler panic: found unstable fingerprints for extern_mod_stmt_cnum Mar 25, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Mar 29, 2021

@Aaron1011 This is still happening regularly for us on rustc 1.53.0-nightly (07e0e2ec2 2021-03-24) (07e0e2e includes your fix).

@m-ou-se
Copy link
Member

m-ou-se commented Mar 29, 2021

Ah I now see you already filed #83538. :)

@Aaron1011
Copy link
Member

@m-ou-se: You're getting this exactly crash (with extern_mod_stmt_cnum) on a recent nightly? This should have been fixed by #83153

@m-ou-se
Copy link
Member

m-ou-se commented Mar 31, 2021

@Aaron1011 Oh, I'm not sure now. I'll check and post details if it happens again.

@wesleywiser
Copy link
Member

Thanks for filing the bug report! We just shipped a patch release to work around this issue and are currently triaging related issues related to ensure each underlying problem gets resolved. Since this appears to be a duplicate of #83126, I'm going to close in favor of that issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants