SagerNet / sing-box

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

panic: send on closed channel #119

Closed NDI3-MDAx closed 2 years ago

NDI3-MDAx commented 2 years ago

Welcome

Description of the problem

Hello.

I'm currently using the dev-next branch. This error happened after I went out and disconnected from wifi. I'm not sure if this is related to this error, just for your reference.

Thanks!

Version of sing-box

```console $ sing-box version sing-box version 1.1-beta8 Environment: go1.19.1 android/arm64 Revision: 46d6d4f27710d73a1956a0601ec88d051e918c01 CGO: disabled ```

Server and client configuration file

```console { "log": { "disabled": false, "level": "error", "timestamp": true }, "dns": { "disable_cache": false, "disable_expire": false, "servers": [ { "tag": "global", "address": "1.1.1.1", "detour": "proxy" }, { "tag": "cn", "address": "https://1.12.12.12/dns-query", "detour": "direct" } ], "rules": [ { "domain": ["example.site"], "geosite": [ "cn" ], "server": "cn" } ], "final": "global" }, "inbounds": [ { "type": "socks", "tag": "socks-in", "listen": "127.0.0.1", "listen_port": 5353, "sniff": true, "sniff_override_destination": false }, { "type": "tun", "tag": "tun-in", "inet4_address": "172.19.0.1/30", "auto_route": true, "strict_route": false, "sniff": true, "endpoint_independent_nat": false, "exclude_package": [ "com.android.captiveportallogin" ] } ], "outbounds": [ { "type": "trojan", "tag": "proxy" }, { "type": "direct", "tag": "direct" }, { "type": "block", "tag": "block" }, { "type": "dns", "tag": "dns-out" } ], "route": { "geoip": { "path": "/data/sing-box/geoip.db" }, "geosite": { "path": "/data/sing-box/geosite.db" }, "auto_detect_interface": true, "override_android_vpn": true, "rules": [ { "port": 53, "outbound": "dns-out" }, { "port": 853, "outbound": "dns-out" }, { "protocol": "dns", "outbound": "dns-out" }, { "package_name": [ "com.android.captiveportallogin" ], "outbound": "direct" }, { "geosite": [ "cn" ], "geoip": [ "cn", "private" ], "outbound": "direct" } ], "final": "proxy" }, "experimental": {} } ```

Server and client log file

```console +0000 2022-09-28 10:43:43 ERROR [3289081185] dns: exchange failed for userlocation.googleapis.com. IN A: context deadline exceeded +0000 2022-09-28 10:43:43 ERROR [774589540] dns: exchange failed for userlocation.googleapis.com. IN AAAA: context canceled panic: send on closed channel goroutine 18905 [running]: github.com/sagernet/sing-dns.(*myTransportAdapter).recvLoop.func1({0x644ce5e3f8?, 0x4000a0ab80?}) github.com/sagernet/sing-dns@v0.0.0-20220915084601-812e0864b45b/transport_base.go:96 +0x194 github.com/sagernet/sing/common/task.(*Group).Run.func1() github.com/sagernet/sing@v0.0.0-20220926054900-7209937cc235/common/task/task.go:59 +0x7c created by github.com/sagernet/sing/common/task.(*Group).Run github.com/sagernet/sing@v0.0.0-20220926054900-7209937cc235/common/task/task.go:58 +0x464 ```
nekohasekai commented 2 years ago

Try latest commit

NDI3-MDAx commented 2 years ago

Thanks! So far, so good, I'll use it for a while :pray:

NDI3-MDAx commented 2 years ago

The problem didn't happen again, I think we can close this issue, thanks again!