SagerNet / sing-box

The universal proxy platform
https://sing-box.sagernet.org/
Other
19.71k stars 2.35k forks source link

Windows11经常运行一段时间出现panic异常 #685

Closed sdeyang closed 9 months ago

sdeyang commented 1 year ago

Welcome

Description of the problem

更换最新1.3内核后经常运行一段时间出现panic异常,使用1.3内核两天了,一直挂着cmd跑sing-box,大概出现过三四次报错

Version of sing-box

```console sing-box version 1.3.0 Environment: go1.20.5 windows/amd64 Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_reality_server,with_clash_api Revision: 29b1dba2bb70b0f77bbeb764d745c592147785ad CGO: disabled ```

Server and client configuration file

```console { "log": { "level": "info", "timestamp": true }, "dns": { "servers": [ { "tag": "dns_proxy", "address": "https://1.1.1.1/dns-query", "address_resolver": "dns_direct", "strategy": "ipv4_only", "detour": "proxy" }, { "tag": "dns_direct", "address": "223.5.5.5", "strategy": "ipv4_only", "detour": "direct" }, { "tag": "dns_block", "address": "rcode://success" } ], "rules": [ { "geosite": [ "category-games@cn" ], "server": "dns_direct" }, { "geosite": [ "geolocation-!cn" ], "server": "dns_proxy" }, { "geosite": [ "cn", "private" ], "server": "dns_direct" }, { "domain": [ "mail.nefu.edu.cn" ], "server": "dns_direct" }, { "geosite": [ "geolocation-!cn" ], "server": "dns_proxy" } ] }, "route": { "geoip": { "download_url": "https://fastly.jsdelivr.net/gh/soffchen/sing-geoip@release/geoip.db", "download_detour": "direct" }, "geosite": { "download_url": "https://fastly.jsdelivr.net/gh/soffchen/sing-geosite@release/geosite.db", "download_detour": "direct" }, "rules": [ { "protocol": "dns", "outbound": "dns-out" }, { "network": "udp", "port": [ 443 ], "outbound": "block" }, { "geosite": [ "category-ads-all" ], "outbound": "block" }, { "type": "logical", "mode": "and", "rules": [ { "geosite": [ "category-games@cn" ] }, { "geoip": [ "cn" ] } ], "outbound": "direct" }, { "type": "logical", "mode": "and", "rules": [ { "geosite": [ "cn" ] }, { "geoip": [ "cn" ] } ], "outbound": "direct" }, { "geosite": [ "private" ], "outbound": "direct" }, { "geoip": [ "cn", "private" ], "outbound": "direct" }, { "domain": [ "mail.nefu.edu.cn" ], "outbound": "direct" }, { "process_name": [ "xray.exe", "hysteria.exe", "tuic.exe", "clash-meta.exe", "Xshell.exe", "XshellCore.exe", "WinSCP.exe", "syncthing.exe", "wegame.exe" ], "outbound": "direct" }, { "type": "logical", "mode": "and", "rules": [ { "geosite": [ "geolocation-!cn" ] }, { "geoip": [ "cn" ], "invert": true } ], "outbound": "proxy" }, { "geosite": [ "microsoft", "msn", "bing", "google", "google-ads", "google-registry", "google-scholar", "google-trust-services", "googlefcm", "geolocation-!cn" ], "outbound": "proxy" }, { "domain": [ "op.gg" ], "outbound": "proxy" }, { "port": 53, "process_name": [ "xray.exe", "hysteria.exe", "tuic.exe" ], "outbound": "dns-out" } ], "auto_detect_interface": true }, "inbounds": [ { "type": "tun", "tag": "tun-in", "interface_name": "sing-box-tun", "inet4_address": "172.19.0.1/30", "mtu": 9000, "auto_route": true, "strict_route": true, "stack": "gvisor", "sniff": true, "sniff_override_destination": false } ], "outbounds": [ { "type": "vless", "tag": "proxy", "server": "~~~~~~~~~~~~~~~~", "server_port": 443, "uuid": "~~~~~~~~~~~~~~~~", "flow": "xtls-rprx-vision", "network": "tcp", "tls": { "enabled": true, "server_name": "obsidian.md", "utls": { "enabled": true, "fingerprint": "chrome" }, "reality": { "enabled": true, "public_key": "~~~~~~~~~~~~~~~~", "short_id": "~~~~~~~~~~~~~~~~" } }, "packet_encoding": "xudp" }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ] } ```

Server and client log file

```console panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x10 pc=0xc8b4b4] goroutine 639956 [running]: github. com/sagernet/sing/common/exceptions.(*causeError).Error(Oxl?) pkg/mod/github.com/sagernet/sing@v0.2.7/common/exceptions/cause.go:9 +0xl4 github. com/sagernet/sing/common.UniqBy...]({0xc0067d2bc0, 0x2, 0xc005801f40), 0x1719118?) pkg/mod/github.com/sagernet/sing@v0.2.7/common/cond.go:199 +0x175 github.com/sagernet/sing/common/exceptions.Errors({0xc0067d2b80?, 0x1?, Oxlf41?)) pkg/mod/github.com/sagernet/sing@v0.2.7/common/exceptions/multi.go:26 +0x53 github.com/sagernet/sing/common/task.(*Group).RunContextList.func1() pkg/mod/github.com/sagernet/sing@v0.2.7/common/task/task.go:74 +0xlfd created by github.com/sagernet/sing/common/task.(*Group).RunContextList pkg/mod/github.com/sagernet/sing@v0.2.7/common/task/task.go:67 +0x17e ```
nekohasekai commented 1 year ago

https://github.com/SagerNet/sing-box/commit/d9e65c096977165f136aa70a5c520bfb405c67e4

sdeyang commented 1 year ago

又出现类似情况,不知错因是否和上次一样,以下是log file报错部分

panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x10 pc=0x8ab4b4]

goroutine 20383 [running]: github.com/sagernet/sing/common/exceptions.(causeError).Error(0x1?) pkg/mod/github.com/sagernet/sing@v0.2.7/common/exceptions/cause.go:9 +0x14 github.com/sagernet/sing/common.UniqBy[...]({0xc00495aec0, 0x2, 0xc003ee5f40}, 0x1339118?) pkg/mod/github.com/sagernet/sing@v0.2.7/common/cond.go:199 +0x175 github.com/sagernet/sing/common/exceptions.Errors({0xc00495ae80?, 0x1?, 0x1bb?}) pkg/mod/github.com/sagernet/sing@v0.2.7/common/exceptions/multi.go:26 +0x53 github.com/sagernet/sing/common/task.(Group).RunContextList.func1() pkg/mod/github.com/sagernet/sing@v0.2.7/common/task/task.go:74 +0x1fd created by github.com/sagernet/sing/common/task.(*Group).RunContextList pkg/mod/github.com/sagernet/sing@v0.2.7/common/task/task.go:67 +0x17e

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 12 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days