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

访问一个错误网址的时候 v2ray panic(zero length segment) #1638

Closed
fcying opened this issue Apr 11, 2019 · 6 comments
Closed

访问一个错误网址的时候 v2ray panic(zero length segment) #1638

fcying opened this issue Apr 11, 2019 · 6 comments
Labels

Comments

@fcying
Copy link
Contributor

fcying commented Apr 11, 2019

本来是用地址栏搜索一个问题的. 火狐没识别好. 直接当成网址传给v2ray了. 然后v2ray panic了.

地址栏搜索的内容

.linuxbrew/opt/curl/bin/curl: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory

v2ray log

2019/04/11 20:01:23 [Warning] v2ray.com/core: V2Ray 4.18.0 started
2019/04/11 20:01:26 [Info] [3058140603] v2ray.com/core/proxy/socks: TCP Connect request to tcp:.linuxbrew:80
2019/04/11 20:01:26 tcp:127.0.0.1:12868 accepted tcp:.linuxbrew:80 

panic log

V2Ray 4.18.0 (Po) 20190228
A unified platform for anti-censorship.
panic: packing Question: Name: zero length segment

goroutine 38 [running]:
v2ray.com/core/common.Must(...)
        v2ray.com/core/common/common.go:17
v2ray.com/core/app/dns.(*ClassicNameServer).sendQuery(0xc0001b2500, 0xd03ee0, 0xc00040a1b0, 0xc0003976f0, 0xb, 0x101)
        v2ray.com/core/app/dns/udpns.go:371 +0x41f
v2ray.com/core/app/dns.(*ClassicNameServer).QueryIP(0xc0001b2500, 0xd03ee0, 0xc00040a1b0, 0xc0003a2032, 0xa, 0xc000430101, 0x0, 0x0, 0x0, 0x0, ...)
        v2ray.com/core/app/dns/udpns.go:439 +0x1e4
v2ray.com/core/app/dns.(*Server).queryIPTimeout(0xc00038e150, 0xcfdce0, 0xc0001b2500, 0xc0003a2032, 0xa, 0x101, 0x0, 0xc0003e3fe0, 0xc0002669d0, 0xc0003e34a0, ...)
        v2ray.com/core/app/dns/server.go:145 +0xdc
v2ray.com/core/app/dns.(*Server).lookupIPInternal(0xc00038e150, 0xc0003a2032, 0xa, 0xc000140101, 0x5a5fac, 0xc0003a2032, 0xa, 0xc0003a2032, 0xa)
        v2ray.com/core/app/dns/server.go:240 +0x247
v2ray.com/core/app/dns.(*Server).LookupIP(0xc00038e150, 0xc0003a2032, 0xa, 0x40371a, 0xcf1878, 0xcf1880, 0xc0003faa01, 0xc00043c670)
        v2ray.com/core/app/dns/server.go:152 +0x4d
v2ray.com/core/app/router.(*Context).GetTargetIPs(0xc00040a030, 0xcf1898, 0xcee25b, 0x3989368)
        v2ray.com/core/app/router/router.go:161 +0x12d
v2ray.com/core/app/router.getIPsFromTarget(0xc00040a030, 0xc000165d58, 0x40bbc9, 0xc00040a030)
        v2ray.com/core/app/router/condition.go:112 +0x32
v2ray.com/core/app/router.(*MultiGeoIPMatcher).Apply(0xc000149800, 0xc00040a030, 0xb4c180)
        v2ray.com/core/app/router/condition.go:144 +0x45
v2ray.com/core/app/router.(*ConditionChan).Apply(0xc0001497c0, 0xc00040a030, 0xc00040a030)
        v2ray.com/core/app/router/condition.go:33 +0x76
v2ray.com/core/app/router.(*Rule).Apply(0xc000150030, 0xc00040a030, 0xc0003bc040)
        v2ray.com/core/app/router/config.go:63 +0x45
v2ray.com/core/app/router.(*Router).pickRouteInternal(0xc00038d4c0, 0xd03ee0, 0xc0004422a0, 0xc000445600, 0xc0003faf50, 0xc000409d00)
        v2ray.com/core/app/router/router.go:102 +0x15c
v2ray.com/core/app/router.(*Router).PickRoute(0xc00038d4c0, 0xd03ee0, 0xc0004422a0, 0xc00014aca0, 0xc0003e5910, 0xc000444500, 0xc000445a70)
        v2ray.com/core/app/router/router.go:78 +0x4a
v2ray.com/core/app/dispatcher.(*DefaultDispatcher).routedDispatch(0xc00014c240, 0xd03ee0, 0xc0004422a0, 0xc000446360, 0xd04ea0, 0xc000444060, 0x200400050)
        v2ray.com/core/app/dispatcher/default.go:261 +0x2a5
created by v2ray.com/core/app/dispatcher.(*DefaultDispatcher).Dispatch
        v2ray.com/core/app/dispatcher/default.go:205 +0x20a
@kslr kslr added Bug and removed Bug labels Apr 11, 2019
@kslr
Copy link
Contributor

kslr commented Apr 11, 2019

@xiaokangwang
Copy link
Contributor

这个问题在于V2Ray在收到错误的请求的时候应该返回错误信息,而不是崩溃。

我感觉这个确实算作是一个bug。

@kslr kslr added the Bug label Apr 13, 2019
@kslr kslr closed this as completed in 66cba31 Apr 14, 2019
kslr added a commit that referenced this issue Apr 14, 2019
return error instead of panic, fixes #1638
@fcying
Copy link
Contributor Author

fcying commented Apr 14, 2019

最新的版本没问题了. 看log 提示 no such host, 没panic

2019/04/14 21:29:17 [Info] v2ray.com/core/app/dns: failed to lookup ip for domain .linuxbrew at server localhost > lookup .linuxbrew: no such host
2019/04/14 21:29:17 [Info] v2ray.com/core/app/router: resolve ip for .linuxbrew > lookup .linuxbrew: no such host

@1265578519
Copy link

v4.18.1说已修复

@aybru
Copy link

aybru commented Apr 22, 2019

最近v2停更了吗?

@kslr
Copy link
Contributor

kslr commented Apr 25, 2019

@aybru 没有

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

No branches or pull requests

5 participants