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

[checklocks]: source file and line number sometimes not printed #11203

Open
kahing opened this issue Nov 21, 2024 · 1 comment
Open

[checklocks]: source file and line number sometimes not printed #11203

kahing opened this issue Nov 21, 2024 · 1 comment
Labels
type: bug Something isn't working

Comments

@kahing
Copy link

kahing commented Nov 21, 2024

Description

sometimes I see:

-: return with unexpected locks held (locks: &({param:f}.mu) exclusively)

notice the usual file name and line number is replaced by -.

Steps to reproduce

go: downloading gvisor.dev/gvisor v0.0.0-20241120231458-0add1d20fa0c

I haven't been able to extract a simple repro (the fact that I can't tell where the error is happening makes it harder). I happen to believe these are false positive as well but it's hard to prove without knowing what it's unhappy about :-)

runsc version

docker version (if using docker)

uname

No response

kubectl (if using Kubernetes)

repo state (if built from source)

No response

runsc debug logs (if available)

@kahing kahing added the type: bug Something isn't working label Nov 21, 2024
@kahing
Copy link
Author

kahing commented Nov 21, 2024

ok I found an instance where I can reproduce both the location - issue and I believe to be a false positive:

func (f *F) uselessFunc() {
	f.mu.Lock()
	defer f.mu.Unlock()

	//defer func() {
	//}()
}

If I uncomment the defer, I get an extra -: return with unexpected locks held (locks: &({param:f}.mu) exclusively). Seems only applies if the defer is an anonymous function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant