-
Notifications
You must be signed in to change notification settings - Fork 19k
cmd/go: go doc runaway memory usage in go1.26.2 #78801
Copy link
Copy link
Closed
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.GoCommandcmd/gocmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Metadata
Metadata
Assignees
Labels
BugReportIssues describing a possible bug in the Go implementation.Issues describing a possible bug in the Go implementation.GoCommandcmd/gocmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Type
Projects
Status
Done
This issue originally came as a security report, but we've determined that this is not a vulnerability.
Therefore, filing this publicly.
A user reported that running
go docon certain packages will cause their memory usage to quickly climb up, eventually causing OOM. In the original report, this happens when runninggo doc github.com/nats-io/nats.go.ConnectedServerInfoon go1.26.2 on Linux, in a project that imports the package. However, running something likego doc net/http.Serverdoes not cause memory to climb up.I suspect this is a bit of a heisenbug. So far I was unable to reproduce it. However, @thatnealpatel was able to. According to his observations:
make.bash.main.go.go doc github.com/nats-io/nats.go.ConnectedServerInfo.go dochangs and memory starts climbing up.Things I suspect but cannot confirm yet:
github.com/nats-io/nats.go.ConnectedServerInfois a non-existent symbol. Perhaps this bug is more prone to show up / only happens with non-existent symbols?