panic on deadlock
This commit is contained in:
parent
5d3751ea88
commit
a0b256cbd2
@ -61,7 +61,7 @@ RUN --mount=type=cache,target=/root/.cargo/git \
|
||||
FROM rust as rust_with_env
|
||||
|
||||
# changing our features doesn't change any of the steps above
|
||||
ENV WEB3_PROXY_FEATURES "rdkafka-src"
|
||||
ENV WEB3_PROXY_FEATURES "deadlock_detection,rdkafka-src"
|
||||
|
||||
# fetch deps
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
|
@ -87,7 +87,7 @@ fn main() -> anyhow::Result<()> {
|
||||
// this probably won't matter for us in docker, but better safe than sorry
|
||||
fdlimit::raise_fd_limit();
|
||||
|
||||
#[cfg(feature = "deadlock")]
|
||||
#[cfg(feature = "deadlock_detection")]
|
||||
{
|
||||
// spawn a thread for deadlock detection
|
||||
thread::spawn(move || loop {
|
||||
@ -105,6 +105,8 @@ fn main() -> anyhow::Result<()> {
|
||||
println!("{:#?}", t.backtrace());
|
||||
}
|
||||
}
|
||||
|
||||
panic!("deadlock detected!");
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user