Commit 03c1189
daemon: rx-watchdog also detects the partial (outbound-dial) wedge (#387)
The v1.12.5 watchdog catches a FULL inbound wedge (PktsRecv fully stalls)
and is production-proven. But 2026-07-15 the overlay went dark in a way it
missed: pilot-director and list-agents both failed with dial timeouts while
PktsRecv kept *trickling* forward from a couple of peer keepalives — so the
rx-silence timer reset every tick and the watchdog stayed quiet. Only a
manual daemon restart cleared it (its re-registration re-punched the NAT
mapping).
Add an outbound signal: DialConnection records a success (clears the
counter) or a full-budget timeout (increments consecutiveDialTimeouts). The
watchdog now treats dialTimeouts >= dialWedgeThreshold (4 back-to-back dial
failures, zero successes between — implausible unless our own send path is
dead) as a wedge, even while rx trickles: rx progress no longer counts as
healthy in that state. It runs the same soft-recovery (beacon + registry
re-register) and, if it persists, the same guarded hard-exit → supervisor
respawn. The soft path resets the dial counter so the next real dial
re-tests, avoiding a stale-counter false exit when no dials have happened.
Co-authored-by: Teodor Calin <teodor@vulturelabs.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 6290271 commit 03c1189
3 files changed
Lines changed: 138 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
353 | 368 | | |
354 | 369 | | |
355 | 370 | | |
| |||
3674 | 3689 | | |
3675 | 3690 | | |
3676 | 3691 | | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
3677 | 3696 | | |
3678 | 3697 | | |
3679 | 3698 | | |
| |||
3720 | 3739 | | |
3721 | 3740 | | |
3722 | 3741 | | |
| 3742 | + | |
| 3743 | + | |
| 3744 | + | |
| 3745 | + | |
3723 | 3746 | | |
3724 | 3747 | | |
3725 | 3748 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
136 | 146 | | |
137 | 147 | | |
138 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
139 | 157 | | |
140 | | - | |
| 158 | + | |
141 | 159 | | |
142 | | - | |
| 160 | + | |
143 | 161 | | |
144 | 162 | | |
145 | 163 | | |
| |||
154 | 172 | | |
155 | 173 | | |
156 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
157 | 184 | | |
158 | 185 | | |
159 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
160 | 189 | | |
161 | 190 | | |
162 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
163 | 200 | | |
164 | 201 | | |
165 | 202 | | |
| |||
169 | 206 | | |
170 | 207 | | |
171 | 208 | | |
172 | | - | |
| 209 | + | |
| 210 | + | |
173 | 211 | | |
174 | 212 | | |
| 213 | + | |
175 | 214 | | |
176 | 215 | | |
177 | 216 | | |
178 | 217 | | |
| 218 | + | |
179 | 219 | | |
180 | 220 | | |
| 221 | + | |
181 | 222 | | |
182 | 223 | | |
183 | 224 | | |
184 | | - | |
185 | | - | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
186 | 229 | | |
187 | 230 | | |
188 | 231 | | |
189 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
190 | 239 | | |
191 | 240 | | |
192 | 241 | | |
| |||
212 | 261 | | |
213 | 262 | | |
214 | 263 | | |
215 | | - | |
| 264 | + | |
| 265 | + | |
216 | 266 | | |
217 | 267 | | |
| 268 | + | |
218 | 269 | | |
219 | 270 | | |
220 | 271 | | |
221 | 272 | | |
| 273 | + | |
222 | 274 | | |
223 | 275 | | |
| 276 | + | |
224 | 277 | | |
225 | 278 | | |
226 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
0 commit comments