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

initIO() in file.go leaks goroutine #272

Open
zllovesuki opened this issue Jan 31, 2023 · 0 comments
Open

initIO() in file.go leaks goroutine #272

zllovesuki opened this issue Jan 31, 2023 · 0 comments

Comments

@zllovesuki
Copy link

Discovered in unit testing:

--- PASS: TestPipe (2.89s)
PASS
goleak: Errors on successful test run: found unexpected goroutines:
[Goroutine 18 in state syscall, locked to thread, with syscall.SyscallN on top of the stack:
goroutine 18 [syscall, locked to thread]:
syscall.SyscallN(0x443cbd?, {0xc000097e58?, 0xc000296b40?, 0xc000097f98?})
	C:/Program Files/Go/src/runtime/syscall_windows.go:557 +0x109
syscall.Syscall6(0xc00022c7e0?, 0x0?, 0x0?, 0x0?, 0x0?, 0xc0003841d8?, 0x0?, 0x0?)
	C:/Program Files/Go/src/runtime/syscall_windows.go:501 +0x50
github.com/Microsoft/go-winio.getQueuedCompletionStatus(0x0?, 0xc000097f64, 0xc000097f68, 0xc000097f78, 0xffffffff)
	C:/Users/Vendetta/go/pkg/mod/github.com/!microsoft/go-winio@v0.6.0/zsyscall_windows.go:376 +0x11f
github.com/Microsoft/go-winio.ioCompletionProcessor(0x0?)
	C:/Users/Vendetta/go/pkg/mod/github.com/!microsoft/go-winio@v0.6.0/file.go:172 +0xb0
created by github.com/Microsoft/go-winio.initIO
	C:/Users/Vendetta/go/pkg/mod/github.com/!microsoft/go-winio@v0.6.0/file.go:73 +0xa5
]
FAIL	kon.nect.sh/specter/tun/client	3.775s

It seems like there's no way for user code to close the ioCompletionProcessor() in initIO() manually. Is it possible to expose a method to shutdown the goroutine?

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

No branches or pull requests

1 participant