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

Omit dependencies' debug info #2803

Merged
merged 2 commits into from
Nov 14, 2022
Merged

Conversation

SomeoneToIgnore
Copy link
Contributor

Based on https://neondb.slack.com/archives/C0277TKAJCA/p1668079753506749

I did not measure build times properly, since run multiple compilations in parallel, but did not notice drastic compile time increases. CI could show more, presumably needs its cache repopulated first.

Old sizes (Linux):
383M    target/release/pageserver
4.4M    target/release/tenant_size_model
199M    target/release/neon_local
327M    target/release/safekeeper
331M    target/release/pageserver_binutils
81M     target/release/wal_craft
320M    target/release/draw_timeline_dir
113M    target/release/compute_ctl
204M    target/release/proxy
----
New sizes (Linux):
167M    target/release/pageserver
4.4M    target/release/tenant_size_model
52M     target/release/neon_local
120M    target/release/safekeeper
115M    target/release/pageserver_binutils
21M     target/release/wal_craft
113M    target/release/draw_timeline_dir
32M     target/release/compute_ctl
62M     target/release/proxy
Old sizes (Mac):
 25M    target/release/pageserver
523K    target/release/tenant_size_model
 13M    target/release/neon_local
 21M    target/release/safekeeper
2.3M    target/release/pageserver_binutils
5.8M    target/release/wal_craft
963K    target/release/draw_timeline_dir
8.9M    target/release/compute_ctl
 14M    target/release/proxy
----
New sizes (Mac):
 22M    target/release/pageserver
523K    target/release/tenant_size_model
9.6M    target/release/neon_local
 17M    target/release/safekeeper
1.9M    target/release/pageserver_binutils
4.5M    target/release/wal_craft
865K    target/release/draw_timeline_dir
7.1M    target/release/compute_ctl
 11M    target/release/proxy

Mac build difference could be explained by them having debug symbols split off by default in Cargo:
rust-lang/cargo#9298
https://blog.rust-lang.org/2021/03/25/Rust-1.51.0.html#splitting-debug-information

Debug symbols seems to be present still for the binaries with the changes:

objdump -h target/release/pageserver| rg debug
 16 .debug_gdb_scripts 00000022  0000000000d5a9e8  0000000000d5a9e8  00d5a9e8  2**0
 30 .debug_aranges 0008d9f0  0000000000000000  0000000000000000  01086a70  2**4
 31 .debug_pubnames 0143b5f6  0000000000000000  0000000000000000  01114460  2**0
 32 .debug_info   0231e549  0000000000000000  0000000000000000  0254fa56  2**0
 33 .debug_abbrev 000228e3  0000000000000000  0000000000000000  0486df9f  2**0
 34 .debug_line   005c5833  0000000000000000  0000000000000000  04890882  2**0
 35 .debug_frame  00000148  0000000000000000  0000000000000000  04e560b8  2**3
 36 .debug_str    01522729  0000000000000000  0000000000000000  04e56200  2**0
 37 .debug_loc    01864cbc  0000000000000000  0000000000000000  06378929  2**0
 38 .debug_pubtypes 01b79837  0000000000000000  0000000000000000  07bdd5e5  2**0
 39 .debug_ranges 00946b10  0000000000000000  0000000000000000  09756e1c  2**0
 40 .debug_macro  00002814  0000000000000000  0000000000000000  0a09d92c  2**0

@arssher
Copy link
Contributor

arssher commented Nov 14, 2022

Have you tried to get a backtrace, especially in tokio task? I assume they should still be reasonable (showing info for our code), but just to check.

Checking compilation time would also be interesting.

Cargo.toml Outdated Show resolved Hide resolved
@SomeoneToIgnore
Copy link
Contributor Author

SomeoneToIgnore commented Nov 14, 2022

I've added this

diff --git a/pageserver/src/walreceiver.rs b/pageserver/src/walreceiver.rs
index 1fad91c8..9f74d982 100644
--- a/pageserver/src/walreceiver.rs
+++ b/pageserver/src/walreceiver.rs
@@ -131,6 +131,9 @@ impl<E: Clone> TaskHandle<E> {
     }

     async fn next_task_event(&mut self) -> TaskEvent<E> {
+        if true {
+            panic!("((((");
+        }
         match self.events_receiver.changed().await {
             Ok(()) => TaskEvent::Update((self.events_receiver.borrow()).clone()),
             Err(_task_channel_part_dropped) => {

and run a random Pytest test that writes data with NEON_BIN=./target/release/ and ./target/debug/ removed, to be sure we don't run something else.
The backtraces look unchanged to me:

2022-11-14T10:39:35.461559Z  INFO wal_connection_manager{tenant=492bbd5acc409a684c5173e31fbf624e timeline=27a6fcf56d09bbf5b1ce6a3d5137f780}: Switching to new connection candidate: NewWalConnectionCandidate { safekeeper_id: NodeId(13), wal_source_connstr: "host=127.0.0.1 port=15005 options='-c timeline_id=27a6fcf56d09bbf5b1ce6a3d5137f780 tenant_id=492bbd5acc409a684c5173e31fbf624e'", reason: NoExistingConnection }
thread 'walreceiver worker' panicked at '((((', pageserver/src/walreceiver.rs:135:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
   2: pageserver::walreceiver::TaskHandle<E>::next_task_event::{{closure}}
             at /home/admin/work/neon/neon/pageserver/src/walreceiver.rs:135:13
   3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
   4: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}::{{closure}}
             at /home/admin/work/neon/neon/pageserver/src/walreceiver/connection_manager.rs:153:98
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
   6: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/macros/select.rs:507:49
   7: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/future/poll_fn.rs:38:9
   8: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}
             at /home/admin/work/neon/neon/pageserver/src/walreceiver/connection_manager.rs:144:9
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  10: pageserver::walreceiver::connection_manager::spawn_connection_manager_task::{{closure}}::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/macros/select.rs:507:49
  11: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/future/poll_fn.rs:38:9
  12: pageserver::walreceiver::connection_manager::spawn_connection_manager_task::{{closure}}
             at /home/admin/work/neon/neon/pageserver/src/walreceiver/connection_manager.rs:74:17
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  14: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-0.1.37/src/instrument.rs:272:9
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:296:9
  16: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/catch_unwind.rs:36:42
  17: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9
  18: std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
  19: std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
  20: std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
  21: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/catch_unwind.rs:36:9
  22: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:348:35
  23: tokio::task::task_local::LocalKey<T>::scope_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:233:19
  24: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:345:13
  25: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:348:35
  26: tokio::task::task_local::LocalKey<T>::scope_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:233:19
  27: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:345:13
  28: pageserver::task_mgr::task_wrapper::{{closure}}
             at /home/admin/work/neon/neon/pageserver/src/task_mgr.rs:308:10
  29: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  30: tokio::runtime::task::core::CoreStage<T>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:184:17
  31: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/loom/std/unsafe_cell.rs:14:9
  32: tokio::runtime::task::core::CoreStage<T>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:174:13
  33: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:480:19
  34: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9
  35: std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
  36: std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
  37: std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
  38: tokio::runtime::task::harness::poll_future
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:468:18
  39: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:104:27
  40: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:57:15
  41: std::thread::local::LocalKey<T>::with
  42: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
  43: tokio::runtime::scheduler::multi_thread::worker::Context::run
  44: tokio::macros::scoped_tls::ScopedKey<T>::set
  45: tokio::runtime::scheduler::multi_thread::worker::run
  46: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
  47: tokio::runtime::task::harness::Harness<T,S>::poll
  48: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

@arssher
Copy link
Contributor

arssher commented Nov 14, 2022

Cool!

@SomeoneToIgnore
Copy link
Contributor Author

SomeoneToIgnore commented Nov 14, 2022

I've tried building on the same VM I have without doing anything else, first the regular project then the patched one, first removing target/release/ directories if there were any.
I've used the same command we use to build binaries in the Dockerfile + RUSTC_WRAPPER='' to suppress cachepot that I have installed:

time env RUSTC_WRAPPER="" cargo build --bin pageserver --bin pageserver_binutils --bin draw_timeline_dir --bin safekeeper --bin proxy --locked --release

Old code:

    Finished release [optimized + debuginfo] target(s) in 4m 48s

env RUSTC_WRAPPER="" cargo build --bin pageserver --bin pageserver_binutils    2134.18s user 79.70s system 768% cpu 4:48.26 total

New code:

    Finished release [optimized + debuginfo] target(s) in 4m 12s

env RUSTC_WRAPPER="" cargo build --bin pageserver --bin pageserver_binutils    1885.70s user 70.26s system 773% cpu 4:12.79 total

Co-authored-by: Arseny Sher <sher-ars@yandex.ru>
@hlinnaka
Copy link
Contributor

Cool! I'm a little worried even this might make debugging harder; sometimes it would be useful to step into and dig deeper into dependencies, too. We have a lot of dependencies and they're not all mainstream enough that we can really assume that they're bug-free. And I wonder how this affects code generated for generics defined in a dependency, but used in our code. But I have to admit that this is such a big saving that we should probably go ahead and do it anyway.

@SomeoneToIgnore
Copy link
Contributor Author

For comparison, the trace from the "old" project with all debug info and the same panic!("((("); patch:

thread 'walreceiver worker' panicked at '((((', pageserver/src/walreceiver.rs:135:13
stack backtrace:
   0: rust_begin_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14
   2: pageserver::walreceiver::TaskHandle<E>::next_task_event::{{closure}}
             at /home/admin/work/neon/neon_main/pageserver/src/walreceiver.rs:135:13
   3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
   4: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}::{{closure}}
             at /home/admin/work/neon/neon_main/pageserver/src/walreceiver/connection_manager.rs:153:98
   5: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
   6: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/macros/select.rs:507:49
   7: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/future/poll_fn.rs:38:9
   8: pageserver::walreceiver::connection_manager::connection_manager_loop_step::{{closure}}
             at /home/admin/work/neon/neon_main/pageserver/src/walreceiver/connection_manager.rs:144:9
   9: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  10: pageserver::walreceiver::connection_manager::spawn_connection_manager_task::{{closure}}::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/macros/select.rs:507:49
  11: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/future/poll_fn.rs:38:9
  12: pageserver::walreceiver::connection_manager::spawn_connection_manager_task::{{closure}}
             at /home/admin/work/neon/neon_main/pageserver/src/walreceiver/connection_manager.rs:74:17
  13: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  14: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-0.1.37/src/instrument.rs:272:9
  15: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:296:9
  16: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/catch_unwind.rs:36:42
  17: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9
  18: std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
  19: std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
  20: std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
  21: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/catch_unwind.rs:36:9
  22: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:348:35
  23: tokio::task::task_local::LocalKey<T>::scope_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:233:19
  24: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:345:13
  25: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:348:35
  26: tokio::task::task_local::LocalKey<T>::scope_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:233:19
  27: <tokio::task::task_local::TaskLocalFuture<T,F> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/task/task_local.rs:345:13
  28: pageserver::task_mgr::task_wrapper::{{closure}}
             at /home/admin/work/neon/neon_main/pageserver/src/task_mgr.rs:308:10
  29: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19
  30: tokio::runtime::task::core::CoreStage<T>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:184:17
  31: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/loom/std/unsafe_cell.rs:14:9
  32: tokio::runtime::task::core::CoreStage<T>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:174:13
  33: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:480:19
  34: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9
  35: std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
  36: std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
  37: std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
  38: tokio::runtime::task::harness::poll_future
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:468:18
  39: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:104:27
  40: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:57:15
  41: tokio::runtime::task::raw::RawTask::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/raw.rs:134:18
  42: tokio::runtime::task::LocalNotified<S>::run
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/mod.rs:385:9
  43: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/worker.rs:444:21
  44: tokio::coop::with_budget::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/coop.rs:102:9
  45: std::thread::local::LocalKey<T>::try_with
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:445:16
  46: std::thread::local::LocalKey<T>::with
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:421:9
  47: tokio::coop::with_budget
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/coop.rs:95:5
  48: tokio::coop::budget
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/coop.rs:72:5
  49: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/worker.rs:420:9
  50: tokio::runtime::scheduler::multi_thread::worker::Context::run
  51: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/worker.rs:372:17
  52: tokio::macros::scoped_tls::ScopedKey<T>::set
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/macros/scoped_tls.rs:61:9
  53: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/worker.rs:369:5
  54: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/scheduler/multi_thread/worker.rs:348:45
  55: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/blocking/task.rs:42:21
  56: tokio::runtime::task::core::CoreStage<T>::poll::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:184:17
  57: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/loom/std/unsafe_cell.rs:14:9
  58: tokio::runtime::task::core::CoreStage<T>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/core.rs:174:13
  59: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:480:19
  60: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9
  61: std::panicking::try::do_call
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40
  62: std::panicking::try
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19
  63: std::panic::catch_unwind
             at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14
  64: tokio::runtime::task::harness::poll_future
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:468:18
  65: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:104:27
  66: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/harness.rs:57:15
  67: tokio::runtime::task::raw::RawTask::poll
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/raw.rs:134:18
  68: tokio::runtime::task::UnownedTask<S>::run
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/task/mod.rs:422:9
  69: tokio::runtime::blocking::pool::Task::run
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/blocking/pool.rs:111:9
  70: tokio::runtime::blocking::pool::Inner::run
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/blocking/pool.rs:346:17
  71: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/admin/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.21.1/src/runtime/blocking/pool.rs:321:13
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

I definitely see more info, but it's relatively useless for me most of the time.


Agree, that stepping into our dependencies' code in GDB feels good to have, wondering, how frequent do we need such option generally? If gdb is involved, most of the time we might be able to replace the binary with 100% debug info, so that seems like a good compromise for me for now, given the size decrease this PR yields.

@hlinnaka
Copy link
Contributor

Agree, that stepping into our dependencies' code in GDB feels good to have, wondering, how frequent do we need such option generally? If gdb is involved, most of the time we might be able to replace the binary with 100% debug info, so that seems like a good compromise for me for now, given the size decrease this PR yields.

Yeah, I think that's a good tradeoff.

@SomeoneToIgnore SomeoneToIgnore enabled auto-merge (squash) November 14, 2022 11:43
@SomeoneToIgnore SomeoneToIgnore merged commit f87017c into main Nov 14, 2022
@SomeoneToIgnore SomeoneToIgnore deleted the kb/disable-dependencies-debug-info branch November 14, 2022 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants