XrayR-project / XrayR

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接
https://xrayr-project.github.io/XrayR-doc/
Mozilla Public License 2.0
2.02k stars 814 forks source link

十几个小时就崩溃报错panic: runtime error: slice bounds out of range [8184:8176] #489

Closed shuangzhijinghua closed 10 months ago

shuangzhijinghua commented 11 months ago

日志如下:

Oct 18 01:27:04 localhost XrayR[677]: 2023/10/18 01:27:04 [API URI] V2ray(ID=958) 3 user deleted, 0 user added
Oct 18 01:27:21 localhost XrayR[677]: 2023/10/18 01:27:21 [API URI] V2ray(ID=958) Report 70 online users
Oct 18 01:28:06 localhost XrayR[677]: 2023/10/18 01:28:06 [API URI] V2ray(ID=958) 0 user deleted, 0 user added
Oct 18 01:28:12 localhost XrayR[677]: panic: runtime error: slice bounds out of range [8184:8176]
Oct 18 01:28:12 localhost XrayR[677]: goroutine 25091839 [running]:
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/common/buf.(*Buffer).Extend(...)
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/common/buf/buffer.go:128
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsPadding(0xc006bab560, 0x2, 0x0, 0x2?, {0x39bfdb8, 0xc006822420})
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:509 +0x89e
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsWrite.func1({0x397f060, 0xc005834918}, 0xc0016fbc80, 0xc0016fbc70, 0xc0016fbc71, 0xc0016fbc72, 0x0?, 0x0?, {0x39bfdb8, 0xc006822420}, ...)
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:341 +0x517
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsWrite({0x397f060?, 0xc005834918?}, {0x3980d00, 0xc006822390}, {0x3980960?, 0xc006822150?}, {0x39cc630?, 0xc0058347c8?}, {0x0, 0x0}, ...)
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:380 +0xd9
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/proxy/vless/inbound.(*Handler).Process.func5()
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/inbound/inbound.go:599 +0x65d
Oct 18 01:28:12 localhost XrayR[677]: github.com/xtls/xray-core/common/task.Run.func1(0x12?)
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/common/task/task.go:28 +0x28
Oct 18 01:28:12 localhost XrayR[677]: created by github.com/xtls/xray-core/common/task.Run in goroutine 25091822
Oct 18 01:28:12 localhost XrayR[677]: #011github.com/xtls/xray-core@v1.8.4/common/task/task.go:27 +0xdb
Oct 18 01:28:12 localhost systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 18 01:28:12 localhost systemd[1]: XrayR.service: Failed with result 'exit-code'.
Oct 18 01:28:22 localhost systemd[1]: XrayR.service: Scheduled restart job, restart counter is at 1.
Oct 18 01:28:22 localhost systemd[1]: Stopped XrayR Service.
Oct 18 01:28:22 localhost systemd[1]: Started XrayR Service.
Oct 18 01:28:22 localhost XrayR[10666]: XrayR 0.9.1 (A Xray backend that supports many panels)
Oct 18 01:28:22 localhost XrayR[10666]: 2023/10/18 01:28:22 Start the panel..
Oct 18 01:28:22 localhost XrayR[10666]: 2023/10/18 01:28:22 Xray Core Version: 1.8.4
Oct 18 01:28:25 localhost XrayR[10666]: 2023/10/18 01:28:25 [API URI] V2ray(ID=958) Added 32483 new users
Oct 18 01:28:25 localhost XrayR[10666]: 2023/10/18 01:28:25 [API URI] V2ray(ID=958) Start node monitor periodic task
Oct 18 01:28:25 localhost XrayR[10666]: 2023/10/18 01:28:25 [API URI] V2ray(ID=958) Start user monitor periodic task
Oct 18 01:28:52 localhost XrayR[10666]: panic: runtime error: slice bounds out of range [8184:8176]
Oct 18 01:28:52 localhost XrayR[10666]: goroutine 158 [running]:
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/common/buf.(*Buffer).Extend(...)
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/common/buf/buffer.go:128
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsPadding(0xc0010b60c0, 0x2, 0x0, 0x2?, {0x39bfdb8, 0xc00098d590})
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:509 +0x89e
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsWrite.func1({0x397f060, 0xc00265e2f8}, 0xc001170508, 0xc0011704f8, 0xc0011704f9, 0xc0011704fa, 0x0?, 0x0?, {0x39bfdb8, 0xc00098d590}, ...)
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:341 +0x517
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/proxy/vless/encoding.XtlsWrite({0x397f060?, 0xc00265e2f8?}, {0x3980d00, 0xc000a94060}, {0x3980960?, 0xc00087dec0?}, {0x39cc630?, 0xc002a41320?}, {0x0, 0x0}, ...)
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/encoding/encoding.go:380 +0xd9
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/proxy/vless/inbound.(*Handler).Process.func5()
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/proxy/vless/inbound/inbound.go:599 +0x65d
Oct 18 01:28:52 localhost XrayR[10666]: github.com/xtls/xray-core/common/task.Run.func1(0x1?)
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/common/task/task.go:28 +0x28
Oct 18 01:28:52 localhost XrayR[10666]: created by github.com/xtls/xray-core/common/task.Run in goroutine 155
Oct 18 01:28:52 localhost XrayR[10666]: #011github.com/xtls/xray-core@v1.8.4/common/task/task.go:27 +0xdb
Oct 18 01:28:52 localhost systemd[1]: XrayR.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Oct 18 01:28:52 localhost systemd[1]: XrayR.service: Failed with result 'exit-code'.
Oct 18 01:29:02 localhost systemd[1]: XrayR.service: Scheduled restart job, restart counter is at 2.
Oct 18 01:29:02 localhost systemd[1]: Stopped XrayR Service.
Oct 18 01:29:02 localhost systemd[1]: Started XrayR Service.
Oct 18 01:29:02 localhost XrayR[10728]: XrayR 0.9.1 (A Xray backend that supports many panels)
Oct 18 01:29:02 localhost XrayR[10728]: 2023/10/18 01:29:02 Start the panel..
Oct 18 01:29:02 localhost XrayR[10728]: 2023/10/18 01:29:02 Xray Core Version: 1.8.4
Oct 18 01:29:04 localhost XrayR[10728]: 2023/10/18 01:29:04 [API URI] V2ray(ID=958) Added 32483 new users
Oct 18 01:29:04 localhost XrayR[10728]: 2023/10/18 01:29:04 [API URI] V2ray(ID=958) Start node monitor periodic task
Oct 18 01:29:04 localhost XrayR[10728]: 2023/10/18 01:29:04 [API URI] V2ray(ID=958) Start user monitor periodic task
Oct 18 01:29:54 localhost PackageKit: daemon quit
Oct 18 01:29:54 localhost systemd[1]: packagekit.service: Succeeded.

硬件配置2C/4G。

Septrum101 commented 11 months ago

This bug came from xray-core: https://github.com/XTLS/Xray-core/commit/d6d225c6981812f024f90adab8cefc26a5ac0937 Try this version https://github.com/XrayR-project/XrayR/actions/runs/6561227800