Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Tidal
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
Tidal
Commits
18fea207
Commit
18fea207
authored
Sep 07, 2026
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(doctor): churn fails on a storm in progress, warns on one that is over
parent
ed2515b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
11 deletions
+22
-11
rig-doctor.py
tools/rig-doctor.py
+22
-11
No files found.
tools/rig-doctor.py
View file @
18fea207
...
@@ -568,27 +568,38 @@ def check_wireplumber_churn() -> None:
...
@@ -568,27 +568,38 @@ def check_wireplumber_churn() -> None:
The existing checks only see the WRECKAGE (a failed unit, a dummy sink).
The existing checks only see the WRECKAGE (a failed unit, a dummy sink).
This one sees the CAUSE, while audio still works.
This one sees the CAUSE, while audio still works.
"""
"""
def
starts_since
(
window
:
str
)
->
int
|
None
:
rc
,
out
,
_
=
run_cmd
([
"journalctl"
,
"--user"
,
"-u"
,
"wireplumber"
,
rc
,
out
,
_
=
run_cmd
([
"journalctl"
,
"--user"
,
"-u"
,
"wireplumber"
,
"--since"
,
"-1h"
,
"--no-pager"
,
"-o"
,
"cat"
],
timeout
=
15
)
"--since"
,
window
,
"--no-pager"
,
"-o"
,
"cat"
],
timeout
=
15
)
if
rc
!=
0
:
return
None
if
rc
!=
0
else
len
(
re
.
findall
(
r"^Started wireplumber"
,
out
,
re
.
M
))
# TWO windows on purpose. A storm an hour ago is history — the box may have
# been healed since, and a check that keeps failing over a fixed past is a
# check PLN learns to scroll past. What blocks a set is a storm that is
# still running.
recent
,
hour
=
starts_since
(
"-15min"
),
starts_since
(
"-1h"
)
if
recent
is
None
or
hour
is
None
:
add
(
"DEVICES"
,
"wireplumber churn"
,
WARN
,
"could not read the journal"
)
add
(
"DEVICES"
,
"wireplumber churn"
,
WARN
,
"could not read the journal"
)
return
return
starts
=
len
(
re
.
findall
(
r"^Started wireplumber"
,
out
,
re
.
M
))
starts
=
hour
# `bt-audio-fix` is the only known restarter on this box; naming it saves
# `bt-audio-fix` is the only known restarter on this box; naming it saves
# the next hour of wondering who is doing this.
# the next hour of wondering who is doing this.
rc2
,
bt
,
_
=
run_cmd
([
"journalctl"
,
"--user"
,
"--since"
,
"-1h"
,
rc2
,
bt
,
_
=
run_cmd
([
"journalctl"
,
"--user"
,
"--since"
,
"-1h"
,
"--no-pager"
,
"-o"
,
"cat"
,
"-t"
,
"bt-audio-fix"
],
timeout
=
15
)
"--no-pager"
,
"-o"
,
"cat"
,
"-t"
,
"bt-audio-fix"
],
timeout
=
15
)
heals
=
len
(
re
.
findall
(
r"healing WirePlumber|restarting WirePlumber"
,
bt
))
heals
=
len
(
re
.
findall
(
r"healing WirePlumber|restarting WirePlumber"
,
bt
))
detail
=
f
"{starts} start(s) in the last hour"
+
(
f
", {heals} from bt-audio-fix"
if
heals
else
""
)
detail
=
(
f
"{recent} start(s) in the last 15 min, {starts} in the hour"
if
starts
>=
10
:
+
(
f
", {heals} from bt-audio-fix"
if
heals
else
""
))
add
(
"DEVICES"
,
"wireplumber churn"
,
FAIL
,
detail
+
" — a restart storm; "
fix
=
"journalctl --user -t bt-audio-fix --since -1h # who is restarting it, and why"
"this ends in start-limit-hit (no devices at all) and it kills every "
if
recent
>=
4
:
"SuperDirt link on the way"
,
add
(
"DEVICES"
,
"wireplumber churn"
,
FAIL
,
detail
+
" — a storm IN PROGRESS; "
"journalctl --user -t bt-audio-fix --since -1h # who is restarting it, and why"
)
"it ends in start-limit-hit (no devices at all) and it kills every "
"SuperDirt link on the way"
,
fix
)
elif
starts
>=
8
:
add
(
"DEVICES"
,
"wireplumber churn"
,
WARN
,
detail
+
" — a storm earlier this "
"hour, quiet now; a flapping Bluetooth device is the usual cause"
,
fix
)
elif
starts
>=
4
:
elif
starts
>=
4
:
add
(
"DEVICES"
,
"wireplumber churn"
,
WARN
,
detail
+
" — more than a boot's "
add
(
"DEVICES"
,
"wireplumber churn"
,
WARN
,
detail
+
" — more than a boot's "
"worth; a flapping Bluetooth device is the usual cause"
,
"worth of restarts"
,
fix
)
"journalctl --user -t bt-audio-fix --since -1h"
)
else
:
else
:
add
(
"DEVICES"
,
"wireplumber churn"
,
PASS
,
detail
)
add
(
"DEVICES"
,
"wireplumber churn"
,
PASS
,
detail
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment