操作系统/Operating System
Windows
系统版本/Operating System Version
Windows 10
App版本/App Version
v1.2.26.2900
描述/Description
Related: #1919, #1909
The checkbox "Automatically remove servers that fail latency tests" controls more than just server removal - it gates the entire latency pipeline. Without it, latency tests may run (values appear in Zashboard), but the data is never applied, never persists, and the core never reloads.
Test results
Checkbox ON on stuck subscription:
- Enabled checkbox on the stuck subscription (the one with the dead node)
- Manually triggered latency test
- Core restarted, removed dead servers, connected to fastest node
- Other subscriptions (without checkbox) also started running latency tests over time
Checkbox ON on different subscription:
- Enabled checkbox on a different subscription (not the stuck one)
- Manually triggered latency test
- That subscription's dead servers were removed, core reloaded (same "reload after deleted failed" notification)
- Stuck subscription remained stuck, no other subscriptions ran latency tests
Checkbox OFF everywhere:
- Manually triggered latency test on stuck subscription
- Latency values appeared in Zashboard, but group remained stuck on dead node
- Restarted Karing - all latency data gone, still stuck
- Waited 10+ minutes - no subscription ran latency tests
Comparison
|
Checkbox ON (stuck) |
Checkbox ON (different) |
Checkbox OFF |
| Manual test runs |
Yes |
Yes |
Yes |
| Latency data appears |
Yes |
Yes (temporarily) |
Yes (temporarily) |
| Flagged subscription's dead servers removed |
Yes |
Yes |
No |
| Stuck subscription switches to fastest |
Yes |
No |
No |
| Data persists after restart |
Yes |
No |
No |
| Other subscriptions run latency tests |
Yes |
No |
No |
Same groups, same rules, same subscriptions, same backup state, same health check interval (2 min). Only difference was which subscription had the checkbox.
Additional observations
- Cascading failure: Disabling the stuck server doesn't help - the next one in line (same subscription) is also dead. Same 0/0 stall.
- Manual removal doesn't help: Deleting dead servers by hand doesn't restore traffic. Only the checkbox triggers the core reload (
_onEventLatencyUpdate → setServerAndReload()) that actually unblocks connection.
- Ghost ping: A few nodes from other subscriptions show ping in Zashboard and change on restart, but carry 0/0 traffic. When the checkbox works correctly, ~10x more servers are pinged. Latency data is collected but never applied to selection.
Possible root cause in source code
In server_manager.dart schedulerTestLatency() (L1375), after all tests complete, removeLatencyError() is only called for subscriptions where testLatencyAutoRemove == true (L1434-1444). Only if change == true does the subscription get added to _latencyUpdatedConfigs, and only if this set is non-empty does the _onEventLatencyUpdate callback fire.
In home_screen.dart _onEventLatencyUpdate() (L1246), there is a second check: testLatencyAutoRemove must be true for at least one group. Only then does setServerAndReload() trigger a full core restart.
The retry count also depends on the flag (L1537):
int tryTimes = item.testLatencyAutoRemove ? 3 : 1;
testLatencyAutoRemove must be set on the subscription that owns the failing servers. It cannot be satisfied by any other subscription's flag.
This also explains ghost ping from other subscriptions - the core runs tests, but _latencyUpdatedConfigs stays empty because removeLatencyError() is never called with change == true for those subscriptions.
复现步骤/Reproduction steps
- Create Custom Auto Select groups across multiple subscriptions
- Reference them directly in rules (Rule mode)
- Set Health check interval to 2 minutes
- Connect - let a node go down
- Without checkbox, manually trigger latency test on stuck subscription
- Latency values appear in Zashboard, but no node switch - still stuck
- Restart Karing - latency data gone, still stuck
- Wait 10+ minutes - no subscription runs latency tests
- Enable checkbox on stuck subscription
- Manually trigger latency test
- Core restarts, dead servers removed, connected to fastest node
- Other subscriptions (without checkbox) also run latency tests over time
日志/Log
操作系统/Operating System
Windows
系统版本/Operating System Version
Windows 10
App版本/App Version
v1.2.26.2900
描述/Description
Related: #1919, #1909
The checkbox "Automatically remove servers that fail latency tests" controls more than just server removal - it gates the entire latency pipeline. Without it, latency tests may run (values appear in Zashboard), but the data is never applied, never persists, and the core never reloads.
Test results
Checkbox ON on stuck subscription:
Checkbox ON on different subscription:
Checkbox OFF everywhere:
Comparison
Same groups, same rules, same subscriptions, same backup state, same health check interval (2 min). Only difference was which subscription had the checkbox.
Additional observations
_onEventLatencyUpdate→setServerAndReload()) that actually unblocks connection.Possible root cause in source code
In
server_manager.dartschedulerTestLatency()(L1375), after all tests complete,removeLatencyError()is only called for subscriptions wheretestLatencyAutoRemove == true(L1434-1444). Only ifchange == truedoes the subscription get added to_latencyUpdatedConfigs, and only if this set is non-empty does the_onEventLatencyUpdatecallback fire.In
home_screen.dart_onEventLatencyUpdate()(L1246), there is a second check:testLatencyAutoRemovemust be true for at least one group. Only then doessetServerAndReload()trigger a full core restart.The retry count also depends on the flag (L1537):
testLatencyAutoRemovemust be set on the subscription that owns the failing servers. It cannot be satisfied by any other subscription's flag.This also explains ghost ping from other subscriptions - the core runs tests, but
_latencyUpdatedConfigsstays empty becauseremoveLatencyError()is never called withchange == truefor those subscriptions.复现步骤/Reproduction steps
日志/Log