Closed damnms closed 3 years ago
Hmm, that seems to work when I try it here, but in attempting to look at why that error might be reported, I spotted that we're not checking for errors that occur while creating the file in the destination before checking if we wrote out the right number of bytes for its contents. That suggests that a different error occurred, but we mis-reported it.
If you can run strace -e openat -f podman build -f Dockerfile.add ./bodypix
with this in bodypix/Dockerfile.add
:
FROM scratch
ADD app.js src/
and it still produces the error, we should be able to pick out the error from the output.
strace.log executed : oli @ ~/fakecam - [master] $ strace -e openat -f podman build -f Dockerfile.add ./bodypix > strace.log 2>&1
Hmm, given the call that created the file was logged as
[pid 45311] openat(AT_FDCWD, "/src/app.js", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC|O_CLOEXEC, 0600) = 9
without producing an error, and the final exit status was 0, that unfortunately didn't reproduce the error as I'd hoped it would.
If you can reliably reproduce the problem using the original Dockerfile, can you attempt running the original build command under strace as well? It may hang when attempting to run the RUN instructions, and if it doesn't, it'll produce a much, much larger amount of output, but my attempt to have you reproduce the error while avoiding those issues wasn't able to trigger the error, so that's the next thing to check.
Meanwhile, #2703 should at least fix the error reporting.
is the cwd is correct?
After it chroot()s into the destination rootfs, it is, yes.
I have the similar problem -
FROM alpine:3.12.0
RUN apk update
[i] ℤ podman build . 17:41:18
STEP 1: FROM alpine:3.12.0
STEP 2: RUN apk update
2020-10-30T09:41:26.000686543Z: sd-bus call: Input/output error
error running container: error creating container for [/bin/sh -c apk update]: : exit status 1
Error: error building at STEP "RUN apk update": error while running runtime: exit status 1
Relevant strace
log part:
openat(AT_FDCWD, "/proc/self/mountinfo", O_RDONLY|O_CLOEXEC) = 15
epoll_ctl(4, EPOLL_CTL_ADD, 15, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = 0
fcntl(15, F_GETFL) = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl(15, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(15, "765 764 0:34 /root / rw,relatime"..., 4096) = 3663
read(15, "", 4096) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 15, 0xc00008280c) = 0
close(15) = 0
unlinkat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay/1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", 0) = -1 EISDIR (Is a directory)
unlinkat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay/1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", AT_REMOVEDIR) = -1 ENOTEMPTY (Directory not empty)
openat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay", O_RDONLY|O_CLOEXEC) = 15
epoll_ctl(4, EPOLL_CTL_ADD, 15, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 15, 0xc000082834) = -1 EPERM (Operation not permitted)
unlinkat(15, "1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", 0) = -1 EISDIR (Is a directory)
newfstatat(15, "1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", {st_mode=S_IFDIR|0700, st_size=34, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(15, "1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", O_RDONLY|O_CLOEXEC) = 16
epoll_ctl(4, EPOLL_CTL_ADD, 16, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 16, 0xc0000826ec) = -1 EPERM (Operation not permitted)
getdents64(16, 0xc000528000 /* 6 entries */, 8192) = 152
getdents64(16, 0xc000528000 /* 0 entries */, 8192) = 0
unlinkat(16, "diff", 0) = -1 EISDIR (Is a directory)
newfstatat(16, "diff", {st_mode=S_IFDIR|0755, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(16, "diff", O_RDONLY|O_CLOEXEC) = 14
epoll_ctl(4, EPOLL_CTL_ADD, 14, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 14, 0xc00008254c) = -1 EPERM (Operation not permitted)
getdents64(14, 0xc00053c000 /* 2 entries */, 8192) = 48
getdents64(14, 0xc00053c000 /* 0 entries */, 8192) = 0
close(14) = 0
unlinkat(16, "diff", AT_REMOVEDIR) = 0
unlinkat(16, "link", 0) = 0
unlinkat(16, "work", 0) = -1 EISDIR (Is a directory)
newfstatat(16, "work", {st_mode=S_IFDIR|0700, st_size=8, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(16, "work", O_RDONLY|O_CLOEXEC) = 14
epoll_ctl(4, EPOLL_CTL_ADD, 14, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 14, 0xc00014554c) = -1 EPERM (Operation not permitted)
getdents64(14, 0xc000544000 /* 3 entries */, 8192) = 72
getdents64(14, 0xc000544000 /* 0 entries */, 8192) = 0
unlinkat(14, "work", 0) = -1 EISDIR (Is a directory)
newfstatat(14, "work", {st_mode=S_IFDIR|0700, st_size=0, ...}, AT_SYMLINK_NOFOLLOW) = 0
openat(14, "work", O_RDONLY|O_CLOEXEC) = 17
epoll_ctl(4, EPOLL_CTL_ADD, 17, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 17, 0xc0001453ac) = -1 EPERM (Operation not permitted)
getdents64(17, 0xc00054c000 /* 2 entries */, 8192) = 48
getdents64(17, 0xc00054c000 /* 0 entries */, 8192) = 0
close(17) = 0
unlinkat(14, "work", AT_REMOVEDIR) = 0
close(14) = 0
unlinkat(16, "work", AT_REMOVEDIR) = 0
unlinkat(16, "lower", 0) = 0
close(16) = 0
unlinkat(15, "1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14", AT_REMOVEDIR) = 0
close(15) = 0
unlinkat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14.tar-split.gz", 0) = -1 ENOENT (No such file or directory)
unlinkat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/1a7d54ec0f7e5c85a7318efcf8f6780ee305574b7c3a05ae1dbb8139c96d4f14.tar-split.gz", AT_REMOVEDIR) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/mountpoints.lock", O_RDWR|O_CREAT|O_CLOEXEC, 0644) = 14
fcntl(14, F_SETLKW, {l_type=F_WRLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
newfstatat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers", {st_mode=S_IFDIR|0700, st_size=352, ...}, 0) = 0
openat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/.tmp-layers.json392651895", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 15
epoll_ctl(4, EPOLL_CTL_ADD, 15, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 15, 0xc000145a84) = -1 EPERM (Operation not permitted)
write(15, "[{\"id\":\"50644c29ef5a27c9a40c393a"..., 792) = 792
fdatasync(15) = 0
close(15) = 0
fchmodat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/.tmp-layers.json392651895", 0600) = 0
newfstatat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/layers.json", {st_mode=S_IFREG|0600, st_size=1047, ...}, AT_SYMLINK_NOFOLLOW) = 0
renameat(AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/.tmp-layers.json392651895", AT_FDCWD, "/home/akochkov/.local/share/containers/storage/overlay-layers/layers.json") = 0
getrandom("\xba\x07\x06\xb7\x0d\x6a\x6b\xf2\xd8\xd7\x2d\xf9\x2e\x30\xe2\x59\x16\x17\x7e\x0d\x8c\x10\x0e\x66\xdc\x7c\xcf\x27\x33\x69\x16\xeb", 32, 0) = 32
lseek(11, 0, SEEK_SET) = 0
write(11, "ba0706b70d6a6bf2d8d72df92e30e259"..., 64) = 64
newfstatat(AT_FDCWD, "/run/user/1000/containers/overlay-layers", {st_mode=S_IFDIR|0700, st_size=80, ...}, 0) = 0
openat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/.tmp-mountpoints.json851094890", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 15
epoll_ctl(4, EPOLL_CTL_ADD, 15, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 15, 0xc000145a54) = -1 EPERM (Operation not permitted)
write(15, "[]", 2) = 2
fdatasync(15) = 0
close(15) = 0
fchmodat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/.tmp-mountpoints.json851094890", 0600) = 0
newfstatat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/mountpoints.json", {st_mode=S_IFREG|0600, st_size=2, ...}, AT_SYMLINK_NOFOLLOW) = 0
renameat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/.tmp-mountpoints.json851094890", AT_FDCWD, "/run/user/1000/containers/overlay-layers/mountpoints.json") = 0
openat(AT_FDCWD, "/run/user/1000/containers/overlay-layers/mountpoints.json", O_RDONLY|O_CLOEXEC) = 15
epoll_ctl(4, EPOLL_CTL_ADD, 15, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=3606092760, u64=140569295756248}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 15, 0xc000145aa4) = -1 EPERM (Operation not permitted)
fstat(15, {st_mode=S_IFREG|0600, st_size=2, ...}) = 0
read(15, "[]", 514) = 2
read(15, "", 512) = 0
close(15) = 0
getrandom("\x85\x2b\x7b\xd3\xbe\xef\x29\x6d\xf1\xfd\x40\x5d\x63\x20\x5c\xa1\x0f\x5c\xef\x43\xf1\x13\xd2\xfc\xa0\x3a\x7a\x99\x8c\x00\x9d\x84", 32, 0) = 32
lseek(14, 0, SEEK_SET) = 0
write(14, "852b7bd3beef296df1fd405d63205ca1"..., 64) = 64
close(14) = 0
futex(0xc000580148, FUTEX_WAKE_PRIVATE, 1) = 1
close(13) = 0
close(12) = 0
close(11) = 0
openat(AT_FDCWD, "/etc/localtime", O_RDONLY) = 11
read(11, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 561
read(11, "", 4096) = 0
close(11) = 0
sendmsg(3, {msg_name={sa_family=AF_UNIX, sun_path="/run/systemd/journal/socket"}, msg_namelen=30, msg_iov=[{iov_base="PRIORITY=6\nMESSAGE=2020-10-30 17"..., iov_len=222}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 222
write(2, "Error: error building at STEP \"R"..., 91Error: error building at STEP "RUN apk update": error while running runtime: exit status 1
) = 91
exit_group(125) = ?
+++ exited with 125 +++
This install looks like it is attempting to talk to the journal from within the container, which is not going to work?
The original example worked for me.
Could you also try this as root, to see if you have problems with user namespace?
@rhatdan in my case error disappeared if I run the same command from root
.
I also noted the errors in journalctl --user
:
Nov 27 14:14:20 akochkov-linux plasmashell[3139]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Nov 27 14:14:20 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for GroupDialog_QMLTYPE_364(0x55ddb4186640)
Nov 27 14:14:20 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for GroupDialog_QMLTYPE_364(0x55ddb4186640)
Nov 27 14:16:59 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:16:59 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:16:59 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:23:09 akochkov-linux /usr/libexec/gdm-wayland-session[2157]: kwin_libinput: Libinput: event4 - Chicony HP Elite USB Keyboard: client bug: event processing lagging behind by 14ms, your system is too slow
Nov 27 14:24:40 akochkov-linux /usr/libexec/gdm-wayland-session[2157]: This plugin does not support raise()
Nov 27 14:26:05 akochkov-linux /usr/libexec/gdm-wayland-session[2157]: kwin_libinput: Libinput: event4 - Chicony HP Elite USB Keyboard: client bug: event processing lagging behind by 12ms, your system is too slow
Nov 27 14:26:14 akochkov-linux /usr/libexec/gdm-wayland-session[2157]: kwin_libinput: Libinput: event4 - Chicony HP Elite USB Keyboard: client bug: event processing lagging behind by 14ms, your system is too slow
Nov 27 14:26:34 akochkov-linux /usr/libexec/gdm-wayland-session[2144]: dbus-daemon[2144]: [session uid=1000 pid=2144] Activating service name='org.freedesktop.systemd1' requested by ':1.854' (uid=1000 pid=142545 comm="podman build -t deb-woody-r2 . " label="unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023")
Nov 27 14:26:34 akochkov-linux /usr/libexec/gdm-wayland-session[2144]: dbus-daemon[2144]: [session uid=1000 pid=2144] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Nov 27 14:26:45 akochkov-linux /usr/libexec/gdm-wayland-session[2144]: dbus-daemon[2144]: [session uid=1000 pid=2144] Activating service name='org.freedesktop.systemd1' requested by ':1.856' (uid=1000 pid=142648 comm="/usr/bin/crun --systemd-cgroup create --bundle /va" label="unconfined_u:system_r:container_runtime_t:s0-s0:c0.c1023")
Nov 27 14:26:45 akochkov-linux /usr/libexec/gdm-wayland-session[2144]: dbus-daemon[2144]: [session uid=1000 pid=2144] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1
Nov 27 14:26:45 akochkov-linux podman[142545]: 2020-11-27 14:26:45.853326615 +0800 CST m=+11.301155352 image build
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: file:///usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/ui/Task.qml:285:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for GroupDialog_QMLTYPE_364(0x55ddb4186640)
Nov 27 14:26:49 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for GroupDialog_QMLTYPE_364(0x55ddb4186640)
Nov 27 14:27:02 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:27:02 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:27:02 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:27:05 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:27:05 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
Nov 27 14:27:05 akochkov-linux plasmashell[3139]: kf.plasma.quick: Couldn't create KWindowShadow for ToolTipDialog(0x55ddb3cfd720)
It might be related to Wayland active, see als https://bugzilla.redhat.com/show_bug.cgi?id=1877228
This seems to work correctly in current release, reopen if I am mistaken.
Description i get an error on fedora 33 beta with podman when i try to build one of the dockerfiles
Steps to reproduce the issue:
Describe the results you received: an error which was working a couple of days/weeks before
Describe the results you expected: no error and a build image
Output of
rpm -q buildah
orapt list buildah
:i do not have buildah installed as standalone, it runs in podman i guess
Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: