Skip to content

Conflicting router patterns when built with Go 1.23 #6972

Open
@stefanb

Description

@stefanb

What's wrong?

Conflicting patterns detected when built with Go 1.23


$ grafana-agent --version
  panic: pattern "GET /debug/pprof/" (registered at net/http/pprof/pprof.go:100) conflicts with pattern "/debug/pprof/delta_heap" (registered at github.com/grafana/pyroscope-go/godeltaprof@v0.1.7/http/pprof/pprof.go:24):
  	GET /debug/pprof/ matches fewer methods than /debug/pprof/delta_heap, but has a more general path pattern

Steps to reproduce

When runing the tests for Homebrew/homebrew-core#175310 the Grafana agent test failed with:

  ==> Testing grafana-agent
  ==> /opt/homebrew/Cellar/grafana-agent/0.41.1/bin/grafana-agent --version
  panic: pattern "GET /debug/pprof/" (registered at net/http/pprof/pprof.go:100) conflicts with pattern "/debug/pprof/delta_heap" (registered at github.com/grafana/pyroscope-go/godeltaprof@v0.1.7/http/pprof/pprof.go:24):
  	GET /debug/pprof/ matches fewer methods than /debug/pprof/delta_heap, but has a more general path pattern
  
  goroutine 1 [running]:
  net/http.(*ServeMux).register(...)
  	net/http/server.go:2805
  net/http.HandleFunc({0x14000074e70?, 0x10587ac8a?}, 0x107723ea0?)
  	net/http/server.go:2799 +0x9c
  net/http/pprof.init.0()
  	net/http/pprof/pprof.go:100 +0x94

System information

All, irrelevant

Software version

Grafana Agent v0.41.1

Configuration

No response

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-attentionAn issue or PR has been sitting around and needs attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions