Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0版本报错:panic: runtime error: slice bounds out of range #189

Open
aikunzhe opened this issue Sep 3, 2020 · 6 comments
Open

2.0版本报错:panic: runtime error: slice bounds out of range #189

aikunzhe opened this issue Sep 3, 2020 · 6 comments

Comments

@aikunzhe
Copy link

aikunzhe commented Sep 3, 2020

模式是CDN模式,直连模式没有出现过这个问题

image

@starwar6160
Copy link

starwar6160 commented Sep 5, 2020

我也是这个问题,具体错误如下。
但是同样是美国的另一个vps,线路比这个还差,没有这个问题。
从日志上看,我估计当该vps线路较差,丢包率等问题导致连接中断,中断次数多了以后某个固定大小数据结构溢出导致了这个问题。可能需要考虑国内恶劣的网络线路,放宽这个限制或者不限制该数据结构的大小,哪怕因此造成最后client崩了,也比现在很快就崩了无法联网要好得多。大家用这个更重视稳定性,网速,对于内存等资源占用没那么在意的。
C:\Tools\goflyway>goflyway.exe -k=MYPASSWORD -up cf://node1.myvps.com:2082 -p 8103
2020-09-04 22:11:01.237 CST,main.go:267, INFO ,goflyway 181021015134
2020-09-04 22:11:01.321 CST,main.go:436, INFO ,Upstream config: cf://node1.myvps.com:2082
2020-09-04 22:11:01.321 CST,main.go:416, INFO ,Client 7bfb660 started: you->0.0.0.0:8103->cloudflare->node1.myvps.com:2082
2020-09-04 22:11:01.321 CST,main.go:412, INFO ,Web console started at 127.0.0.1:8113
2020-09-04 22:12:47.745 CST,io.go:84, ERROR ,"Bridge: read [::1]:61978, Software caused connection abort"
2020-09-04 22:12:51.847 CST,io.go:68, ERROR ,"Bridge: write [::1]:61986, Software caused connection abort"
2020-09-04 22:17:49.977 CST,io.go:84, ERROR ,"Bridge: read [::1]:62671, Software caused connection abort"
2020-09-04 22:17:50.238 CST,io.go:84, ERROR ,"Bridge: read [::1]:62673, Software caused connection abort"
2020-09-05 08:30:50.189 CST,io.go:84, ERROR ,"Bridge: read [::1]:63360, Software caused connection abort"
2020-09-05 08:30:50.205 CST,io.go:84, ERROR ,"Bridge: read [::1]:63359, Software caused connection abort"
2020-09-05 08:30:50.206 CST,io.go:84, ERROR ,"Bridge: read [::1]:63385, Software caused connection abort"
2020-09-05 08:30:50.209 CST,io.go:84, ERROR ,"Bridge: read [::1]:63386, Software caused connection abort"
2020-09-05 08:30:50.222 CST,io.go:84, ERROR ,"Bridge: read [::1]:63374, Software caused connection abort"
2020-09-05 08:30:50.226 CST,io.go:84, ERROR ,"Bridge: read [::1]:63378, Software caused connection abort"
2020-09-05 08:30:50.230 CST,io.go:84, ERROR ,"Bridge: read [::1]:63362, Software caused connection abort"
2020-09-05 08:30:50.241 CST,io.go:84, ERROR ,"Bridge: read [::1]:63396, Software caused connection abort"
2020-09-05 08:30:50.242 CST,io.go:84, ERROR ,"Bridge: read [::1]:63369, Software caused connection abort"
2020-09-05 08:30:50.250 CST,io.go:84, ERROR ,"Bridge: read [::1]:63389, Software caused connection abort"
2020-09-05 08:30:50.251 CST,io.go:84, ERROR ,"Bridge: read [::1]:63363, Software caused connection abort"
2020-09-05 08:30:50.252 CST,io.go:84, ERROR ,"Bridge: read [::1]:63394, Software caused connection abort"
2020-09-05 08:30:50.262 CST,io.go:84, ERROR ,"Bridge: read [::1]:63388, Software caused connection abort"
2020-09-05 08:30:50.276 CST,io.go:84, ERROR ,"Bridge: read [::1]:63395, Software caused connection abort"
2020-09-05 08:30:50.278 CST,io.go:84, ERROR ,"Bridge: read [::1]:63397, Software caused connection abort"
2020-09-05 08:30:50.282 CST,io.go:84, ERROR ,"Bridge: read [::1]:63361, Software caused connection abort"
2020-09-05 08:30:50.308 CST,io.go:84, ERROR ,"Bridge: read [::1]:63391, Software caused connection abort"
2020-09-05 08:30:50.314 CST,io.go:84, ERROR ,"Bridge: read [::1]:63392, Software caused connection abort"
2020-09-05 08:30:50.317 CST,io.go:84, ERROR ,"Bridge: read [::1]:63372, Software caused connection abort"
2020-09-05 08:30:50.339 CST,io.go:84, ERROR ,"Bridge: read [::1]:63358, Software caused connection abort"
2020-09-05 08:30:50.459 CST,io.go:84, ERROR ,"Bridge: read [::1]:63398, Software caused connection abort"
2020-09-05 08:30:50.805 CST,io.go:84, ERROR ,"Bridge: read [::1]:63371, Software caused connection abort"
2020-09-05 08:30:50.845 CST,io.go:84, ERROR ,"Bridge: read [::1]:63373, Software caused connection abort"
2020-09-05 08:30:50.895 CST,io.go:84, ERROR ,"Bridge: read [::1]:63381, Software caused connection abort"
2020-09-05 08:30:51.715 CST,io.go:84, ERROR ,"Bridge: read [::1]:63645, Software caused connection abort"
2020-09-05 08:30:51.722 CST,io.go:84, ERROR ,"Bridge: read [::1]:63647, Software caused connection abort"
2020-09-05 08:31:04.014 CST,io.go:84, ERROR ,"Bridge: read [::1]:63375, Software caused connection abort"
2020-09-05 08:31:04.621 CST,io.go:84, ERROR ,"Bridge: read [::1]:63370, Software caused connection abort"
2020-09-05 08:31:13.332 CST,io.go:84, ERROR ,"Bridge: read [::1]:63735, Software caused connection abort"
2020-09-05 08:31:14.603 CST,io.go:84, ERROR ,"Bridge: read [::1]:63741, Software caused connection abort"
2020-09-05 08:36:41.234 CST,io.go:84, ERROR ,"Bridge: read [::1]:64390, Software caused connection abort"
panic: runtime error: slice bounds out of range

goroutine 1735 [running]:
github.com/coyove/goflyway/proxy.(*io_t).Copy(0xc04215e1a0, 0x119c8a8, 0xc0420942a0, 0x17f0000, 0xc04213c058, 0x6dda4eaf8ee463ae, 0x9f89065fbe18f61e, 0x0, 0x302000000, 0x0, ...)
/var/www/golib/src/github.com/coyove/goflyway/proxy/io.go:258 +0xa00
github.com/coyove/goflyway/proxy.(*io_t).Bridge.func1(0xc04215e1a0, 0x91d0e0, 0xc0420942a0, 0x91d260, 0xc04213c058, 0x6dda4eaf8ee463ae, 0x9f89065fbe18f61e, 0xc04214e120, 0x0, 0x302000000)
/var/www/golib/src/github.com/coyove/goflyway/proxy/io.go:67 +0xdd
created by github.com/coyove/goflyway/proxy.(*io_t).Bridge
/var/www/golib/src/github.com/coyove/goflyway/proxy/io.go:66 +0x15e

@coyove
Copy link
Owner

coyove commented Sep 5, 2020

cf://协议换成ws://直连服务器能成功吗

@starwar6160
Copy link

starwar6160 commented Sep 5, 2020 via email

@aikunzhe
Copy link
Author

aikunzhe commented Sep 5, 2020

确实是几分钟就报错了

@coyove
Copy link
Owner

coyove commented Sep 9, 2020

看来cf启用了permessage-deflate的ws压缩标准,导致以前写的ws解析代码出错了。

@sunhf-git
Copy link

permessage-deflate的ws压缩标准

有什么办法能避免这个问题吗, 仍然想继续使用cdn.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants