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

mullvad-vpn build fails after jnix crate upgrade to v0.2.0 #69490

Closed
nonfictiongames opened this issue Feb 26, 2020 · 7 comments · Fixed by #69591
Closed

mullvad-vpn build fails after jnix crate upgrade to v0.2.0 #69490

nonfictiongames opened this issue Feb 26, 2020 · 7 comments · Fixed by #69591
Assignees
Labels
A-borrow-checker Area: The borrow checker A-inference Area: Type inference C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nonfictiongames
Copy link

nonfictiongames commented Feb 26, 2020

mullvad-vpn build fails after jnix crate upgrade to v0.2.0

I tried this code:

sudo pacman -Russnc mullvad-vpn
sudo rm -rf /var/cache/mullvad-vpn/
sudo rm -rf /var/log/mullvad-vpn/
git clone https://aur.archlinux.org/mullvad-vpn.git
cd mullvad-vpn
makepkg -si

I expected to see this happen: build completes without errors

Instead, this happened: rustc panicks at 'assertion failed: data.is_empty()', src/librustc_infer/infer/mod.rs:1288:9

Meta

rustc --version --verbose:

rustc 1.43.0-nightly (6fd8798f4 2020-02-25)
binary: rustc
commit-hash: 6fd8798f4de63328d743eb2a9a9c12e202a4a182
commit-date: 2020-02-25
host: x86_64-unknown-linux-gnu
release: 1.43.0-nightly
LLVM version: 9.0

Backtrace:

Compiling failure v0.1.6
   Compiling netlink-packet v0.1.1 (https://github.com/mullvad/netlink?rev=f768adfcc8c6b064ef7ae3c792c4c21d0d96d0b5#f768adfc)
   Compiling netlink-proto v0.1.1 (https://github.com/mullvad/netlink?rev=f768adfcc8c6b064ef7ae3c792c4c21d0d96d0b5#f768adfc)
   Compiling jnix v0.2.0
thread 'rustc' panicked at 'assertion failed: data.is_empty()', src/librustc_infer/infer/mod.rs:1288:9
stack backtrace:
   Compiling rtnetlink v0.1.1 (https://github.com/mullvad/netlink?rev=f768adfcc8c6b064ef7ae3c792c4c21d0d96d0b5#f768adfc)
   0:     0x7fb34694b614 - backtrace::backtrace::libunwind::trace::h0a6d7823273fd816
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1:     0x7fb34694b614 - backtrace::backtrace::trace_unsynchronized::h229a0e755b1b42eb
                               at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2:     0x7fb34694b614 - std::sys_common::backtrace::_print_fmt::ha4e5e469fbf96b31
                               at src/libstd/sys_common/backtrace.rs:78
   3:     0x7fb34694b614 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha3d6ee3353ca24fa
                               at src/libstd/sys_common/backtrace.rs:59
   4:     0x7fb3469847bc - core::fmt::write::h2a5f307ad1f62206
                               at src/libcore/fmt/mod.rs:1052
   5:     0x7fb34693cf77 - std::io::Write::write_fmt::h4feb4a5e1a3c415e
                               at src/libstd/io/mod.rs:1428
   6:     0x7fb346950405 - std::sys_common::backtrace::_print::h173a732fa3200a96
                               at src/libstd/sys_common/backtrace.rs:62
   7:     0x7fb346950405 - std::sys_common::backtrace::print::he240752f05e05cb4
                               at src/libstd/sys_common/backtrace.rs:49
   8:     0x7fb346950405 - std::panicking::default_hook::{{closure}}::h532f9d2f4d0a8068
                               at src/libstd/panicking.rs:204
   9:     0x7fb346950146 - std::panicking::default_hook::hdd523bb6b03295ff
                               at src/libstd/panicking.rs:224
  10:     0x7fb346fc6de9 - rustc_driver::report_ice::h3c83956ffc9c0984
  11:     0x7fb346950b35 - std::panicking::rust_panic_with_hook::h6b23a7f10a70b136
                               at src/libstd/panicking.rs:474
  12:     0x7fb348c5dfee - std::panicking::begin_panic::hf9251e02b5586bcc
  13:     0x7fb348c0b9bd - rustc_infer::infer::InferCtxt::take_region_var_origins::hef898dbcef7fd8d7
  14:     0x7fb348128963 - rustc_mir::borrow_check::nll::compute_regions::had7513632a8229c5
  15:     0x7fb3482d39dc - rustc_mir::borrow_check::do_mir_borrowck::h957fc2b1e327bf1e
  16:     0x7fb3483ec94d - rustc::ty::context::GlobalCtxt::enter_local::hf4345ae235232d30
  17:     0x7fb3482d2de4 - rustc_mir::borrow_check::mir_borrowck::h8d9c688079923732
  18:     0x7fb34716f6ca - rustc::ty::query::__query_compute::mir_borrowck::h67da2643aaf76726
  19:     0x7fb3471824ab - rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_borrowck>::compute::h5722ae527c08d4f4
  20:     0x7fb347213819 - rustc::dep_graph::graph::DepGraph::with_task_impl::h67168eb9ac0e9c3d
  21:     0x7fb347187ca5 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::h1662b6a077fe61f6
  22:     0x7fb3471821fe - rustc::ty::<impl rustc::ty::context::TyCtxt>::par_body_owners::hf507e274d0164165
  23:     0x7fb347239f4c - rustc_interface::passes::analysis::h9499aa0f68bf94ac
  24:     0x7fb346fd35b6 - rustc::ty::query::__query_compute::analysis::hff21d005a7d08b8a
  25:     0x7fb34703a98e - rustc::dep_graph::graph::DepGraph::with_task_impl::h8950063944d178a9
  26:     0x7fb347014465 - rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query::ha35fd8044f09cc28
  27:     0x7fb34704a537 - rustc::ty::context::tls::enter_global::h7e6e0f5057e0a7c3
  28:     0x7fb34701bed7 - rustc_interface::interface::run_compiler_in_existing_thread_pool::hede3fedddbc5cb3e
  29:     0x7fb346fcec94 - std::sys_common::backtrace::__rust_begin_short_backtrace::h62ce3aa44be26838
  30:     0x7fb346962427 - __rust_maybe_catch_panic
                               at src/libpanic_unwind/lib.rs:86
  31:     0x7fb34701d8a6 - core::ops::function::FnOnce::call_once{{vtable.shim}}::h2d82c36472451fcc
  32:     0x7fb34692d2ff - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hc94d4081949fab2e
                               at /rustc/6fd8798f4de63328d743eb2a9a9c12e202a4a182/src/liballoc/boxed.rs:1017
  33:     0x7fb346960d30 - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::hf92794a94efb1708
                               at /rustc/6fd8798f4de63328d743eb2a9a9c12e202a4a182/src/liballoc/boxed.rs:1017
  34:     0x7fb346960d30 - std::sys_common::thread::start_thread::h56a1db213ce5872d
                               at src/libstd/sys_common/thread.rs:13
  35:     0x7fb346960d30 - std::sys::unix::thread::Thread::new::thread_start::h6ff08e6072d2a5ae
                               at src/libstd/sys/unix/thread.rs:80
  36:     0x7fb34688846f - start_thread
  37:     0x7fb3467a83d3 - clone
  38:                0x0 - <unknown>
 
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/blob/master/CONTRIBUTING.md#bug-reports
 
note: rustc 1.43.0-nightly (6fd8798f4 2020-02-25) running on x86_64-unknown-linux-gnu
 
note: compiler flags: -C opt-level=s --crate-type lib
 
note: some of the compiler flags provided by cargo are hidden
 
query stack during panic:
#0 [mir_borrowck] borrow-checking `from_java::implementations::std::<impl from_java::FromJava<'env, jni::objects::AutoLocal<'sub_env, 'borrow>> for T>::JNI_SIGNATURE`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `jnix`.
@Centril Centril added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ I-nominated regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-borrow-checker Area: The borrow checker A-inference Area: Type inference E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 26, 2020
@Centril
Copy link
Contributor

Centril commented Feb 26, 2020

cc @matthewjasper

@jonas-schievink jonas-schievink added the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Feb 26, 2020
@Centril

This comment has been minimized.

@LeSeulArtichaut

This comment has been minimized.

@LeSeulArtichaut
Copy link
Contributor

cargo-bisect-rustc prints:

searched nightlies: from nightly-2020-02-11 to nightly-2020-02-18
regressed nightly: nightly-2020-02-16
searched commits: from 433aae9 to 61d9231
regressed commit: 19288dd
source code: https://github.com/mullvad/jnix

@rustbot modify labels: -E-needs-bisection

@jonas-schievink jonas-schievink removed the E-needs-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc label Feb 26, 2020
@hellow554
Copy link
Contributor

pub trait Trait<T> {
    const S: &'static str;
}

impl<T> Trait<()> for T
where 
    T: for<'a> Trait<std::marker::PhantomData<&'a ()>>,
{
    const S: &'static str = T::S;
}

@rustbot modify labels: -E-needs-mcve

@pnkfelix pnkfelix removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Feb 27, 2020
@pnkfelix
Copy link
Member

triage: P-high. Removing nomination.

@pnkfelix pnkfelix added P-high High priority and removed I-nominated labels Feb 27, 2020
@matthewjasper matthewjasper self-assigned this Feb 27, 2020
@rustbot rustbot added I-nominated and removed P-high High priority labels Feb 27, 2020
@pnkfelix pnkfelix added P-high High priority and removed I-nominated labels Feb 27, 2020
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Feb 28, 2020
@JohnTitor JohnTitor added the C-bug Category: This is a bug. label Feb 28, 2020
@freesig
Copy link

freesig commented Mar 10, 2020

I'm also getting this error.

Meta

rustc --version --verbose:

rustc 1.43.0-nightly (3dbade652 2020-03-09)
binary: rustc
commit-hash: 3dbade652ed8ebac70f903e01f51cd92c4e4302c
commit-date: 2020-03-09
host: x86_64-unknown-linux-gnu
release: 1.43.0-nightly
LLVM version: 9.0

Backtrace:

    Checking tokio-fs v0.1.7
    Checking rayon v1.3.0
    Checking tokio v0.1.22
thread 'rustc' panicked at 'assertion failed: data.is_empty()', src/librustc_infer/infer/mod.rs:1291:9
stack backtrace:
    Checking hyper v0.12.25
    Checking jsonrpc-server-utils v14.0.5
   0: backtrace::backtrace::libunwind::trace
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: core::fmt::write
             at src/libcore/fmt/mod.rs:1063
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1428
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: rustc_driver::report_ice
  11: <alloc::boxed::Box<F> as core::ops::function::Fn<A>>::call
             at /rustc/3dbade652ed8ebac70f903e01f51cd92c4e4302c/src/liballoc/boxed.rs:1031
  12: proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}
             at /rustc/3dbade652ed8ebac70f903e01f51cd92c4e4302c/src/libproc_macro/bridge/client.rs:305
  13: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:474
  14: std::panicking::begin_panic
  15: rustc_infer::infer::InferCtxt::take_region_var_origins
  16: rustc_mir::borrow_check::nll::compute_regions
  17: rustc_mir::borrow_check::do_mir_borrowck
  18: rustc::ty::context::GlobalCtxt::enter_local
  19: rustc_mir::borrow_check::mir_borrowck
  20: rustc::ty::query::__query_compute::mir_borrowck
  21: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors for rustc::ty::query::queries::mir_borrowck>::compute
  22: rustc::dep_graph::graph::DepGraph::with_task_impl
  23: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  24: rustc::ty::<impl rustc::ty::context::TyCtxt>::par_body_owners
  25: rustc_interface::passes::analysis
  26: rustc::ty::query::__query_compute::analysis
  27: rustc::dep_graph::graph::DepGraph::with_task_impl
  28: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt>::get_query
  29: rustc::ty::context::tls::enter_global
  30: rustc_interface::interface::run_compiler_in_existing_thread_pool
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose 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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.43.0-nightly (3dbade652 2020-03-09) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type lib

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

query stack during panic:
#0 [mir_borrowck] borrow-checking `<tls::InStreamListenerTls<Sub> as r#trait::InStreamListener<&mut [u8], &[u8]>>::raw_bind`
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `in_stream`.

Centril added a commit to Centril/rust that referenced this issue Mar 10, 2020
…, r=nikomatsakis

Use TypeRelating for instantiating query responses

`eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.

closes rust-lang#69490
Centril added a commit to Centril/rust that referenced this issue Mar 10, 2020
…, r=nikomatsakis

Use TypeRelating for instantiating query responses

`eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.

closes rust-lang#69490
Centril added a commit to Centril/rust that referenced this issue Mar 11, 2020
…, r=nikomatsakis

Use TypeRelating for instantiating query responses

`eq` can add constraints to `RegionConstraintData`, which isn't allowed during borrow checking outside of a `CustomTypeOp`. Use `TypeRelating` instead to always push constraints to the obligations list.

closes rust-lang#69490
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-borrow-checker Area: The borrow checker A-inference Area: Type inference C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.