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
non-fatal panic appears in paramcache logs #551
Comments
The asynchronous logger was logging panics but didn't fail on them. Fixes #551.
This isn't an issue anymore. I've introduced a random panic here . I was able to see the panic in the logs and anecho $? returned 101 .
Sadly I didn't check if that is still an issue early on. I found this branch https://github.com/filecoin-project/rust-fil-proofs/compare/bugs/551-panic-in-paramcache-logs and rebased it to master. Thanks @laser for the work, I really didn't do anything, just squashed the two commits and improved the code slightly. I've pushed it in case we ever think sync logging is better: https://github.com/filecoin-project/rust-fil-proofs/tree/sync-logger |
@vmx - I still see the panic in recent CI builds of the rust-fil-proofs project (check out end of the Ensure cache is hydrated with PoRep and PoSt Groth parameters (for test) output). It's not a problem, I suppose, because it's not causing builds to fail - but it probably does imply that there's something configured incorrectly somewhere.
I haven't really investigated the sync logging solution. My guess is that the sync logger synchronizes (surprise!) log writes requested by different threads. Is that true? If so, we'd need to be cautious when logging from spawned/child threads to ensure that we didn't create contention for the logger. |
@laser: perhaps we can add a |
@vmx - Oddly enough, the panic doesn't impact the exit code of the |
Sounds like the panic is not where I've put it. What about running it on CI with |
Here's what I found out. If a thread panics, the main process won't panic. Instead you need to call use std::thread;
fn main() {
let result = thread::spawn(move || {
panic!("You see this panic, but the main thread won't terminate");
}).join();
println!("result: {:?}", result);
} Output: $ ./threadpanic_minimal
thread '<unnamed>' panicked at 'You see this panic, but the main thread won't terminate', threadpanic_minimal.rs:5:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
result: Err(Any) From looking through the code base, threads are always joined correctly. So the question is, where does this error actually happen. I have no clue how to find that out. |
I’m fairly confident that the thread you seek lives in the slog async logger
…On Fri, May 10, 2019, at 7:13 AM, Volker Mische wrote:
Here's what I found out. If a thread panics, the main process won't panic. Instead you need to call `join()`
on the spawed thread and check the result. Here's a minimal example:
use std::thread;
fn main() {
let result = thread::spawn(move || {
panic!("You see this panic, but the main thread won't terminate");
}).join();
println!("result: {:?}", result);
}
Output:
$ ./threadpanic_minimal
thread '<unnamed>' panicked at 'You see this panic, but the main thread won't terminate', threadpanic_minimal.rs:5:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
result: Err(Any)
From looking through the code base, threads are always joined correctly. So the question is, where does this error actually happen. I have no clue how to find that out.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#551 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAGX6G2FTOOT5LBBEWNYBXTPUV7I7ANCNFSM4G5X3SVA>.
|
@laser So you mean in the |
slog-rs/async#11 perhaps? |
That's my current hypothesis, yep. After doing some binging, I found this thread which addresses a similar-looking panic. |
Use slog-async master still panics https://circleci.com/gh/filecoin-project/rust-fil-proofs/19612. I'm not of much help here. I understand only little on what those issues talk about :) |
@laser are you actively working on this? |
@dignifiedquire - No, I am not. @vmx has done some investigation into the cause of this behavior and I've been supporting those efforts, albeit poorly. |
Description
After the
feat/bench-constraint-system
branch was merged,paramcache
started logging a panic to stdout in CircleCI. This panic doesn't causeparamcache
to exit with a non-zero status code.The first occurrence of this error can be found here.
A subset of the logs from the aforementioned build run which contain the panic:
The text was updated successfully, but these errors were encountered: