containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.3k stars 2.37k forks source link

1.4.0 regression: infinite loop with `COPY . .` #3300

Closed cgwalters closed 5 years ago

cgwalters commented 5 years ago

/kind bug

Steps to reproduce the issue:

  1. git clone https://github.com/openshift/machine-config-operator/

  2. podman build -t localhost/machine-config-server:latest -f Dockerfile.machine-config-server --no-cache

Describe the results you received:

Indefinite hang at STEP 3: COPY . .

Describe the results you expected:

Successful build.

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

Output of podman version:

root@orion ~# rpm -q podman
podman-1.4.0-1.fc30.x86_64
root@orion ~# podman version
Version:            1.4.0
RemoteAPI Version:  1
Go Version:         go1.12.5
OS/Arch:            linux/amd64
root@orion ~# rpm-ostree status -b
State: idle
AutomaticUpdates: stage; rpm-ostreed-automatic.timer: last run 22h ago
BootedDeployment:
● ostree://fedora-silverblue:fedora/30/x86_64/silverblue
                   Version: 30.20190610.0 (2019-06-10T00:41:42Z)
                BaseCommit: 79ea01d81ad1c6d3be6f7d699ff94326b8f04deb82d88b5ebec4326a89b23e81
              GPGSignature: Valid signature by F1D8EC98F241AAF20DF69420EF3C111FCFC659B9
      ReplacedBasePackages: containernetworking-plugins 0.7.4-2.fc30 -> 0.7.5-1.fc30, podman 2:1.3.1-1.git7210727.fc30 -> 2:1.4.0-1.fc30
           LayeredPackages: firefox-wayland fish fuse-sshfs git-evtag gnome-tweak-tool gstreamer1-plugin-openh264 gstreamer1-plugins-ugly-free keepassx krb5-workstation libva-vdpau-driver libvirt-client libvirt-daemon-driver-qemu mozilla-openh264 opensc
                            pcsc-lite-ccid qemu-kvm strace sway tilix tmux virt-manager xsel ykclient ykpers
root@orion ~#

Output of podman info --debug:

podman info --debug
debug:
  compiler: gc
  git commit: ""
  go version: go1.12.5
  podman version: 1.4.0
host:
  BuildahVersion: 1.8.3
  Conmon:
    package: podman-1.4.0-1.fc30.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 0.2.0, commit: f111af8a1cf9563213ee49df9cf1de79a0dd6e6f'
  Distribution:
    distribution: fedora
    version: "30"
  MemFree: 31529484288
  MemTotal: 66754547712
  OCIRuntime:
    package: runc-1.0.0-93.dev.gitb9b6cc6.fc30.x86_64
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc8+dev
      commit: e3b4c1108f7d1bf0d09ab612ea09927d9b59b4e3
      spec: 1.0.1-dev
  SwapFree: 0
  SwapTotal: 0
  arch: amd64
  cpus: 8
  hostname: orion
  kernel: 5.1.7-300.fc30.x86_64
  os: linux
  rootless: false
  uptime: 24h 56m 28.01s (Approximately 1.00 days)
registries:
  blocked: null
  insecure: null
  search: null
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 29
  GraphDriverName: overlay
  GraphOptions:
  - overlay.mountopt=nodev,metacopy=on
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: xfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  ImageStore:
    number: 458
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Additional environment details (AWS, VirtualBox, physical, etc.):

physical

mheon commented 5 years ago

@TomSweeneyRedHat PTAL

TomSweeneyRedHat commented 5 years ago

I've a strong suspicion that this is the same issue as: https://github.com/containers/buildah/issues/1578

baude commented 5 years ago

@TomSweeneyRedHat if you replicate this, just connect to the pid with dlv and you will know right away whats going on ... if you need help with this one, let me know.

TomSweeneyRedHat commented 5 years ago

@baude given the other irons in the fire that I have atm and my suspicion that @nalind has a fix in flight, I'll most likely wait until early next week to check in with him when he returns.

cgwalters commented 5 years ago

This is definitely a regression, works fine with podman-1.3.1-1.git7210727.fc30.x86_64.

mheon commented 5 years ago

@TomSweeneyRedHat We're not expecting a fix for this in the Buildah revendor tomorrow, right?

TomSweeneyRedHat commented 5 years ago

@mheon, unless the Buildah Fix Fairy swings by, I'm not suspecting this will be fixed for 1.8.4

mheon commented 5 years ago

Alright, Podman 1.5.0 it is, then.

TomSweeneyRedHat commented 5 years ago

The first of the two dots in the Copy command seem to be the issue. If I change that first dot to a file or even an '*' (asterisk), it seems to work. Smaller reproducer:

# cat ~/Dockerfile.copyhang
FROM alpine
WORKDIR /tmp
COPY .  . 

# buildah bud --layers -t tom -f Dockerfile.copyhang .
TomSweeneyRedHat commented 5 years ago

@cgwalters if you have a chance, can you try running your build command with --log-level debug added? podman --log-level debug build ...? Adding that seems to make things work for me and I'm not quite understanding why ATM.

baude commented 5 years ago

@cgwalters @TomSweeneyRedHat any updates fellas?

rhatdan commented 5 years ago

Lets say this is fixed in podman 1.5, and reopen if I am mistaken.

cgwalters commented 5 years ago

Did a test with rootless and

$ rpm -q podman
podman-1.5.1-3.fc30.x86_64

and yeah, seems to work now.