Repository navigation
fix: deleted_libraries.py counts only the first deleted library per process - #281
Open
Bierchermuesli wants to merge 1 commit into
Open
Bierchermuesli wants to merge 1 commit into
Bierchermuesli wants to merge 1 commit into
Conversation
The counting block is nested under "first time this process is seen", so only the first deleted library of each process was recorded. A process still mapping a stale libssl and libc showed up under one of them only. On a test host after upgrades the script reported 3 libraries / 15 process-library pairs instead of 14 / 75. Dedent the block so it runs for every matching line. The bug has been there since the script was added in f393634. Signed-off-by: Stefan Grosser <13567009+Bierchermuesli@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
deleted_libraries.pyonly records the first deleted library of each process. The counting block is indented one level too deep, underif path not in processes_linking_deleted_libraries:, so it only runs the first time a process is seen.A process still mapping a stale
libsslandlibcafter an upgrade shows up under one of them only. Alerts on "any process links a deleted library" still fire, but per-library counts andtopk by (library_name)views miss most of the picture. On a test host after upgrades:This dedents the block so it runs for every matching line. The per-process
{library: count}map and the rest of the script are unchanged. The bug dates back to f393634 (#957), when the script was added.flake8clean. Results cross-checked against an independent shell/awk implementation of the same logic over/proc/*/maps, identical sample for sample.