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

podman build --jobs is not parallelized #9247

Closed
AkihiroSuda opened this issue Feb 5, 2021 · 4 comments
Closed

podman build --jobs is not parallelized #9247

AkihiroSuda opened this issue Feb 5, 2021 · 4 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@AkihiroSuda
Copy link
Collaborator

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

podman build --jobs is not parallelized

Steps to reproduce the issue:

Run podman build --no-cache --jobs 0 with the following Dockefile

FROM busybox
RUN sleep 3
RUN date
RUN touch /foo

FROM busybox
RUN sleep 3
RUN date
RUN touch /foo

FROM scratch
COPY --from=0 /foo /foo-0
COPY --from=1 /foo /foo-1

Describe the results you received:

The second date was delayed 6 seconds compared to the first one.

$ podman build -t foo --no-cache --jobs 0 .
STEP 1: FROM busybox
STEP 2: RUN sleep 3
--> fd4acb7d8da
STEP 3: RUN date
Fri Feb  5 09:45:54 UTC 2021
--> 67c9465fad5
STEP 4: RUN touch /foo
--> 981e9437014
STEP 5: FROM busybox
STEP 6: RUN sleep 3
--> 6a163b44b4e
STEP 7: RUN date
Fri Feb  5 09:46:00 UTC 2021
--> 14190eb3948
STEP 8: RUN touch /foo
--> 36af2beb782
STEP 9: FROM scratch
STEP 10: COPY --from=0 /foo /foo-0
--> b9a93476274
STEP 11: COPY --from=1 /foo /foo-1
STEP 12: COMMIT foo
--> 88b5aef3e67
88b5aef3e6727df594710dfaa14d28eda7ef929dccb9a84bb373906bf3906341

Describe the results you expected:

The second date and the first one should be executed almost simultaneously.
Buildah (containers/buildah@1040f105) works as expected:

$ buildah bud -t foo --no-cache --jobs 0 .
STEP 1: FROM scratch
STEP 2: FROM busybox
STEP 3: FROM busybox
STEP 4: COPY --from=0 /foo /foo-0
STEP 5: RUN sleep 3
STEP 6: RUN sleep 3
STEP 7: RUN date
STEP 8: RUN date
Fri Feb  5 09:48:31 UTC 2021
STEP 9: RUN touch /foo
Fri Feb  5 09:48:31 UTC 2021
STEP 10: RUN touch /foo
STEP 11: COPY --from=1 /foo /foo-1
STEP 12: COMMIT foo
--> 306a36bbaab
306a36bbaab0730d8d8233158370aeb61b002598766f1ed0c021acd98f6e0348

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

Buildah works as expected, Podman does not.

Output of podman version:

Version:      3.0.0-dev
API Version:  3.0.0
Go Version:   go1.16rc1
Git Commit:   42d4652fed759904bb51a5d3420724dc25009494
Built:        Fri Feb  5 18:44:45 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.3
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: Unknown
    path: /usr/local/bin/conmon
    version: 'conmon version 2.0.25, commit: 05ce716ac6d1cfeeb27b9280832abd2e9d1a085f'
  cpus: 4
  distribution:
    distribution: ubuntu
    version: "20.10"
  eventLogger: journald
  hostname: suda-ws01
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1001
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.8.0-41-generic
  linkmode: dynamic
  memFree: 11428253696
  memTotal: 16757456896
  ociRuntime:
    name: crun
    package: Unknown
    path: /usr/local/bin/crun
    version: |-
      crun version 0.17
      commit: 0e9229ae34caaebcb86f1fde18de3acaf18c6d9a
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1001/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_AUDIT_WRITE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_MKNOD,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    selinuxEnabled: false
  slirp4netns:
    executable: /usr/local/bin/slirp4netns
    package: Unknown
    version: |-
      slirp4netns version 1.1.8
      commit: d361001f495417b880f20329121e3aa431a8f90f
      libslirp: 4.4.0
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.4.3
  swapFree: 2147479552
  swapTotal: 2147479552
  uptime: 2h 48m 12.48s (Approximately 0.08 days)
registries:
  search:
  - docker.io
store:
  configFile: /home/suda/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/local/bin/fuse-overlayfs
      Package: Unknown
      Version: |-
        fusermount3 version: 3.9.3
        fuse-overlayfs: version 1.3
        FUSE library version 3.4.1
        using FUSE kernel interface version 7.27
  graphRoot: /home/suda/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 63
  runRoot: /tmp/1001
  volumePath: /home/suda/.local/share/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 1612518285
  BuiltTime: Fri Feb  5 18:44:45 2021
  GitCommit: 42d4652fed759904bb51a5d3420724dc25009494
  GoVersion: go1.16rc1
  OsArch: linux/amd64
  Version: 3.0.0-dev

Package info (e.g. output of rpm -q podman or apt list podman):

Installed from source.

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

@rhatdan
Copy link
Member

rhatdan commented Feb 5, 2021

If you specify --jobs=3 does it work correctly?

@AkihiroSuda
Copy link
Collaborator Author

No

@umohnani8 umohnani8 transferred this issue from containers/podman Feb 5, 2021
@rhatdan rhatdan transferred this issue from containers/buildah Feb 5, 2021
@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 5, 2021
@mheon mheon added the Buildah label Feb 5, 2021
@github-actions
Copy link

github-actions bot commented Mar 8, 2021

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Mar 8, 2021

I believe this is fixed in the main branch.

@rhatdan rhatdan closed this as completed Mar 8, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

No branches or pull requests

4 participants