Skip to content

[windows] Flaky testcase in Appveyor CI #2835

@fuweid

Description

@fuweid

Description

I see that one case related to content store failed because the test binary removes the file which hold by containerd process.

--- FAIL: TestContentClient/CommitErrorState (4.95s)
        testsuite.go:101: Cleanup failed: unknown
            github.com/containerd/containerd/errdefs.init
            	C:/gopath/src/github.com/containerd/containerd/errdefs/errors.go:39
            github.com/containerd/containerd/content.init
            	<autogenerated>:1
            github.com/containerd/containerd.init
            	<autogenerated>:1
            main.init
            	<autogenerated>:1
            runtime.main
            	C:/go/src/runtime/proc.go:189
            runtime.goexit
            	C:/go/src/runtime/asm_amd64.s:1333
            remove C:\Program Files\containerd\root-test\io.containerd.content.v1.content\ingest\9101c5f249b4cb38a50dddda86a787c09f31099573c87c525fc50774ac21d05d\.tmp-updatedat542245581: The process cannot access the file because it is being used by another process.
            github.com/containerd/containerd/errdefs.FromGRPC
            	C:/gopath/src/github.com/containerd/containerd/errdefs/grpc.go:98
            github.com/containerd/containerd/content/proxy.(*proxyContentStore).Abort
            	C:/gopath/src/github.com/containerd/containerd/content/proxy/content_store.go:187
            github.com/containerd/containerd.newContentStore.func2
            	C:/gopath/src/github.com/containerd/containerd/content_test.go:60
            github.com/containerd/containerd/content/testsuite.makeTest.func1.1
            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:100
            github.com/containerd/containerd/content/testsuite.makeTest.func1
            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:121
            testing.tRunner
            	C:/go/src/testing/testing.go:827
            runtime.goexit
            	C:/go/src/runtime/asm_amd64.s:1333
            failed to abort c1-commiterror-state
            github.com/containerd/containerd.newContentStore.func2
            	C:/gopath/src/github.com/containerd/containerd/content_test.go:61
            github.com/containerd/containerd/content/testsuite.makeTest.func1.1
            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:100
            github.com/containerd/containerd/content/testsuite.makeTest.func1
            	C:/gopath/src/github.com/containerd/containerd/content/testsuite/testsuite.go:121
            testing.tRunner
            	C:/go/src/testing/testing.go:827
            runtime.goexit
            	C:/go/src/runtime/asm_amd64.s:1333

The case will close the grpc stream. However, the content service doesn't close file descriptor synchronously. Before the file is closed, the cleanup will call Abort to remove the file. But it failed in windows. I am not sure that it is related to windows kernel. I can not reproduce The process cannot access the file because it is being used by another process. in linux kernel.

From #2823

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions