grafana/beyla

redis detect fails with index out of range

esara opened this issue · 1 comments

the current main branch is crashing with

panic: runtime error: index out of range [0] with length 0

goroutine 131 [running]:
github.com/grafana/beyla/pkg/internal/ebpf/common.parseRedisRequest({0x40001bcf00?, 0x400022f330?})
	/opt/app-root/pkg/internal/ebpf/common/redis_detect_transform.go:89 +0x25c
github.com/grafana/beyla/pkg/internal/ebpf/common.ReadGoRedisRequestIntoSpan(_)
	/opt/app-root/pkg/internal/ebpf/common/redis_detect_transform.go:175 +0x138
github.com/grafana/beyla/pkg/internal/ebpf/common.ReadHTTPRequestTraceAsSpan(_, {_, _})
	/opt/app-root/pkg/internal/ebpf/common/common.go:125 +0x394
github.com/grafana/beyla/pkg/internal/ebpf/common.(*ringBufForwarder).processAndForward(0x400072c480, {{0x40016e2780, 0x180, 0x180}, 0x0}, 0x4001ac4000)
	/opt/app-root/pkg/internal/ebpf/common/ringbuf.go:173 +0x154
github.com/grafana/beyla/pkg/internal/ebpf/common.(*ringBufForwarder).readAndForwardInner(0x400072c480, {0x1ed4670, 0x40002433b0}, 0x4001ac4000)
	/opt/app-root/pkg/internal/ebpf/common/ringbuf.go:159 +0x12c
github.com/grafana/beyla/pkg/internal/ebpf/common.(*ringBufForwarder).sharedReadAndForward(0x400072c480, {0x1eeefe8, 0x40079ac000}, {0x4002d20e90, 0x1, 0x1}, 0x4001ac4000)
	/opt/app-root/pkg/internal/ebpf/common/ringbuf.go:107 +0x1c8
github.com/grafana/beyla/pkg/internal/ebpf/httpssl.(*Tracer).Run(0x400f208900, {0x1eeefe8, 0x40079ac000}, 0x4001ac4000)
	/opt/app-root/pkg/internal/ebpf/httpssl/httpssl.go:180 +0xf8
created by github.com/grafana/beyla/pkg/internal/ebpf.(*ProcessTracer).Run in goroutine 62
	/opt/app-root/pkg/internal/ebpf/tracer_linux.go:35 +0x1cc

Fixed by #916