Traverse-Research / Traverse-Research/gpu-allocator

Assert when collecting backtraces

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
497
Forks
82
Avg merge
18d 17h
Merged PRs (30d)
1

Description

When store_stack_traces is on (which it is by default) we occasionally get a crash in the backtrace crate. It would seem we're asserting in this line: https://github.com/rust-lang/backtrace-rs/blob/47069af003d7f4ca62f5b4517a43039c46dfc34d/src/dbghelp.rs#L315

OS Version: windows None (None)
Report Version: 104


Application Specific Information:
assertion failed: `(left == right)`
  left: `128`,
 right: `0`

Thread 0 Crashed:
0   std                             0x7ff7e6d46b7c      std::panicking::begin_panic_fmt (panicking.rs:437)
1   backtrace                       0x7ff7e695cbdc      backtrace::dbghelp::init (dbghelp.rs:315)
2   backtrace                       0x7ff7e695b8f4      backtrace::symbolize::dbghelp::resolve (dbghelp.rs:76)
3   backtrace                       0x7ff7e695995a      [inlined] backtrace::symbolize::resolve_frame_unsynchronized (mod.rs:178)
4   backtrace                       0x7ff7e695995a      backtrace::symbolize::resolve_frame<T> (mod.rs:105)
5   backtrace                       0x7ff7e6958ee8      backtrace::capture::Backtrace::resolve (capture.rs:232)
6   backtrace                       0x7ff7e6958db5      backtrace::capture::Backtrace::new (capture.rs:141)
7   gpu_allocator                   0x7ff7e6875c5f      gpu_allocator::VulkanAllocator::allocate (lib.rs:688)
8   breda                           0x7ff7e67c7a01      breda::renderer::vulkan::allocator::gpu_allocator_wrapper::{{impl}}::alloc (gpu_allocator_wrapper.rs:100)
...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported call path from gpu_allocator::VulkanAllocator::allocate in lib.rs:688 through gpu_allocator_wrapper.rs:100, then inspect the backtrace crate assertion in src/dbghelp.rs:315. Reproduce or analyze the Windows crash with store_stack_traces enabled; done means the allocator no longer crashes while collecting backtraces.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.