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

Fix CI target for Fedora #152

Merged
merged 2 commits into from
Nov 16, 2023
Merged

Fix CI target for Fedora #152

merged 2 commits into from
Nov 16, 2023

Conversation

pablogsal
Copy link
Member

Seems that the latest fedora image ships Python 3.12 with not enough
debugging symbols to provide native information for core files.
Apparently the python3-debug package only provides the debug version of
the runtime and doesn't also provide split-debug information for the
main executable.

Luckily, Fedora runs a debuginfod server that we can leverage to obtain
the debugging symbols that we need.

@pablogsal
Copy link
Member Author

@hroncok do you know if there is any other way to obtain debugging symbols for the main executable of CPython in Fedora other than using debuginfod?

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2023

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (772a0bc) 89.91% compared to head (095a502) 89.71%.

Files Patch % Lines
src/pystack/_pystack/pythread.cpp 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #152      +/-   ##
==========================================
- Coverage   89.91%   89.71%   -0.21%     
==========================================
  Files          48       48              
  Lines        5496     5505       +9     
  Branches      873      873              
==========================================
- Hits         4942     4939       -3     
- Misses        554      566      +12     
Flag Coverage Δ
cpp 74.86% <0.00%> (-0.44%) ⬇️
python_and_cython 99.93% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hroncok
Copy link

hroncok commented Nov 16, 2023

Something like dnf debuginfo-install python3-libs python3

@pablogsal pablogsal force-pushed the fix_fedora branch 2 times, most recently from ab78ee5 to 5321c1c Compare November 16, 2023 13:11
@pablogsal pablogsal force-pushed the fix_fedora branch 6 times, most recently from aa31bcb to f543c03 Compare November 16, 2023 16:26
Seems that the latest fedora image ships Python 3.12 with not enough
debugging symbols to provide native information for core files.
Apparently the python3-debug package only provides the debug version of
the runtime and doesn't also provide split-debug information for the
main executable.

To obtain the symbols we need we need to manually install them by
running `dnf debuginfo-install python3`.

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
@pablogsal pablogsal force-pushed the fix_fedora branch 3 times, most recently from 72ac019 to 095a502 Compare November 16, 2023 23:22
@pablogsal pablogsal enabled auto-merge (rebase) November 16, 2023 23:30
src/pystack/_pystack/pythread.cpp Outdated Show resolved Hide resolved
src/pystack/_pystack/pythread.cpp Outdated Show resolved Hide resolved
src/pystack/_pystack/pythread.cpp Outdated Show resolved Hide resolved
To get the pthread id we copy a buffer of 200 pointers from the
start of the pthread structure and try to match the pid inside. It is
possible that the process doesn't have that much space available in a
valid memory map so reading this much memory will fail.

To fix this, try to reduce the size of the buffer by half every time we
fail to copy from the process until we succeed or we reach 0.

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
Copy link
Contributor

@godlygeek godlygeek left a comment

Choose a reason for hiding this comment

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

LGTM

@pablogsal pablogsal merged commit 6f2af72 into bloomberg:main Nov 16, 2023
26 checks passed
@pablogsal pablogsal deleted the fix_fedora branch November 16, 2023 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants