Skip to content

runtime_vm: kubectl cp ... may hang forever #4353

@fidencio

Description

@fidencio

Description

Kata Containers CI has detected that one of their tests, k8s-copy-file.bats(https://github.com/kata-containers/tests/blob/master/integration/kubernetes/k8s-copy-file.bats), has been constantly failing since they updated the CRI-O version to v1.18.4.

The test failing is "Copy file in a pod" and after some preliminary debugging it's been found out the regression was introduced as part of:
217c714

The issue has been tracked on the Kata Containers side as kata-containers/kata-containers#1080

Steps to reproduce the issue:

Considering the following pod:

apiVersion: v1
kind: Pod
metadata:
  name: test-env
spec:
  terminationGracePeriodSeconds: 0
  runtimeClassName: kata
  containers:
    - name: test-container
      image: busybox
      command: [ "sh", "-c"]
      args:
      - while true; do
          echo -en '\n';
          printenv MY_POD_NAME;
          sleep 1;
        done;
      env:
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
  restartPolicy: Never
  1. kubectl create -f pod.yaml
  2. kubectl wait --for=condition=Ready pod "test-env"
  3. echo "Hello" > "file.txt"
  4. kubectl cp "file.txt" test-env:/tmp

Describe the results you received:
kubectl cp "file.txt" test-env:/tmp hangs forever.

Describe the results you expected:
kubectl cp "file.txt" test-env:/tmp should finish.

Additional information you deem important (e.g. issue happens only occasionally):

The issue is not reproducible 100% of the time. It becomes easier to reproduce by looping the Kata Containers test 10 times.

Output of crio --version:
Happens with git main, happens with release-1.19, happens with release-1.18.

Additional environment details (AWS, VirtualBox, physical, etc.):
A CentOS VM, deployed using qemu + kvm.

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