-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Описание проблемы / Describe the bug
[Bug] FlClashCore 100% CPU after profile switch on long-running instance
Environment
• App: FlClashX 0.3.2
• OS: macOS 15.x, Apple Silicon (arm64)
• Core: mihomo (Clash.Meta) via CGO bridge
• Uptime before bug: 12–24+ hours
Description
After running FlClashX for 12–24+ hours, switching profiles causes FlClashCore (Go binary, runs as root) to spike to 100–154% CPU permanently. The Dart UI process (FlClashX) stays at ~0.1% CPU until VPN disconnect, at which point it also spikes to ~142%.
Restarting the app immediately fixes the issue.
Additional observations
• After the spike, disconnecting VPN causes FlClashX (Dart UI) to also spike to ~142% CPU
• Reconnecting drops Dart back to normal, but FlClashCore stays at ~100%
• Switching profiles again + toggling VPN off/on drops CPU back to normal 3%
• Simply toggling VPN on/off (without profile switch) does NOT reproduce
• Network interruptions (ifconfig en0 down/up) do NOT reproduce
• Fresh app restart always fixes it
Expected Behavior
Profile switch should complete with no sustained CPU increase.
Actual Behavior
FlClashCore permanently consumes 100%+ CPU after profile switch on a long-running instance. Only full app restart or profile switch + VPN toggle cycle resolves it.
Activity Monitor data
After profile switch (FlClashCore only):
• FlClashCore: 101.2% CPU, 101 threads, 1,598 idle wake-ups
• FlClashX: 0.1% CPU, 16 threads, 3 idle wake-ups
After disconnect (both spike):
• FlClashCore: 153.8% CPU, 101 threads, 43,801 idle wake-ups
• FlClashX: 141.9% CPU, 17 threads, 52 idle wake-ups
Версия / Version
0.3.2
Как воспроизвести / To Reproduce
- Launch FlClashX, connect VPN with any profile
- Leave running for 24+ hours with active internet usage
- Switch to a different profile
- Toggle VPN off/on (works fine at this point)
- Switch profile again — without toggling VPN off/on after
- Observe FlClashCore in Activity Monitor — CPU jumps to 100%+, threads at ~101, idle wake-ups climbing rapidly
Операционная система / OS
MacOS