← Back to Pull requests

Make Linux version parsing from `uname` more robust #279

Closed
unknown closed this pull request without merging on Nov 23, 2026 23:48 UTC
View on GitHub
unknown unknown commented on Nov 23, 2026 15:55 UTC
Author

Debian 13 (trixie, released in 2025) switched its uname output to something like 6.12.x+deb13-amd64, which puts +deb13 before the first -, which breaks the old parsing code.

This PR moves the parsing code to a function, makes it more robust, and adds a regression test (which is maybe skippable if you don't need the belt-and-suspenders approach).

I noticed this because pyperf show failed on my laptop. I got:

Unit irqbalance.service could not be found.
Show the system configuration

System state
============

CPU: use 12 logical CPUs: 0-11
Perf event: Maximum sample rate: 100000 per second
ASLR: Full randomization
CPU Frequency: 0-3,6-9=min=800 MHz, max=4800 MHz; 4-5,10-11=min=800 MHz, max=4900 MHz
IRQ affinity: Default IRQ affinity: CPU 0-11
IRQ affinity: IRQ affinity: IRQ 0-17,19,27,35,120-132,147-148,160,168,176-177,193,206-209=CPU 0-11; IRQ 149,195=CPU 1; IRQ 150,201=CPU 7; IRQ 151,197=CPU 3; IRQ 152,203=CPU 9; IRQ 153,198=CPU 4; IRQ 154,204=CPU 10; IRQ 155,199=CPU 5; IRQ 156,205=CPU 11; IRQ 157,196=CPU 2; IRQ 158,202=CPU 8; IRQ 159,194=CPU 0; IRQ 192,200=CPU 6
Power supply: the power cable is plugged
CPU scaling governor: 0-11=powersave
Turbo Boost (intel_pstate): Turbo Boost enabled

Advices
=======

Perf event: Set max sample rate to 1
CPU scaling governor: Use CPU scaling governor 'performance'
Turbo Boost (intel_pstate): Disable Turbo Boost to get more reliable CPU frequency

Errors
======

Linux scheduler: Failed to get the Linux version: release='7.3.4+deb14-amd64'

Run "python -m pyperf system tune" to tune the system configuration to run benchmarks

With the fix, I get:

Unit irqbalance.service could not be found.
Show the system configuration

System state
============

CPU: use 12 logical CPUs: 0-11
Perf event: Maximum sample rate: 100000 per second
ASLR: Full randomization
Linux scheduler: No CPU is isolated
CPU Frequency: 0-3,6-9=min=800 MHz, max=4800 MHz; 4-5,10-11=min=800 MHz, max=4900 MHz
IRQ affinity: Default IRQ affinity: CPU 0-11
IRQ affinity: IRQ affinity: IRQ 0-17,19,27,35,120-132,147-148,160,168,176-177,193,206-209=CPU 0-11; IRQ 149,195=CPU 1; IRQ 150,201=CPU 7; IRQ 151,197=CPU 3; IRQ 152,203=CPU 9; IRQ 153,198=CPU 4; IRQ 154,204=CPU 10; IRQ 155,199=CPU 5; IRQ 156,205=CPU 11; IRQ 157,196=CPU 2; IRQ 158,202=CPU 8; IRQ 159,194=CPU 0; IRQ 192,200=CPU 6
Power supply: the power cable is plugged
CPU scaling governor: 0-11=powersave
Turbo Boost (intel_pstate): Turbo Boost enabled

Advices
=======

Perf event: Set max sample rate to 1
Linux scheduler: Use isolcpus=<cpu list> kernel parameter to isolate CPUs
Linux scheduler: Use rcu_nocbs=<cpu list> kernel parameter (with isolcpus) to not schedule RCU on isolated CPUs
CPU scaling governor: Use CPU scaling governor 'performance'
Turbo Boost (intel_pstate): Disable Turbo Boost to get more reliable CPU frequency

Run "python -m pyperf system tune" to tune the system configuration to run benchmarks

Diff: 367 lines (+275 / -92) across 4 files Reviewer: hugovk Review duration: 472m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 367 lines diff across 4 files
0.43
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.353
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #279"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 42.7% (MEDIUM) · Higher = larger blast radius
42.7%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 16.9% · Safe to merge
16.9%
Repository