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

Fixes for merging native frames #129

Merged
merged 1 commit into from
Jul 8, 2019
Merged

Fixes for merging native frames #129

merged 1 commit into from
Jul 8, 2019

Conversation

benfred
Copy link
Owner

@benfred benfred commented Jul 8, 2019

There were two main error cases remaining when I test on linux:

  1. Failed to get a native stack

I've seen cases where we can only get 1-2 native frames, even though there is a
valid python stack being returned. This seems to be in libmkl_avx512.so on anaconda
3.7.2 - and I failed to unwind with libunwind/gdb and the gimli based unwinder.

GDB in this case returned a message complaining about a 'corrupt stack trace'.

Rather than error out, just insert the native frames w/ the python stack.

  1. 1 more native python frame

The other error seems to be where we have exactly 1 more python PyEval_Frame* function
in the native stack than we have frames for in the python stack. This seems to happen
when the python function is finished, and the frame structure has been updated in
python but the native function hasn't exitted yet. Just allow this for now.

Also add an example program to stress test native unwinding.

There were two main error cases remaining when I test on linux:

1) Failed to get a native stack

I've seen cases where we can only get 1-2 native frames, even though there is a
valid python stack being returned. This seems to be in libmkl_avx512.so on anaconda
3.7.2 - and I failed to unwind with libunwind/gdb and the gimli based unwinder.

GDB in this case returned a message complaining about a 'corrupt stack trace'.

Rather than error out, just insert the native frames w/ the python stack.

2) 1 more native python frame

The other error seems to be where we have exactly 1 more python PyEval_Frame* function
in the native stack than we have frames for in the python stack. This seems to happen
when the python function is finished, and the frame structure has been updated in
python but the native function hasn't exitted yet.  Just allow this for now.

Also add an example program to stress test native unwinding.
@benfred benfred merged commit 1717b91 into master Jul 8, 2019
@benfred benfred deleted the native_merge_tweaks branch July 8, 2019 04:50
@benfred benfred mentioned this pull request Jul 14, 2019
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.

None yet

1 participant