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

Runtime error: slice out of range #281

Open
netomi opened this issue Sep 25, 2024 · 2 comments
Open

Runtime error: slice out of range #281

netomi opened this issue Sep 25, 2024 · 2 comments
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.

Comments

@netomi
Copy link
Contributor

netomi commented Sep 25, 2024

I am running the latest ghproxy version us-docker.pkg.dev/k8s-infra-prow/images/ghproxy:v20240923-efb534162 in an Openshift cluster and occasionally I get the following errors (similar errors were received when running it as a local docker container):

2024/09/25 15:04:22 http: panic serving 10.40.16.47:52268: runtime error: slice bounds out of range [15:10]
goroutine 280 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1898 +0xbe
panic({0x1d45460?, 0xc0009e0318?})
runtime/panic.go:770 +0x132
net/http.(*timeoutHandler).ServeHTTP(0xc000a160c0, {0x22ed0c8, 0xc0009d4c40}, 0xc0008e9320)
net/http/server.go:3601 +0x768
net/http.serverHandler.ServeHTTP({0xc0008f28a0?}, {0x22ed0c8?, 0xc0009d4c40?}, 0x6?)
net/http/server.go:3137 +0x8e
net/http.(*conn).serve(0xc000655950, {0x22fb3a8, 0xc000790870})
net/http/server.go:2039 +0x5e8
created by net/http.(*Server).Serve in goroutine 113
net/http/server.go:3285 +0x4b4

the proxy works in general, but I was just wondering about this error and how I would go about debugging it further?

the stacktrace indicates that it is related to the net/http package, any pointers or instructions would help.

@petr-muller petr-muller added kind/bug Categorizes issue or PR as related to a bug. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Oct 1, 2024
@xrstf
Copy link
Contributor

xrstf commented Oct 13, 2024

Can you share the CLI flags you're using to run ghproxy?

@netomi
Copy link
Contributor Author

netomi commented Oct 13, 2024

I am running the service with

        - --redis-address=redis:6379
        - --legacy-disable-disk-cache-partitions-by-auth-header=false
        - --throttling-time-ms=10
        - --get-throttling-time-ms=10
        - --log-level=error

I noticed these error mainly at startup, looks like the first requests.

Something worth to mention, not sure if this is related, but I use aiohttp python library and set the proxy parameter, so do not replace calls to github.com with the ghproxy address. Could this be the problem? Is the proxy mode the intended use or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants