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

Add crash retriever script #2168

Merged
merged 11 commits into from
May 20, 2023
Merged

Add crash retriever script #2168

merged 11 commits into from
May 20, 2023

Conversation

teh-cmc
Copy link
Member

@teh-cmc teh-cmc commented May 17, 2023

Fetch user crashes from PostHog database, deduplicates them, and prefill issue reports for them.

Usage:

export POSTHOG_PERSONAL_API_KEY=<create_your_personal_api_key_in_posthog_ui>

python scripts/fetch_crashes.py -v 0.5.0 -v 0.5.1 > crashes.md

Optionally, you can filter out data older than a given timestamp:

python scripts/fetch_crashes.py -v 0.5.0 -v 0.5.1 --after 2023-05-02T20:17:52 > crashes.md

See also:

python scripts/fetch_crashes.py --help

Live demo

$ python scripts/fetch_crashes.py -v 0.5.0 -v 0.5.1 --after 2023-05-14

2 distinct user(s) affected by panic crash @ winit-0.28.1/src/platform_impl/linux/mod.rs:757

  • First occurrence: 2023-05-15T21:20:44.358000+00:00
  • Last occurrence: 2023-05-19T15:42:51.622000+00:00
  • Affected Rust versions: ['1.67.1 (d5a82bbd2 2023-02-07)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: winit::platform_impl::platform::EventLoop<T>::new
   8: std::thread::local::LocalKey<T>::with
   9: eframe::native::run::wgpu_integration::run_wgpu

1 distinct user(s) affected by panic crash @ wgpu-0.15.1/src/backend/direct.rs:316

  • First occurrence: 2023-05-15T14:43:58.362000+00:00
  • Last occurrence: 2023-05-20T13:22:17.682000+00:00
  • Affected Rust versions: ['1.67.1 (d5a82bbd2 2023-02-07)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: wgpu::backend::direct::Context::handle_error_fatal

1 distinct user(s) affected by panic crash @ winit-0.28.1/src/platform_impl/linux/wayland/window/mod.rs:327

  • First occurrence: 2023-05-19T09:39:05.464000+00:00
  • Last occurrence: 2023-05-20T05:50:40.112000+00:00
  • Affected Rust versions: ['1.67.1 (d5a82bbd2 2023-02-07)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: core::panicking::panic
             at core/src/panicking.rs:111:5
   8: winit::platform_impl::platform::wayland::window::Window::new::{{closure}}

1 distinct user(s) affected by panic crash @ arrow2-0.16.0/src/array/growable/binary.rs:73

  • First occurrence: 2023-05-20T05:19:00.353000+00:00
  • Last occurrence: 2023-05-20T05:19:00.353000+00:00
  • Affected Rust versions: ['1.67.1 (d5a82bbd2 2023-02-07)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: core::result::unwrap_failed
             at core/src/result.rs:1791:5
   8: <arrow2::array::growable::binary::GrowableBinary<O> as arrow2::array::growable::Growable>::extend
   9: <arrow2::array::growable::union::GrowableUnion as arrow2::array::growable::Growable>::extend
  10: <arrow2::array::growable::structure::GrowableStruct as arrow2::array::growable::Growable>::extend
  11: arrow2::compute::concatenate::concatenate
  12: re_log_types::data_table::DataTable::serialize_data_column
  13: re_log_types::data_table::DataTable::serialize
  14: <core::iter::adapters::chain::Chain<A,B> as core::iter::traits::iterator::Iterator>::try_fold
  15: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  16: re_viewer::app::save
  17: <re_viewer::app::App as eframe::epi::App>::update
  18: eframe::native::epi_integration::EpiIntegration::update
  19: <eframe::native::run::wgpu_integration::WgpuWinitApp as eframe::native::run::WinitApp>::paint
  20: eframe::native::run::run_and_return::{{closure}}
  21: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
  22: winit::platform_impl::platform::x11::EventLoop<T>::run_return
  23: eframe::native::run::run_and_return
  24: std::thread::local::LocalKey<T>::with
  25: eframe::native::run::wgpu_integration::run_wgpu

1 distinct user(s) affected by panic crash @ wgpu-0.15.1/src/backend/direct.rs:316

  • First occurrence: 2023-05-18T23:35:28.850000+00:00
  • Last occurrence: 2023-05-20T02:27:01.859000+00:00
  • Affected Rust versions: ['1.68.2 (9eb3afe9e 2023-03-27)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: wgpu::backend::direct::Context::handle_error_fatal
   8: <wgpu::backend::direct::Context as wgpu::context::Context>::device_poll
   9: <T as wgpu::context::DynContext>::device_poll
  10: wgpu::Device::poll
  11: re_renderer::context::RenderContext::begin_frame
  12: core::ops::function::FnOnce::call_once{{vtable.shim}}
  13: core::ops::function::FnOnce::call_once{{vtable.shim}}
  14: egui::containers::frame::Frame::show_dyn
  15: egui::containers::panel::CentralPanel::show_inside_dyn
  16: egui::containers::panel::CentralPanel::show_dyn
  17: <re_viewer::app::App as eframe::epi::App>::update
  18: egui::context::Context::run
  19: eframe::native::epi_integration::EpiIntegration::update
  20: <eframe::native::run::wgpu_integration::WgpuWinitApp as eframe::native::run::WinitApp>::paint
  21: eframe::native::run::run_and_return::{{closure}}
  22: winit::platform_impl::platform::x11::EventLoop<T>::run_return::single_iteration
  23: winit::platform_impl::platform::x11::EventLoop<T>::run_return
  24: eframe::native::run::run_and_return
  25: std::thread::local::LocalKey<T>::with
  26: eframe::native::run::wgpu_integration::run_wgpu
  27: eframe::run_native

1 distinct user(s) affected by panic crash @ winit-0.28.6/src/platform_impl/linux/mod.rs:757

  • First occurrence: 2023-05-15T12:50:30.691000+00:00
  • Last occurrence: 2023-05-15T12:50:30.691000+00:00
  • Affected Rust versions: ['1.68.2 (9eb3afe9e 2023-03-27)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   6: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
   7: winit::platform_impl::platform::EventLoop<T>::new
   8: std::thread::local::LocalKey<T>::with
   9: eframe::native::run::wgpu_integration::run_wgpu
  10: eframe::run_native

1 distinct user(s) affected by signal crash @ SIGABRT

  • First occurrence: 2023-05-15T13:46:46.504000+00:00
  • Last occurrence: 2023-05-15T13:46:46.504000+00:00
  • Affected Rust versions: ['1.68.2 (9eb3afe9e 2023-03-27)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   1: rerun::crash_handler::install_signal_handler::signal_handler
   2: <unknown>
   3: __libc_signal_restore_set
             at nptl-signals.h:80
      __GI_raise
             at raise.c:48
   4: __GI_abort
             at abort.c:79
   5: std::sys::unix::abort_internal
             at std/src/sys/unix/mod.rs:350:14
   6: std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:673:9
   7: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
   8: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
   9: rust_begin_unwind
             at std/src/panicking.rs:575:5
  10: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  11: std::io::stdio::print_to
             at std/src/io/stdio.rs:1008:9
      std::io::stdio::_eprint
             at std/src/io/stdio.rs:1085:5
  12: rerun::crash_handler::install_panic_hook::{{closure}}
  13: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at alloc/src/boxed.rs:2002:9
      std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:692:13
  14: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
  15: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
  16: rust_begin_unwind
             at std/src/panicking.rs:575:5
  17: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  18: std::io::stdio::print_to
             at std/src/io/stdio.rs:1008:9
      std::io::stdio::_eprint
             at std/src/io/stdio.rs:1085:5
  19: rerun::crash_handler::install_panic_hook::{{closure}}
  20: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at alloc/src/boxed.rs:2002:9
      std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:692:13
  21: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
  22: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
  23: rust_begin_unwind
             at std/src/panicking.rs:575:5
  24: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  25: core::result::unwrap_failed
             at core/src/result.rs:1790:5
  26: rerun::run::run_impl::{{closure}}::{{closure}}::{{closure}}
  27: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  28: tokio::runtime::task::core::Core<T,S>::poll
  29: tokio::runtime::task::harness::Harness<T,S>::poll
  30: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
  31: tokio::runtime::scheduler::multi_thread::worker::Context::run
  32: tokio::macros::scoped_tls::ScopedKey<T>::set
  33: tokio::runtime::scheduler::multi_thread::worker::run
  34: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
  35: tokio::runtime::task::core::Core<T,S>::poll
  36: tokio::runtime::task::harness::Harness<T,S>::poll
  37: tokio::runtime::blocking::pool::Inner::run

1 distinct user(s) affected by signal crash @ SIGABRT

  • First occurrence: 2023-05-14T16:47:35.588000+00:00
  • Last occurrence: 2023-05-14T16:47:35.588000+00:00
  • Affected Rust versions: ['1.67.1 (d5a82bbd2 2023-02-07)']
  • Affected Rerun versions: ['0.5.1']
  • Affected Targets: ['x86_64-unknown-linux-gnu']

Backtrace:

   1: rerun::crash_handler::install_signal_handler::signal_handler
   2: <unknown>
   3: __libc_signal_restore_set
             at internal-signals.h:86:3
      __GI_raise
             at raise.c:48:3
   4: __GI_abort
             at abort.c:79:7
   5: std::sys::unix::abort_internal
             at std/src/sys/unix/mod.rs:347:14
   6: std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:673:9
   7: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
   8: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
   9: rust_begin_unwind
             at std/src/panicking.rs:575:5
  10: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  11: std::io::stdio::print_to
             at std/src/io/stdio.rs:1009:9
      std::io::stdio::_eprint
             at std/src/io/stdio.rs:1086:5
  12: rerun::crash_handler::install_panic_hook::{{closure}}
  13: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at alloc/src/boxed.rs:2032:9
      std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:692:13
  14: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
  15: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
  16: rust_begin_unwind
             at std/src/panicking.rs:575:5
  17: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  18: std::io::stdio::print_to
             at std/src/io/stdio.rs:1009:9
      std::io::stdio::_eprint
             at std/src/io/stdio.rs:1086:5
  19: rerun::crash_handler::install_panic_hook::{{closure}}
  20: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at alloc/src/boxed.rs:2032:9
      std::panicking::rust_panic_with_hook
             at std/src/panicking.rs:692:13
  21: std::panicking::begin_panic_handler::{{closure}}
             at std/src/panicking.rs:579:13
  22: std::sys_common::backtrace::__rust_end_short_backtrace
             at std/src/sys_common/backtrace.rs:137:18
  23: rust_begin_unwind
             at std/src/panicking.rs:575:5
  24: core::panicking::panic_fmt
             at core/src/panicking.rs:64:14
  25: core::result::unwrap_failed
             at core/src/result.rs:1791:5
  26: rerun::run::run_impl::{{closure}}::{{closure}}::{{closure}}
  27: tokio::runtime::task::core::Core<T,S>::poll

PR Build Summary: https://build.rerun.io/pr/2168

@teh-cmc teh-cmc added 🧑‍💻 dev experience developer experience (excluding CI) 📊 analytics telemetry analytics labels May 17, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So nice!

# },
# "event": "crash-panic",
# "timestamp": "2023-05-11T20:17:52.479000+00:00",
# "person": null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is person null? It would be so nice to be able to say "this crash affects 3 distinct users`

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is person null?

This is a bit of a weird field that can be safely ignored; the distinct_id just above gives us all the information we need.

It would be so nice to be able to say "this crash affects 3 distinct users`

That's exactly what this PR does! I need to modify the headers' template to reflect that

@emilk emilk mentioned this pull request May 19, 2023
14 tasks
@teh-cmc teh-cmc merged commit c9212e9 into main May 20, 2023
@teh-cmc teh-cmc deleted the cmc/crash_tracker branch May 20, 2023 19:18
emilk added a commit that referenced this pull request May 22, 2023
* add crash fetcher script

* newline

* fmt

* typo

* uniques

* fmt

* format again........

* woops -- missing signals

* shebang, and chmod +x

* better header template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
emilk added a commit that referenced this pull request Jun 15, 2023
* add crash fetcher script

* newline

* fmt

* typo

* uniques

* fmt

* format again........

* woops -- missing signals

* shebang, and chmod +x

* better header template

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
@emilk emilk mentioned this pull request Jun 15, 2023
3 tasks
@emilk emilk changed the title scripts: add crash retriever script Add crash retriever script Jun 15, 2023
@emilk emilk mentioned this pull request Jun 15, 2023
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📊 analytics telemetry analytics 🧑‍💻 dev experience developer experience (excluding CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants