protonscr

`dlclose` on `libdxvk_dxgi` causes gdb to fail

dxvkopen native
doitsujin/dxvk#3330 · opened 2023-04-03 by expipiplus1 · updated 2025-05-24 · 0 comments · github
Eexpipiplus1 2023-04-03 github

I'm quite reticent to report this as an issue here as there's probably not anything specific this library is doing which is causing this behavior, however I'm only able to reproduce this with dxvk. At the least, perhaps this might end up as a breadcrumb for the next person.

dlclose on libdxvk_dxgi causes gdb to emit a warning and soon after fail:

To reproduce:

  • Compile the below program to a.out
  • run gdb a.out
    • break main

    • run

    • next

    • next

    • ...

    • Observe that after stepping over the call to dlclose gdb warns: warning: Error removing breakpoint 0

    • next

    • Observe that after stepping over the next call to printf gdb fails with:

      Warning:
      Cannot insert breakpoint 0.
      Cannot access memory at address 0x7ffff75c8200
      
      Command aborted.
      

Reproducer: https://gist.github.com/expipiplus1/c70ae7ca22ff912341a710af66f1270a
Example gdb session: https://gist.github.com/expipiplus1/c5791556466dc9e8fe7681e957e1f60d
Valgrind run: https://gist.github.com/expipiplus1/8ef11df922075be93e01acce40d5ee99
Reproducing container: https://gist.github.com/expipiplus1/5c57dd0b01061bc5dae73deb84291e2f

Software information

  • gdb 13.1
  • 12.2.0

System information

  • NixOS
  • DXVK version: 2.1 and 306919047bffb3d8f30159c219722741728904e2

Nothing extracted yet.