gvisor causes crazy CPU usage
Operating system
Windows
System version
24H2 26100.1742
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
No response
Version
sing-box version 1.13.0-alpha.8
Environment: go1.25.0 windows/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale
Revision: d03b4eaf0a9f10cbac96646698a19029e9da795f
CGO: disabled
Description
After using profile of "gvisor stack+global routing" for a while on Windows, the CPU usage of singbox will be abnormal.
However, it works well if "stack" = "system" or "mixed"
"stack": "gvisor" (After using it for a while and there are no other programs running at this time.)
"stack": "system"
There is still a little bit,many GUI clients default to using the gvisor stack. This bug may have widespread impacts.
Reproduction
{ "log": { "disabled": true }, "dns": { "servers": [ { "server": "", "type": "udp", "tag": "final_resolver" }, { "server": "", "domain_resolver": "hosts_dns", "path": "/dns-query", "type": "https", "tag": "remote_dns", "detour": "proxy" }, { "server": "", "domain_resolver": "hosts_dns", "path": "/dns-query", "type": "https", "tag": "direct_dns" }, { "server": "", "domain_resolver": "hosts_dns", "path": "/dns-query", "type": "https", "tag": "outbound_resolver" }, { "predefined": { }, "type": "hosts", "tag": "hosts_dns" } ], "rules": [ { "server": "outbound_resolver", "domain": [ "" ] }, { "server": "hosts_dns", "ip_accept_any": true }, { "action": "predefined", "rcode": "NOTIMP", "query_type": [ 64, 65 ] }, { "server": "direct_dns", "rule_set": [ "geosite-private" ] } ], "final": "remote_dns", "independent_cache": true }, "inbounds": [ { "type": "tun", "tag": "tun-in", "interface_name": "VPN", "address": [ "172.18.0.1/30" ], "mtu": 9000, "auto_route": true, "strict_route": true, "stack": "gvisor" } ], "outbounds": [ { "server": "", "server_port": , "password": , "type": "hysteria2", "tag": "proxy", "tls": { "enabled": true, "server_name": "", "insecure": true, "record_fragment": false } }, { "type": "direct", "tag": "direct" } ], "route": { "default_domain_resolver": { "server": "outbound_resolver", "strategy": "" }, "auto_detect_interface": true, "rules": [ { "outbound": "direct","process_name": "sing-box.exe" }, { "network": [ "udp" ], "port": [ 53 ], "action": "hijack-dns" }, { "outbound": "direct", "ip_is_private": true }, { "outbound": "direct", "rule_set": [ "geosite-private" ] }, { "outbound": "proxy", "port_range": [ "0:65535" ] } ], "rule_set": [ { "tag": "geosite-private", "type": "local", "format": "binary", "path": "" } ], "final": "proxy" } }
Logs
https://github.com/user-attachments/files/22265474/log.txt
Supporter
- [ ] I am a sponsor
Integrity requirements
- [x] I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- [x] I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- [x] I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- [x] I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
log?
log?
i have added.However,looks like there are no errors in the log file
Log or screenshot does not help. You need to provide pprof profile.