-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
1.40.0 ICE while reporting ICE #68813
Comments
Can you try this on nightly? |
Once the ICEBreakers-CleanupCrew is announced (which I think will be happening very soon), we should advertise this bug on it (at least the reduction to MCVE part of it); see rust-lang/compiler-team#207 |
triage: P-high for initial investigation (i.e. identifying actual severity), removing nomination. |
@rustbot ping icebreakers-cleanup-crew |
Hey Cleanup Crew ICE-breakers! This bug has been identified as a good cc @spastorino |
Note that when I had a go at building
This is due to this line in the source crate: #[cfg(any(target_os = "macos", target_os = "ios"))]
#[error("OSX creatively eats your data, using Lightning on OSX is unsafe")]
struct ERR {} So if you are on a Mac laptop, it may or may not be worth your effort to investigate this. (It is probably easy to work around, but I figure I'd let people know up front.) |
Oops, right, you'll want to just drop that line. It shouldn't have any other effect, its only there due to (at least previously, based on my super-cursory read) libstd calling regular fsync() on OSX, which historically, well, didn't fsync. |
I looked at this a bit more. I see the ICE on stable and beta. I do not see the ICE on nightly. On nightly, I instead get the following error: Click here to see error diagnostics
|
Possibly associated: #66868 I am not seeing the ICE in: Stable
Beta
Nightly
Cargo bisectionsearched nightlies: from nightly-2019-10-01 to nightly-2019-11-01 Instructions
ErrorCOLLAPSIBLE ERROR STACKTRACE
warning: field is never used: `logger`
--> /home/chris/ext/rust-lightning/lightning/src/chain/chaininterface.rs:303:2
|
303 | logger: Arc<Logger>,
| ^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: field is never used: `logger`
--> /home/chris/ext/rust-lightning/lightning/src/chain/keysinterface.rs:295:2
|
295 | logger: Arc<Logger>,
| ^^^^^^^^^^^^^^^^^^^
warning: variant is never constructed: `Watchtower`
--> /home/chris/ext/rust-lightning/lightning/src/ln/channelmonitor.rs:351:2
|
351 | Watchtower {
| _____^
352 | | revocation_base_key: PublicKey,
353 | | htlc_base_key: PublicKey,
354 | | }
| |_____^
Compiling futures-macro v0.3.1
Compiling tokio-util v0.2.0
Compiling pin-project v0.4.8
Compiling lightning-net-tokio v0.0.3 (/home/chris/ext/rust-lightning/lightning-net-tokio)
warning: unused import: `lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait`
--> /home/chris/ext/rust-lightning/lightning-net-tokio/src/lib.rs:9:5
|
9 | use lightning::ln::peer_handler::SocketDescriptor as LnSocketTrait;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
warning: unused `std::result::Result` that must be used
--> /home/chris/ext/rust-lightning/lightning-net-tokio/src/lib.rs:174:4
|
174 | tokio::spawn(Self::schedule_read(peer_manager, us, reader, receiver)).await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_must_use)]` on by default
= note: this `Result` may be an `Err` variant, which should be handled
warning: unused `std::result::Result` that must be used
--> /home/chris/ext/rust-lightning/lightning-net-tokio/src/lib.rs:195:4
|
195 | tokio::spawn(Self::schedule_read(peer_manager, us, reader, receiver)).await;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
Compiling futures-util v0.3.1
Compiling h2 v0.2.1
Compiling hyper v0.13.2
error[E0658]: procedural macros cannot expand to macro definitions
--> src/main.rs:326:1
|
326 | #[tokio::main]
| ^^^^^^^^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/54727
= help: add `#![feature(proc_macro_hygiene)]` to the crate attributes to enable
thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src/libcore/option.rs:378:21
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/blob/master/CONTRIBUTING.md#bug-reports
note: rustc 1.40.0-nightly (09868a56c 2019-10-06) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin
note: some of the compiler flags provided by cargo are hidden
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `rust-lightning-bitcoinrpc`.
To learn more, run the command again with --verbose.
09868a56c95f7bc7b6ee3ab7611e3ca551031dbd finished with exit code Some(101).
please select an action to take:
tested 09868a56c95f7bc7b6ee3ab7611e3ca551031dbd, got Yes
uninstalling 09868a56c95f7bc7b6ee3ab7611e3ca551031dbd
searched toolchains 421bd77f42c2fe8a2596dbcc1580ec97fb89009f through f3c9cece7b6829e6fd7854a1aee6a1619a81a38c
regression in 09868a56c95f7bc7b6ee3ab7611e3ca551031dbd
FixCargo bisectionsearched nightlies: from nightly-2019-11-01 to nightly-2020-01-31 Possibly here: rust/src/librustc/traits/error_reporting.rs Lines 2213 to 2216 in 41601a8
Instructions
|
Reduced for struct RPCClient;
use lightning_net_tokio::Connection;
use tokio::sync::mpsc;
use lightning::ln::{channelmonitor, channelmanager, peer_handler};
use lightning::chain::keysinterface;
use std::sync::Arc;
struct ChannelMonitor;
impl channelmonitor::ManyChannelMonitor for ChannelMonitor {}
#[tokio::main]
async fn main() {
let peer_manager: Arc<peer_handler::PeerManager<lightning_net_tokio::SocketDescriptor, Arc<
channelmanager::ChannelManager<keysinterface::InMemoryChannelKeys, Arc<ChannelMonitor>>
>>> = unimplemented!();
let event_notify: mpsc::Sender<()> = unimplemented!();
let stream: tokio::net::TcpStream = unimplemented!();
let pk: secp256k1::key::PublicKey = unimplemented!();
tokio::spawn(async move {
Connection::setup_outbound(peer_manager, event_notify, pk, stream).await;
});
} |
This is happening somewhere in item-bodies checking, if I remove the body of |
Ok, I don't have more time to spend on this, I pushed some deletions to https://github.com/jyn514/rust-lightning/tree/rust-ice-delete |
Got it down to two files, but they have to be in different crates: https://github.com/jyn514/rust-lightning-bitcoinrpc/tree/rustc-ice
use lightning_net_tokio::Connection;
#[tokio::main]
async fn main() {
tokio::spawn(async move {
Connection::setup_outbound().await;
});
}
use tokio::net::TcpStream;
use tokio::io::{self, AsyncWriteExt};
use std::sync::{Arc, Mutex};
pub struct Connection {
writer: Option<io::WriteHalf<TcpStream>>,
}
impl Connection {
pub async fn setup_outbound() {
let us: Arc<Mutex<Self>> = unimplemented!();
us.lock().unwrap().writer.as_mut().unwrap().write_all(b"hi").await;
}
} |
A little smaller:
use lightning_net_tokio::setup_outbound;
async fn f() {
tokio::spawn(async move {
setup_outbound().await;
});
}
fn main() {}
use tokio::io::{WriteHalf, AsyncWriteExt, Sink};
struct Connection {
writer: WriteHalf<Sink>,
}
pub async fn setup_outbound() {
use std::sync::Mutex;
let us: Mutex<Connection> = unimplemented!();
us.lock().unwrap().writer.write_all(b"").await;
} backtrace
|
…Simulacrum Add some regression tests Closes rust-lang#24843 Closes rust-lang#28575 Closes rust-lang#54067 Closes rust-lang#67893 Closes rust-lang#68813 I'm not sure who's the best person to ask to review since Centril is taking a break now.
…Simulacrum Add some regression tests Closes rust-lang#24843 Closes rust-lang#28575 Closes rust-lang#54067 Closes rust-lang#67893 Closes rust-lang#68813 I'm not sure who's the best person to ask to review since Centril is taking a break now.
rustc+cargo 1.40.0 Debian testing packages report the following ICE (which does not go away after a cargo clean):
It can be reproduced by trying to build https://github.com/TheBlueMatt/rust-lightning-bitcoinrpc/tree/2020-02-ice-demo against https://github.com/TheBlueMatt/rust-lightning/tree/2020-02-rustc-ice.
The text was updated successfully, but these errors were encountered: