We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Investigating another issue I found that debug/elf.Open returns a type that cannot be closed, resulting in a file descriptor leak. goroutine 1 [running]: os.NewFile(0x3, 0x1053bf00, 0x28, 0x0) /home/dfc/go/src/pkg/os/file_unix.go:49 +0x100 os.OpenFile(0x1053bf00, 0x28, 0x0, 0x0, 0x63bb8, ...) /home/dfc/go/src/pkg/os/file_unix.go:97 +0x128 os.Open(0x1053bf00, 0x28, 0x2, 0x0, 0x0, ...) /home/dfc/go/src/pkg/os/file.go:230 +0x50 debug/elf.Open(0x1053bf00, 0x28, 0x21, 0x183f88, 0x7, ...) /home/dfc/go/src/pkg/debug/elf/file.go:152 +0x30 main.(*Package).gccDebug(0x105123f0, 0x10553c00, 0x2fb, 0x36e, 0x0, ...) /home/dfc/go/src/cmd/cgo/gcc.go:744 +0x514 main.(*Package).loadDWARF(0x105123f0, 0x1050a1c0, 0x10557330, 0x4, 0x4, ...) /home/dfc/go/src/cmd/cgo/gcc.go:434 +0x800 main.(*Package).Translate(0x105123f0, 0x1050a1c0) /home/dfc/go/src/cmd/cgo/gcc.go:180 +0x140 main.main() /home/dfc/go/src/cmd/cgo/main.go:226 +0xd40 **** panic: leaked! goroutine 15 [running]: os.(*file).whinge(0x1054ece0) /home/dfc/go/src/pkg/os/file_unix.go:108 +0x104
The text was updated successfully, but these errors were encountered:
Comment 2:
I'm not sure what this is about. *elf.File can certainly be closed. Instead are you saying that cgo code is buggy and should close files?
Sorry, something went wrong.
Comment 3:
elf (and it's friends) don't call close. Obviously I missed that there was a close method. I'll take a look again.
Labels changed: added priority-later, removed priority-triage.
Owner changed to @davecheney.
Comment 4:
https://golang.org/cl/10386043
Status changed to Started.
Comment 5:
This issue was closed by revision f9c22f7.
Status changed to Fixed.
No branches or pull requests
The text was updated successfully, but these errors were encountered: