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

开启http_cache=true 会触发panic #509

Closed
bbaobelief opened this issue Apr 15, 2020 · 1 comment
Closed

开启http_cache=true 会触发panic #509

bbaobelief opened this issue Apr 15, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@bbaobelief
Copy link

bbaobelief commented Apr 15, 2020

问题

服务端开启http_cache=true,访问域名解析地址会触发panic

#cache
http_cache=true
http_cache_length=100

版本

[root@instance-tw conf]# nps -version
Version: 0.26.6
Core version: 0.26.0

错误

Apr 15 12:04:43 instance-tw nps: panic: runtime error: invalid memory address or nil pointer dereference
Apr 15 12:04:43 instance-tw nps: [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x98fe99]
Apr 15 12:04:43 instance-tw nps: goroutine 67 [running]:
Apr 15 12:04:43 instance-tw nps: ehang.io/nps/server/proxy.(*httpServer).handleHttp.func2(0xc00018a730, 0xc00018a70d, 0xc000198e00, 0xc0001f6780, 0xc0004d76d0, 0xc0000c8f30, 0xc0004d76d8)
Apr 15 12:04:43 instance-tw nps: /home/travis/gopath/src/github.com/ehang-io/nps/server/proxy/http.go:184 +0x1b9
Apr 15 12:04:43 instance-tw nps: created by ehang.io/nps/server/proxy.(*httpServer).handleHttp
Apr 15 12:04:43 instance-tw nps: /home/travis/gopath/src/github.com/ehang-io/nps/server/proxy/http.go:169 +0xb12
Apr 15 12:04:43 instance-tw systemd: Nps.service: main process exited, code=exited, status=2/INVALIDARGUMENT
Apr 15 12:04:43 instance-tw systemd: Unit Nps.service entered failed state.
Apr 15 12:04:43 instance-tw systemd: Nps.service failed.
@bbaobelief bbaobelief added the bug Something isn't working label Apr 15, 2020
@ffdfgdfg
Copy link
Collaborator

ffdfgdfg commented May 7, 2020

emmm这个问题比较难改,可以把http_cache_length设大减少这种情况

kiririx pushed a commit to kiririx/nps that referenced this issue Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants