Hi,
I’m running into segfaults when trying to use centos7 containers on top of an FCOS machine in podman. I’m not sure if this is a bug in FCOS or elsewhere, or if there’s something I can do to work around this if it’s intended; very sorry if I’m asking about this in the wrong location or if I’m just making a trivial mistake.
Here’s the containerfile:
FROM centos:7
COPY install.sh /
RUN chmod +x /install.sh && "/install.sh"
CMD ["bash"]
install.sh:
#!/bin/bash
yum install -y epel-release
When run on a podman machine using FCOS testing 38.20231027 for qemu, this containerfile works as expected. However, when run on later releases, it segfaults inside yum install.
This succeeds:
podman machine init --image-path https://builds.coreos.fedoraproject.org/prod/streams/testing/builds/38.20231027.2.0/aarch64/fedora-coreos-38.20231027.2.0-qemu.aarch64.qcow2.xz
podman machine start
podman build --platform linux/amd64 -f Dockerfile
These both fail:
podman machine init
podman machine start
podman build --platform linux/amd64 -f Dockerfile
podman machine init --image-path https://builds.coreos.fedoraproject.org/prod/streams/testing/builds/39.20231101.2.0/aarch64/fedora-coreos-39.20231101.2.0-qemu.aarch64.qcow2.xz
podman machine start
podman build --platform linux/amd64 -f Dockerfile
Failure logs:
STEP 1/4: FROM CENTOS:7
[Snip logs about pulling from Quay]
STEP 2/4: COPY install.sh /
→ f65d9eba016f
STEP 3/4: RUN chmod +x /install.sh && “/install.sh”
/install.sh: line 3: 9 Segmentation fault (core dumped) yum install -y epel-release
Error: building at STEP “RUN chmod +x /install.sh && “/install.sh””: whle running runtime: exit status 139
If I move the “yum install -y epel-release” line into the containerfile itself, I no longer see a segfault, but that line appears to hang forever. Passing --log-level=debug doesn’t generate any further logs in Step 3.
I’ve verified that this occurs with the applehv provider as well; applehv support was added after this was introduced, so I can’t test if it didn’t previously occur on applehv.
I’ve verified that this occurs on M2 and M3 macbooks; I’ve verified that this doesn’t occur on intel macs. I’ve verified that this occurs if I don’t pass a platform to the podman build command.
The segfaults occur on non-yum programs as well- I first encountered them on a bit of internal software we’d built.
I couldn’t immediately get an alpine linux container to segfault- possibly this is centos7-specific?
This is on the latest podman release for macos- 4.9.3. I tried downgrading a few versions and couldn’t stop getting the issue.
I’m not sure if this is a known or expected issue, or if I’m doing something wrong- I’m having trouble getting more info on the segfault in question, the Centos7 image doesn’t have gdb installed, and bash also seems to fail.
Thanks!