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

implements new gleak goroutine leak detection experimental package #538

Merged
merged 1 commit into from Apr 8, 2022

Conversation

thediveo
Copy link
Collaborator

@thediveo thediveo commented Apr 4, 2022

  • implements issue Feature: goroutine leak testing #536; the code and documentation is under Gomega's license.
  • provides goroutine discovery as goroutine.Goroutine
  • provides HaveLeaked matcher for reasoning on slices of goroutines for leak detection
  • provides set of IgnoringXXX matchers for identifying good (non-leaky) goroutines
  • provides unit tests for gleak and gleak/goroutine packages
  • updates documentation and adds Gleakiee, the leaky gopher, mascot

- provides goroutine discovery as goroutine.Goroutine
- provides HaveLeaked matcher for reasoning on slices of goroutines for leak detection
- provides set of IgnoringXXX matchers for identifying good (non-leaky) goroutines
- provides unit tests for gleak and gleak/goroutine packages
- updates documentation and adds Gleakiee, the leaky gopher, mascot
@@ -2951,4 +2951,292 @@ Describe("server performance", func() {
})
```

## `gleak`: Finding Leaked Goroutines
Copy link
Owner

@onsi onsi Apr 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These docs are fantastic ! Thanks for taking the time to write them up!

@onsi
Copy link
Owner

onsi commented Apr 8, 2022

hey @thediveo this looks fantastic! It looks good to merge to me! Was there anything else you wanted to add/consider before we pull the trigger?

@thediveo
Copy link
Collaborator Author

thediveo commented Apr 8, 2022

No. (Except to duck down, maybe) The irony of it is that now I'm finding goroutine leaks in my tests, but the production code seems to be fine.

I'm wondering if we should come up next with a file descriptor leak tester, albeit I only know how to do this on Linux thanks to its procfs file system that lists the open fds of a process.

@onsi
Copy link
Owner

onsi commented Apr 8, 2022

oh man file descriptor leaks are the worst.

This all looks great, gonna merge it in now!

@onsi onsi merged commit 85ba7bc into onsi:master Apr 8, 2022
5 checks passed
@thediveo thediveo deleted the experiment/gleak branch Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants