Skip to content

build error: the compiler unexpectedly panicked while building askama_parser #119994

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

Closed
piaoger opened this issue Jan 15, 2024 · 6 comments
Closed
Labels
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

@piaoger
Copy link

piaoger commented Jan 15, 2024

I cannot reproduce with minimal code if move it away from my big workspace. While In my origin crate, both "cargo check" and "cargo test" crashes the build even if lib.rs is empty.

please let me know if you need more information.

Code

[package]
name = "defect-reproduce"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
which = "4.4"
regex = "1.10"
askama = "0.12"
uuid = { version = "1.4", features = ["serde", "v4", "v7", "js"] }

nalgebra = "0.32"
nalgebra-glm = "0.18"

lazy_static="1.4"

serde_json = "1.0"
serde = { version = '1.0', features = ['derive'] }
log = "0.4"

Meta

rustc --version --verbose:

rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: x86_64-unknown-linux-gnu
release: 1.75.0

Error output

Backtrace

   Compiling askama_parser v0.2.0
thread 'rustc' panicked at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/compiler/rustc_serialize/src/opaque.rs:233:42:
range start index 3488154 out of range for slice of length 2037791
stack backtrace:
   0: rust_begin_unwind
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
   1: core::panicking::panic_fmt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
   2: core::slice::index::slice_start_index_len_fail_rt
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/slice/index.rs:52:5
   3: core::slice::index::slice_start_index_len_fail
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/slice/index.rs:40:9
   4: <rustc_metadata::locator::CrateLocator>::extract_one
   5: <rustc_metadata::locator::CrateLocator>::extract_lib
   6: <rustc_metadata::creader::CrateLoader>::load
   7: <rustc_metadata::creader::CrateLoader>::maybe_resolve_crate
   8: <rustc_resolve::Resolver>::early_resolve_ident_in_lexical_scope
   9: <rustc_resolve::Resolver>::resolve_path_with_ribs
  10: <rustc_resolve::Resolver as rustc_expand::base::ResolverExpand>::resolve_imports
  11: <rustc_expand::expand::MacroExpander>::fully_expand_fragment
  12: <rustc_expand::expand::MacroExpander>::expand_crate
  13: rustc_interface::passes::resolver_for_lowering
      [... omitted 1 frame ...]
  14: rustc_interface::interface::run_compiler::<core::result::Result<(), rustc_span::ErrorGuaranteed>, rustc_driver_impl::run_compiler::{closure#1}>::{closure#0}
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: 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.75.0 (82e1608df 2023-12-21) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C embed-bitcode=no -C debug-assertions=off

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

query stack during panic:
#0 [resolver_for_lowering] getting the resolver for lowering
end of query stack
error: could not compile `askama_parser` (lib)
warning: build failed, waiting for other jobs to finish...

@piaoger piaoger 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 Jan 15, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 15, 2024
@clubby789
Copy link
Contributor

I'm not able to reproduce this on stable or nightly. It might be an incremental bug - if you do a cargo clean, does the issue persist?

@saethlin
Copy link
Member

This looks an awful lot like #119510, meaning you ran out of disk space at some point and rustc stopped in the middle of writing out one of its files but never correctly reported the problem.

@saethlin
Copy link
Member

@piaoger Is it possible you ran out of disk in the past when compiling this big workspace? If there's no way you ran out of disk space we can keep this open, otherwise I'm pretty sure the root cause is fixed and the fix just needs time get to stable.

@piaoger
Copy link
Author

piaoger commented Jan 16, 2024

@saethlin Perhaps, it' common for me to run out of disk as I have a couple of big workspaces :) This storage issue is always on my wishlist that I want rust to improve :)

Another behavior is I can build crate depends on it and app runs quite well. Anyway I will run "cargo clean" right after I finish my current task and return to this issue.

@Fyko
Copy link

Fyko commented Jan 19, 2024

@piaoger any luck?

@piaoger
Copy link
Author

piaoger commented Jan 26, 2024

Just made a hard decision to clean and build the big workspace, no build error anymore :)
Thanks for the suggestion and please close the issue.

@clubby789 clubby789 removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jan 26, 2024
@clubby789 clubby789 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 26, 2024
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-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

5 participants