Skip to content

dist-x86_64-freebsd fails when building with debug assertions #63663

@Aaron1011

Description

@Aaron1011
Member

Steps to reproduce:

  1. Run src/ci/docker/run.sh dist-x86_64-freebsd (note that DEPLOY=1 is not set, which is why we don't see this on Azure)
  2. Observe the following ICE (full log):
Building stage1 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-freebsd)
   Compiling core v0.0.0 (/checkout/src/libcore)
error: internal compiler error: src/librustc/ty/context.rs:213: node type <T>::IntoIter (hir_id=HirId { owner: DefIndex(4038), local_id: 61 }) with HirId::owner DefId(0:4038 ~ core[db27]::iter[0]::adapters[0]::flatten[0]::{{impl}}[13]::try_fold[0]::flatten[0]) cannot be placed in TypeckTables with local_id_root DefId(0:4034 ~ core[db27]::iter[0]::adapters[0]::flatten[0]::{{impl}}[13]::try_fold[0])

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:643:9
stack backtrace:
   0: std::panicking::default_hook::{{closure}}
   1: std::panicking::default_hook
   2: rustc::util::common::panic_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic
   5: rustc_errors::Handler::bug
   6: rustc::util::bug::opt_span_bug_fmt::{{closure}}
   7: rustc::ty::context::tls::with_opt::{{closure}}
   8: rustc::ty::context::tls::with_context_opt
   9: rustc::ty::context::tls::with_opt
  10: rustc::util::bug::opt_span_bug_fmt
  11: rustc::util::bug::bug_fmt
  12: rustc::ty::context::validate_hir_id_for_typeck_tables::{{closure}}
  13: rustc::ty::context::tls::with::{{closure}}
  14: rustc::ty::context::tls::with_context::{{closure}}
  15: rustc::ty::context::tls::with_context_opt
  16: rustc::ty::context::tls::with_context
  17: rustc::ty::context::tls::with
  18: rustc::ty::context::TypeckTables::qpath_res
  19: rustc_save_analysis::SaveContext::get_path_res
  20: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  21: syntax::visit::walk_generic_args
  22: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_ty
  23: syntax::visit::walk_ty
  24: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  25: rustc_save_analysis::dump_visitor::DumpVisitor::process_method
  26: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  27: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  28: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  29: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_item
  30: <rustc_save_analysis::dump_visitor::DumpVisitor as syntax::visit::Visitor>::visit_mod
  31: syntax::visit::walk_crate
  32: rustc::dep_graph::graph::DepGraph::with_ignore
  33: rustc_save_analysis::process_crate
  34: rustc_driver::run_compiler::{{closure}}::{{closure}}::{{closure}}
  35: rustc::util::common::time
  36: rustc::ty::context::tls::enter_global
  37: rustc_interface::passes::BoxedGlobalCtxt::access::{{closure}}
  38: rustc_interface::passes::create_global_ctxt::{{closure}}
  39: rustc_interface::interface::run_compiler_in_existing_thread_pool
  40: std::thread::local::LocalKey<T>::with
  41: scoped_tls::ScopedKey<T>::set
  42: syntax::with_globals
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
query stack during panic:
end of query stack
error: aborting due to previous error

This appears to be a legimitate bug, which is normally not exposed due to the if cfg!(debug_assertions) block in validate_hir_id_for_typeck_tables not running on CI.

Activity

changed the title [-]dist-x86_64-freebsd fails when buuilding with debug info[/-] [+]dist-x86_64-freebsd fails when building with debug info[/+] on Aug 17, 2019
added
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
C-bugCategory: This is a bug.
O-freebsdOperating system: FreeBSD
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
on Aug 17, 2019
Aaron1011

Aaron1011 commented on Aug 17, 2019

@Aaron1011
MemberAuthor

Possibly related to #57298

removed
A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)
O-freebsdOperating system: FreeBSD
on Aug 25, 2019
jonas-schievink

jonas-schievink commented on Aug 25, 2019

@jonas-schievink
Contributor

Does not seem to be specific to FreeBSD: #63861

changed the title [-]dist-x86_64-freebsd fails when building with debug info[/-] [+]dist-x86_64-freebsd fails when building with debug assertions[/+] on Aug 25, 2019
added a commit that references this issue on Sep 10, 2019
656ce3f
added a commit that references this issue on Sep 15, 2019
2e11e81
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-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @Aaron1011@jonas-schievink

      Issue actions

        dist-x86_64-freebsd fails when building with debug assertions · Issue #63663 · rust-lang/rust