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

testutil: whitelist os.(*file).close #8284

Merged
merged 1 commit into from
Jul 20, 2017

Conversation

heyitsanthony
Copy link
Contributor

Leak detector is catching goroutines trying to close files which appear
runtime related:

1 instances of:
syscall.Syscall(...)
/usr/local/golang/1.8.3/go/src/syscall/asm_linux_386.s:20 +0x5
syscall.Close(...)
/usr/local/golang/1.8.3/go/src/syscall/zsyscall_linux_386.go:296 +0x3d
os.(*file).close(...)
/usr/local/golang/1.8.3/go/src/os/file_unix.go:140 +0x62

It's unlikely a user goroutine will leak on file close; whitelist it.

Leak detector is catching goroutines trying to close files which appear
runtime related:

1 instances of:
syscall.Syscall(...)
	/usr/local/golang/1.8.3/go/src/syscall/asm_linux_386.s:20 +0x5
syscall.Close(...)
	/usr/local/golang/1.8.3/go/src/syscall/zsyscall_linux_386.go:296 +0x3d
os.(*file).close(...)
	/usr/local/golang/1.8.3/go/src/os/file_unix.go:140 +0x62

It's unlikely a user goroutine will leak on file close; whitelist it.
Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm. thanks

@codecov-io
Copy link

Codecov Report

Merging #8284 into master will decrease coverage by 0.12%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #8284      +/-   ##
=========================================
- Coverage   76.42%   76.3%   -0.13%     
=========================================
  Files         346     346              
  Lines       27055   27056       +1     
=========================================
- Hits        20676   20644      -32     
- Misses       4901    4926      +25     
- Partials     1478    1486       +8
Impacted Files Coverage Δ
pkg/testutil/leak.go 67.64% <100%> (+0.48%) ⬆️
pkg/transport/timeout_conn.go 80% <0%> (-20%) ⬇️
pkg/adt/interval_tree.go 85.88% <0%> (-5.11%) ⬇️
pkg/testutil/recorder.go 77.77% <0%> (-3.71%) ⬇️
rafthttp/msgappv2_codec.go 67.82% <0%> (-3.48%) ⬇️
clientv3/concurrency/election.go 80% <0%> (-2.41%) ⬇️
pkg/netutil/netutil.go 62.35% <0%> (-2.36%) ⬇️
etcdserver/cluster_util.go 76.64% <0%> (-1.46%) ⬇️
etcdmain/etcd.go 45.06% <0%> (-1.29%) ⬇️
clientv3/watch.go 94.5% <0%> (-1%) ⬇️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 608df0f...bb42d2b. Read the comment docs.

@heyitsanthony heyitsanthony merged commit 46ee06a into etcd-io:master Jul 20, 2017
@heyitsanthony heyitsanthony deleted the whitelist-close branch July 20, 2017 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants