Skip to content

Demangle in-VM backtraces from C++ and Rust plugins. #299

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

Merged
merged 3 commits into from
Aug 2, 2022

Conversation

PiotrSikora
Copy link
Member

@PiotrSikora PiotrSikora commented Jul 31, 2022

Before:

Proxy-Wasm plugin in-VM backtrace:
0: 0x60c3 - rust_oom
1: 0x6d2c - __rg_oom
2: 0x38b1 - __rust_alloc_error_handler
3: 0x6cb3 - _ZN5alloc5alloc18handle_alloc_error8rt_error17hc05c98d79426d4d3E
4: 0x6ca5 - _ZN4core3ops8function6FnOnce9call_once17h104529aa81b44c4eE
5: 0x6d1e - _ZN4core10intrinsics17const_eval_select17hbbf517c24e8eee9cE
6: 0x6cc1 - _ZN5alloc5alloc18handle_alloc_error17hd51ecca19a6d9162E
7: 0x519 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17h4065aea9ced9d1eeE
8: 0x2b9 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16with_capacity_in17h2c8a17f6c910dc68E
9: 0x303a - _ZN5alloc3vec16Vec$LT$T$C$A$GT$16with_capacity_in17hb7917fc637d55bb8E

After:

Proxy-Wasm plugin in-VM backtrace:
0: 0x60c3 - rust_oom
1: 0x6d2c - __rg_oom
2: 0x38b1 - __rust_alloc_error_handler
3: 0x6cb3 - alloc::alloc::handle_alloc_error::rt_error::hc05c98d79426d4d3
4: 0x6ca5 - core::ops::function::FnOnce::call_once::h104529aa81b44c4e
5: 0x6d1e - core::intrinsics::const_eval_select::hbbf517c24e8eee9c
6: 0x6cc1 - alloc::alloc::handle_alloc_error::hd51ecca19a6d9162
7: 0x519 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::h4065aea9ced9d1ee
8: 0x2b9 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::with_capacity_in::h2c8a17f6c910dc68
9: 0x303a - alloc::vec::Vec$LT$T$C$A$GT$::with_capacity_in::hb7917fc637d55bb8

Signed-off-by: Piotr Sikora [email protected]

Before:

ERROR from integration: Function: infinite_memory failed: Uncaught RuntimeError: unreachable
Proxy-Wasm plugin in-VM backtrace:
  0:  0x60c3 - rust_oom
  1:  0x6d2c - __rg_oom
  2:  0x38b1 - __rust_alloc_error_handler
  3:  0x6cb3 - _ZN5alloc5alloc18handle_alloc_error8rt_error17hc05c98d79426d4d3E
  4:  0x6ca5 - _ZN4core3ops8function6FnOnce9call_once17h104529aa81b44c4eE
  5:  0x6d1e - _ZN4core10intrinsics17const_eval_select17hbbf517c24e8eee9cE
  6:  0x6cc1 - _ZN5alloc5alloc18handle_alloc_error17hd51ecca19a6d9162E
  7:  0x519 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17h4065aea9ced9d1eeE
  8:  0x2b9 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16with_capacity_in17h2c8a17f6c910dc68E
  9:  0x303a - _ZN5alloc3vec16Vec$LT$T$C$A$GT$16with_capacity_in17hb7917fc637d55bb8E

After:

ERROR from integration: Function: infinite_memory failed: Uncaught RuntimeError: unreachable
Proxy-Wasm plugin in-VM backtrace:
  0:  0x60c3 - rust_oom
  1:  0x6d2c - __rg_oom
  2:  0x38b1 - __rust_alloc_error_handler
  3:  0x6cb3 - alloc::alloc::handle_alloc_error::rt_error::hc05c98d79426d4d3
  4:  0x6ca5 - core::ops::function::FnOnce::call_once::h104529aa81b44c4e
  5:  0x6d1e - core::intrinsics::const_eval_select::hbbf517c24e8eee9c
  6:  0x6cc1 - alloc::alloc::handle_alloc_error::hd51ecca19a6d9162
  7:  0x519 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::h4065aea9ced9d1ee
  8:  0x2b9 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::with_capacity_in::h2c8a17f6c910dc68
  9:  0x303a - alloc::vec::Vec$LT$T$C$A$GT$::with_capacity_in::hb7917fc637d55bb8

Signed-off-by: Piotr Sikora <[email protected]>
Signed-off-by: Piotr Sikora <[email protected]>
@PiotrSikora PiotrSikora marked this pull request as ready for review July 31, 2022 09:23
@PiotrSikora PiotrSikora requested a review from mathetake as a code owner July 31, 2022 09:23
Copy link
Contributor

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

Oh cool love this

@PiotrSikora PiotrSikora merged commit d8a7847 into proxy-wasm:master Aug 2, 2022
knm3000 pushed a commit to knm3000/proxy-wasm-cpp-host that referenced this pull request Aug 17, 2022
Before:

Proxy-Wasm plugin in-VM backtrace:
  0:  0x60c3 - rust_oom
  1:  0x6d2c - __rg_oom
  2:  0x38b1 - __rust_alloc_error_handler
  3:  0x6cb3 - _ZN5alloc5alloc18handle_alloc_error8rt_error17hc05c98d79426d4d3E
  4:  0x6ca5 - _ZN4core3ops8function6FnOnce9call_once17h104529aa81b44c4eE
  5:  0x6d1e - _ZN4core10intrinsics17const_eval_select17hbbf517c24e8eee9cE
  6:  0x6cc1 - _ZN5alloc5alloc18handle_alloc_error17hd51ecca19a6d9162E
  7:  0x519 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$11allocate_in17h4065aea9ced9d1eeE
  8:  0x2b9 - _ZN5alloc7raw_vec19RawVec$LT$T$C$A$GT$16with_capacity_in17h2c8a17f6c910dc68E
  9:  0x303a - _ZN5alloc3vec16Vec$LT$T$C$A$GT$16with_capacity_in17hb7917fc637d55bb8E

After:

Proxy-Wasm plugin in-VM backtrace:
  0:  0x60c3 - rust_oom
  1:  0x6d2c - __rg_oom
  2:  0x38b1 - __rust_alloc_error_handler
  3:  0x6cb3 - alloc::alloc::handle_alloc_error::rt_error::hc05c98d79426d4d3
  4:  0x6ca5 - core::ops::function::FnOnce::call_once::h104529aa81b44c4e
  5:  0x6d1e - core::intrinsics::const_eval_select::hbbf517c24e8eee9c
  6:  0x6cc1 - alloc::alloc::handle_alloc_error::hd51ecca19a6d9162
  7:  0x519 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::allocate_in::h4065aea9ced9d1ee
  8:  0x2b9 - alloc::raw_vec::RawVec$LT$T$C$A$GT$::with_capacity_in::h2c8a17f6c910dc68
  9:  0x303a - alloc::vec::Vec$LT$T$C$A$GT$::with_capacity_in::hb7917fc637d55bb8

Signed-off-by: Piotr Sikora <[email protected]>
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.

3 participants