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

ci: Fix test suite on Alpine #185

Merged
merged 1 commit into from
May 24, 2024
Merged

Conversation

godlygeek
Copy link
Contributor

We're no longer able to correctly identify _PyEval_EvalFrameDefault on Alpine without debug info.

This test was already adding symlinks to the split debug info for ld-musl, so let's extend that hack to also symlink to the split debug info for libpython.

@godlygeek
Copy link
Contributor Author

The native frames that we get without the libpython debug info are:

(Pdb) pp thread.native_frames
[NativeFrame(address=139924869601034,
             symbol='libc_start_main_stage2',
             path='src/env/__libc_start_main.c',
             linenumber=95,
             colnumber=2,
             library='ld-musl-x86_64.so.1'),
 NativeFrame(address=139924865323059,
             symbol='PyEval_EvalCode',                                                                                                                                                                                                                                                         path='???',                                                                                                                                                                                                                                                                       linenumber=0,                                                                                                                                                                                                                                                                     colnumber=0,
             library='libpython3.12.so.1.0'),
 NativeFrame(address=139924864862184,
             symbol='PyObject_Vectorcall',
             path='???',
             linenumber=0,
             colnumber=0,
             library='libpython3.12.so.1.0'),
 NativeFrame(address=139924869877633,
             symbol='clock_nanosleep',
             path='src/time/clock_nanosleep.c',
             linenumber=34,
             colnumber=10,
             library='ld-musl-x86_64.so.1'),
 NativeFrame(address=139924869858839,
             symbol='__syscall_cp_c',
             path='src/thread/pthread_cancel.c',
             linenumber=33,
             colnumber=6,
             library='ld-musl-x86_64.so.1'),
 NativeFrame(address=139924869872018,                                                                                                                                                                                                                                                          symbol='__cp_end',                                                                                                                                                                                                                                                                path='src/thread/x86_64/syscall_cp.s',                                                                                                                                                                                                                                            linenumber=29,
             colnumber=0,
             library='ld-musl-x86_64.so.1')]

We see PyObject_Vectorcall and PyEval_EvalCode, but not _PyEval_EvalFrameDefault, so

def _is_eval_frame(symbol: str, python_version: Tuple[int, int]) -> bool:
    if python_version < (3, 6):
        return "PyEval_EvalFrameEx" in symbol
    return "_PyEval_EvalFrameDefault" in symbol

is returning false for every frame, and we're not able to produce a hybrid stack.

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM with one nit :)

We're no longer able to correctly identify `_PyEval_EvalFrameDefault` on
Alpine without debug info.

This test was already adding symlinks to the split debug info for
`ld-musl`, so let's extend that hack to also symlink to the split debug
info for `libpython`.

Signed-off-by: Matt Wozniski <[email protected]>
@godlygeek godlygeek merged commit 0d51fec into bloomberg:main May 24, 2024
20 checks passed
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.

2 participants