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

python: consider a backtrace handler for debugging #1583

Closed
lidavidm opened this issue Mar 1, 2024 · 1 comment · Fixed by #1599
Closed

python: consider a backtrace handler for debugging #1583

lidavidm opened this issue Mar 1, 2024 · 1 comment · Fixed by #1599
Assignees
Labels
Type: enhancement New feature or request

Comments

@lidavidm
Copy link
Member

lidavidm commented Mar 1, 2024

What feature or improvement would you like to see?

We've gotten occasional reports of things crashing without further explanation that have been hard for us to reproduce (#1531, #1522, #1476). In these cases, being able to at least get a stack trace would be useful. I would propose the following:

  • Statically link backward-cpp or similar in the Python driver manager with enough dependencies to produce a full backtrace
  • Enable the backtrace handler on startup via an environment variable
  • Build Cython code and all drivers with debug info so that we can get a backtrace
  • Include backward-cpp in the LICENSE since we would be shipping it statically

TODOs:

  • This may increase binary size a lot, should we consider separate packages? (Does backward-cpp work with something like debuglink? It seems yes: https://github.com/bombela/backward-cpp/issues/160. At least for wheels, we could either ship a separate wheel in the GitHub release with debug info, or we could split off the debug info and offer it as a separate download. We should measure this.)
  • How should we get Golang backtraces into this?
@lidavidm lidavidm added the Type: enhancement New feature or request label Mar 1, 2024
@lidavidm lidavidm self-assigned this Mar 1, 2024
@lidavidm lidavidm added this to the ADBC Libraries 0.11.0 milestone Mar 1, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 7, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 7, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 8, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 8, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 18, 2024
@lidavidm
Copy link
Member Author

lidavidm commented Mar 18, 2024

We can't do this because the default backtrace mechanism only recognizes exported symbols (making the resulting backtrace not very useful) and the more advanced backtrace mechanisms require linking (L)GPL libraries (which we obviously cannot do). We can at least build with debug info and let people figure out backtraces themselves.

lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 19, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 19, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 19, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 20, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 20, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 25, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 26, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 26, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 26, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 26, 2024
lidavidm added a commit to lidavidm/arrow-adbc that referenced this issue Mar 26, 2024
lidavidm added a commit that referenced this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant