News for hackers. Stuff that matters.
Re:The Case of a Leaky Goroutine by jmholla on Monday March 25, 2024 @04:17PM (#39820810)
Language support would be great, but could you add logs that record the creating and destruction of goroutines, giving them a unique UUID so you can track which one's haven't exited?

Edit: Also, maybe the tool at this comment could've helped you? https://news.ycombinator.com/item?id=39817775

Re:The Case of a Leaky Goroutine by atombender on Monday March 25, 2024 @07:57PM (#39822684)
How would one log that? In our case the bug was in a goroutine started by a third-party library, so we don't have control over when it starts or exits.

I don't think Goleak would have helped here, because I believe it doesn't support concurrency. It's really designed to run in tests, not in production. It parses and searches stack traces, so it's not going to be performant.

Re:The Case of a Leaky Goroutine by physicles on Monday March 25, 2024 @08:13PM (#39822819)
I guess you’d need to fork the third-party library (or, if you can build locally, just yolo and chmod +w) and inject something to track those goroutine metrics. But I suppose by the time you’re doing that, you already know where the problem is.