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

panic: runtime error: index out of range [18446744073709551615] with length 6 #3716

Open
cao2358 opened this issue Nov 26, 2024 · 1 comment
Assignees
Labels
type/bug Something isn't working

Comments

@cao2358
Copy link

cao2358 commented Nov 26, 2024

Describe the bug

A clear and concise description of what the bug is.
panic: runtime error: index out of range [18446744073709551615] with length 6
goroutine 2765 [running]:
github.com/grafana/pyroscope/pkg/util.panicError({0x2220540?, 0xc0088bf350})
/Users/bytedance/Documents/cncf/pyroscope/pkg/util/recovery.go:43 +0x52
github.com/grafana/pyroscope/pkg/util.glob..func2.1.1()
/Users/bytedance/Documents/cncf/pyroscope/pkg/util/recovery.go:31 +0x38
panic({0x2220540?, 0xc0088bf350?})
/opt/homebrew/opt/go/libexec/src/runtime/panic.go:914 +0x21f
github.com/opentracing-contrib/go-stdlib/nethttp.MiddlewareFunc.func5.1()
/Users/bytedance/go/pkg/mod/github.com/opentracing-contrib/[email protected]/nethttp/server.go:150 +0x11e
panic({0x2220540?, 0xc0088bf350?})
/opt/homebrew/opt/go/libexec/src/runtime/panic.go:914 +0x21f
github.com/grafana/pyroscope/pkg/pprof.RewriteMappings(...)
/Users/bytedance/Documents/cncf/pyroscope/pkg/pprof/merge.go:259
github.com/grafana/pyroscope/pkg/pprof.(*ProfileMerge).merge(0xc001e04618, 0xc00203f7a0, 0xef?)
/Users/bytedance/Documents/cncf/pyroscope/pkg/pprof/merge.go:68 +0x62d
github.com/grafana/pyroscope/pkg/pprof.(*ProfileMerge).MergeNoClone(...)
/Users/bytedance/Documents/cncf/pyroscope/pkg/pprof/merge.go:32
github.com/grafana/pyroscope/pkg/pprof.DropGoTypeParameters(0xc00203f7a0)
/Users/bytedance/Documents/cncf/pyroscope/pkg/pprof/fix_go_profile.go:59 +0x165
github.com/grafana/pyroscope/pkg/pprof.FixGoProfile(0xc00097e210?)
/Users/bytedance/Documents/cncf/pyroscope/pkg/pprof/fix_go_profile.go:18 +0x17
github.com/grafana/pyroscope/pkg/distributor.(*Distributor).PushParsed(0xc000963500, {0x2e82378, 0xc007899050}, 0xc001e04aa0)
/Users/bytedance/Documents/cncf/pyroscope/pkg/distributor/distributor.go:284 +0xbbd
github.com/grafana/pyroscope/pkg/distributor.(*Distributor).Push(0xc000963500, {0x2e82378, 0xc007899050}, 0xc000fe7900)
/Users/bytedance/Documents/cncf/pyroscope/pkg/distributor/distributor.go:221 +0x24a
connectrpc.com/connect.NewUnaryHandler[...].func1({0x2e8fe70, 0xc000fe7900})
/Users/bytedance/go/pkg/mod/connectrpc.com/[email protected]/handler.go:52 +0x15f
github.com/grafana/pyroscope/pkg/tenant.(*authInterceptor).WrapUnary.func1({0x2e82420, 0xc005c571f0}, {0x2e8fe70, 0xc000fe7900})
/Users/bytedance/Documents/cncf/pyroscope/pkg/tenant/interceptor.go:47 +0x251
connectrpc.com/connect.NewUnaryHandler[...].func2({0x7f196c644408, 0xc001d134c0})
/Users/bytedance/go/pkg/mod/connectrpc.com/[email protected]/handler.go:84 +0x4ba
connectrpc.com/connect.(*Handler).ServeHTTP(0xc0008b3c70, {0x2e7b9a0, 0xc005cb31a0}, 0xc005c91700)
/Users/bytedance/go/pkg/mod/connectrpc.com/[email protected]/handler.go:265 +0x819
github.com/gorilla/mux.(*Router).ServeHTTP(0xc0005d2840, {0x2e7b9a0, 0xc005cb31a0}, 0xc005c91500)
/Users/bytedance/go/pkg/mod/github.com/gorilla/[email protected]/mux.go:210 +0x1c5
github.com/grafana/pyroscope/pkg/phlare.glob..func1.1({0x2e7b9a0, 0xc005cb31a0}, 0xc005c91400)
/Users/bytedance/Documents/cncf/pyroscope/pkg/phlare/modules.go:432 +0x18b
net/http.HandlerFunc.ServeHTTP(0x410745?, {0x2e7b9a0?, 0xc005cb31a0?}, 0x498301?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2136 +0x29
github.com/grafana/dskit/middleware.(*Instrument).Wrap.Instrument.Wrap.func1.2({0x2e7b9a0?, 0xc005cb31a0?})
/Users/bytedance/go/pkg/mod/github.com/grafana/[email protected]/middleware/instrument.go:74 +0x33
github.com/felixge/httpsnoop.(*Metrics).CaptureMetrics(0xc0088bef00, {0x2e7b9a0, 0xc005cb3140}, 0xc001e05488)
/Users/bytedance/go/pkg/mod/github.com/felixge/[email protected]/capture_metrics.go:84 +0x1db
github.com/felixge/httpsnoop.CaptureMetricsFn({0x2e7b9a0, 0xc005cb3140}, 0xc0008884a0?)
/Users/bytedance/go/pkg/mod/github.com/felixge/[email protected]/capture_metrics.go:39 +0x4e
github.com/grafana/dskit/middleware.(*Instrument).Wrap.Instrument.Wrap.func1({0x2e7b9a0, 0xc005cb3140}, 0xc005c91400)
/Users/bytedance/go/pkg/mod/github.com/grafana/[email protected]/middleware/instrument.go:73 +0x306
net/http.HandlerFunc.ServeHTTP(0x0?, {0x2e7b9a0?, 0xc005cb3140?}, 0x0?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2136 +0x29
github.com/grafana/pyroscope/pkg/util.(*Log).Wrap.Log.Wrap.func1({0x2e7b2e0, 0xc005cbc550}, 0xc005c91400)
/Users/bytedance/Documents/cncf/pyroscope/pkg/util/http.go:173 +0x473
net/http.HandlerFunc.ServeHTTP(0x410745?, {0x2e7b2e0?, 0xc005cbc550?}, 0xc00203f001?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2136 +0x29
github.com/opentracing-contrib/go-stdlib/nethttp.MiddlewareFunc.func5({0x2e79510?, 0xc0019b6540}, 0xc005c91300)
/Users/bytedance/go/pkg/mod/github.com/opentracing-contrib/[email protected]/nethttp/server.go:154 +0x4f7
net/http.HandlerFunc.ServeHTTP(0x4e518f?, {0x2e79510?, 0xc0019b6540?}, 0x77?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2136 +0x29
golang.org/x/net/http2/h2c.h2cHandler.ServeHTTP({{0x2e65c40?, 0xc0006a3d00?}, 0xc0006a41e0?}, {0x2e79510, 0xc0019b6540}, 0xc005c91300)
/Users/bytedance/go/pkg/mod/golang.org/x/[email protected]/http2/h2c/h2c.go:125 +0x68e
github.com/grafana/pyroscope/pkg/util.glob..func2.1({0x2e79510?, 0xc0019b6540?}, 0xc001d8cdd0?)
/Users/bytedance/Documents/cncf/pyroscope/pkg/util/recovery.go:34 +0x76
net/http.HandlerFunc.ServeHTTP(0x410745?, {0x2e79510?, 0xc0019b6540?}, 0xc0019b6501?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2136 +0x29
net/http.serverHandler.ServeHTTP({0x2e728f0?}, {0x2e79510?, 0xc0019b6540?}, 0x6?)
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2938 +0x8e
net/http.(*conn).serve(0xc001f863f0, {0x2e82378, 0xc0009085d0})
/opt/homebrew/opt/go/libexec/src/net/http/server.go:2009 +0x5f4
created by net/http.(*Server).Serve in goroutine 500
/opt/homebrew/opt/go/libexec/src/net/http/server.go:3086 +0x5cb

goroutine 1 [select, 4 minutes]:
github.com/grafana/dskit/services.(*Manager).AwaitStopped(0xc000b01f80, {0x2e81f20, 0x428a980})
/Users/bytedance/go/pkg/mod/github.com/grafana/[email protected]/services/manager.go:145 +0x67
github.com/grafana/pyroscope/pkg/phlare.(*Phlare).Run(0xc0009b2000)
/Users/bytedance/Documents/cncf/pyroscope/pkg/phlare/phlare.go:459 +0x6e5
main.main()
/Users/bytedance/Documents/cncf/pyroscope/cmd/pyroscope/main.go:126 +0x4bf

goroutine 49 [select, 4 minutes]:
io.(*pipe).read(0xc0006d8000, {0xc0006da000, 0x1000, 0x1000?})
/opt/homebrew/opt/go/libexec/src/io/pipe.go:57 +0xa5
io.(*PipeReader).Read(0x1000?, {0xc0006da000?, 0xc0006db000?, 0xc000682820?})
/opt/homebrew/opt/go/libexec/src/io/pipe.go:136 +0x1b
bufio.(*Reader).fill(0xc0006d8060)
/opt/homebrew/opt/go/libexec/src/bufio/bufio.go:113 +0x103
bufio.(*Reader).ReadByte(0xc0006d8060)
/opt/homebrew/opt/go/libexec/src/bufio/bufio.go:272 +0x27
github.com/aybabtme/rgbterm.interpret({0x2e6b820, 0xc0006d8060}, {0x2e658c0?, 0xc000128028?}, 0x299d990)
/Users/bytedance/go/pkg/mod/github.com/aybabtme/[email protected]/interpret.go:35 +0x1a5
github.com/aybabtme/rgbterm.Interpret({0x2e6b820?, 0xc0006d8060?}, {0x2e658c0?, 0xc000128028?})
/Users/bytedance/go/pkg/mod/github.com/aybabtme/[email protected]/interpret.go:152 +0x2e
created by github.com/aybabtme/rgbterm.NewInterpretingWriter in goroutine 1
/Users/bytedance/go/pkg/mod/github.com/aybabtme/[email protected]/interpret.go:180 +0x28a

goroutine 21 [select, 4 minutes]:
io.(*pipe).read(0xc0000a8060, {0xc0001a9000, 0x1000, 0x1010000000000?})
/opt/homebrew/opt/go/libexec/src/io/pipe.go:57 +0xa5
io.(*PipeReader).Read(0x1000?, {0xc0001a9000?, 0xc000088000?, 0x0?})
/opt/homebrew/opt/go/libexec/src/io/pipe.go:136 +0x1b
bufio.(*Reader).fill(0xc0000a80c0)
/opt/homebrew/opt/go/libexec/src/bufio/bufio.go:113 +0x103
bufio.(*Reader).ReadByte(0xc0000a80c0)
/opt/homebrew/opt/go/libexec/src/bufio/bufio.go:272 +0x27
github.com/aybabtme/rgbterm.interpret({0x2e6b820, 0xc0000a80c0}, {0x2e658c0?, 0xc000128030?}, 0x299d990)
/Users/bytedance/go/pkg/mod/github.com/aybabtme/[email protected]/interpret.go:35 +0x1a5
github.com/aybabtme/rgbterm.Interpret({0x2e6b820?, 0xc0000a80c0?}, {0x2e658c0?, 0xc000128030?})
/Users/bytedance/go/pkg/mod/github.com/aybabtme/[email protected]/interpret.go:152 +0x2e

To Reproduce

Steps to reproduce the behavior:

  1. Start Pyroscope (SHA or version)
  2. Perform Operations(Read/Write/Others)

Expected behavior

A clear and concise description of what you expected to happen.

if error does nothing, how can i solve it

Environment

  • Infrastructure: [e.g., Kubernetes, bare-metal, laptop]
  • Deployment tool: [e.g., helm, jsonnet]

version: 1.5.0

Additional Context

@kolesnikovae
Copy link
Collaborator

Hi @cao2358! Thanks for reporting the issue! Could you please confirm that the issue persists in the latest version (1.10.0)?

@kolesnikovae kolesnikovae self-assigned this Nov 26, 2024
@kolesnikovae kolesnikovae added the type/bug Something isn't working label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants