Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

shadowsocks 2022 panic

Open rookisbusy opened this issue 2 years ago • 1 comments

xray 作为服务端,偶尔会产生以下错误,平均1天有个2次~3次

version

Xray 1.8.0 (Xray, Penetrates Everything.) Custom (go1.20.2 linux/amd64)
A unified platform for anti-censorship.

log

2023/04/04 14:30:20 [Info] [3568497715] proxy/shadowsocks_2022: tunnelling request to tcp:mobwsa.ximalaya.com:443
2023/04/04 14:30:20 [Info] [3568497715] app/dispatcher: default route for tcp:mobwsa.ximalaya.com:443
2023/04/04 14:30:20 [Info] [3568497715] proxy/freedom: opening connection to tcp:mobwsa.ximalaya.com:443
2023/04/04 14:30:20 [Info] [3568497715] transport/internet/tcp: dialing TCP to tcp:mobwsa.ximalaya.com:443
2023/04/04 14:30:20 192.168.50.160:57938 accepted mobwsa.ximalaya.com:443 [direct]
2023/04/04 14:30:21 [Info] [2594946801] proxy/shadowsocks_2022: tunnelling request to tcp:125.94.240.71:80
2023/04/04 14:30:21 [Info] [2594946801] app/dispatcher: default route for tcp:125.94.240.71:80
2023/04/04 14:30:21 [Info] [2594946801] proxy/freedom: opening connection to tcp:125.94.240.71:80
2023/04/04 14:30:21 [Info] [2594946801] transport/internet/tcp: dialing TCP to tcp:125.94.240.71:80
2023/04/04 14:30:21 192.168.50.160:57940 accepted 125.94.240.71:80 [direct]
2023/04/04 14:30:23 [Info] [601622965] proxy/shadowsocks_2022: tunnelling request to tcp:(null):443
2023/04/04 14:30:23 [Error] common/net: invalid IP format: []
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x9c2198]

goroutine 66467 [running]:
github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).getUoTConnection(0xc0002adb20, {0x1464b80, 0xc0053274a0}, {{0x0?, 0x0?}, 0x10?, 0x0?})
	github.com/xtls/xray-core/app/proxyman/outbound/uot.go:14 +0x58
github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dial(0xc0002adb20, {0x1464b80?, 0xc0053274a0?}, {{0x0, 0x0}, 0x1bb, 0x2})
	github.com/xtls/xray-core/app/proxyman/outbound/handler.go:214 +0xa26
github.com/xtls/xray-core/proxy/freedom.(*Handler).Process.func1()
	github.com/xtls/xray-core/proxy/freedom/freedom.go:140 +0x2c6
github.com/xtls/xray-core/common/retry.(*retryer).On(0xc01272dd08, 0xc01272dd60)
	github.com/xtls/xray-core/common/retry/retry.go:27 +0xdb
github.com/xtls/xray-core/proxy/freedom.(*Handler).Process(0xc0002fe690, {0x1464b80, 0xc0053274a0}, 0xc019da8980, {0x145c700, 0xc0002adb20})
	github.com/xtls/xray-core/proxy/freedom/freedom.go:126 +0x4b0
github.com/xtls/xray-core/app/proxyman/outbound.(*Handler).Dispatch(0xc00c5b2d80?, {0x1464b80, 0xc0053274a0}, 0xc019da8980)
	github.com/xtls/xray-core/app/proxyman/outbound/handler.go:147 +0x211
github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).routedDispatch(0xc0002b7f80, {0x1464b80, 0xc0053274a0}, 0xc019da8980, {{0x0, 0x0}, 0x1bb, 0x2})
	github.com/xtls/xray-core/app/dispatcher/default.go:492 +0xbfe
created by github.com/xtls/xray-core/app/dispatcher.(*DefaultDispatcher).Dispatch
	github.com/xtls/xray-core/app/dispatcher/default.go:302 +0x4ea
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x697591]

goroutine 27080 [running]:
github.com/xtls/xray-core/common/net.Destination.NetAddr({{0x0?, 0x0?}, 0x0?, 0x10000?})
	github.com/xtls/xray-core/common/net/destination.go:93 +0x31
github.com/xtls/xray-core/common/net.Destination.String({{0x0?, 0x0?}, 0x88b8?, 0xc0?})
	github.com/xtls/xray-core/common/net/destination.go:111 +0x76
github.com/xtls/xray-core/common/serial.ToString({0x11f3020, 0xc00e3a88b8})
	github.com/xtls/xray-core/common/serial/string.go:20 +0xf2
github.com/xtls/xray-core/common/serial.Concat({0xc019da89a0?, 0x2, 0x3dfc8cd5416f?})
	github.com/xtls/xray-core/common/serial/string.go:32 +0xc5
github.com/xtls/xray-core/common/errors.(*Error).Error(0xc00c5b2d80)
	github.com/xtls/xray-core/common/errors/errors.go:63 +0x494
github.com/xtls/xray-core/common/errors.(*Error).String(0x1?)
	github.com/xtls/xray-core/common/errors/errors.go:129 +0x19
github.com/xtls/xray-core/common/serial.ToString({0x12298c0, 0xc00c5b2d80})
	github.com/xtls/xray-core/common/serial/string.go:20 +0xf2
github.com/xtls/xray-core/common/serial.Concat({0xc001068e70?, 0x4, 0x2a?})
	github.com/xtls/xray-core/common/serial/string.go:32 +0xc5
github.com/xtls/xray-core/common/log.(*GeneralMessage).String(0xc00e3a88d0)
	github.com/xtls/xray-core/common/log/log.go:27 +0xa8
github.com/xtls/xray-core/common/log.(*generalLogger).run(0xc0002d2660)
	github.com/xtls/xray-core/common/log/logger.go:58 +0x225
created by github.com/xtls/xray-core/common/log.(*generalLogger).Handle
	github.com/xtls/xray-core/common/log/logger.go:77 +0x99

rookisbusy avatar Apr 04 '23 06:04 rookisbusy

我也有类似问题,1.7.5版本

yangbo254 avatar Jul 03 '23 14:07 yangbo254

https://github.com/XTLS/Xray-core/issues/3131#issuecomment-2111419596

RPRX avatar May 15 '24 01:05 RPRX

不过这个 issue 的 Xray 版本比较久远,最近的版本还没人报告该问题,先关了

RPRX avatar May 15 '24 02:05 RPRX