Potential race with rpm2cpio/cpio in tmt prepare
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 230
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 38
Description
(Originally noticed in https://bodhi.fedoraproject.org/updates/FEDORA-2026-d91c9f9d5f#comment-4509248)
In the [tmt prepare scripts](https://github.com/bootc-dev/bootc/blob/v1.12.0/tmt/plans/integration.fmf#L26) we're piping rpm2cpio into cpio, but it looks like that might be potentially racy given during bodhi CI run this appears to have generated SIGPIPE and exited the whole thing:
```
17:41:22 script: cd bootc && ls -al && rpm2cpio *.src.rpm | cpio -idmv && rm -f *-vendor.tar.zstd && zstd -d *.tar.zstd && tar -xvf *.tar -C . --strip-components=1 && ls -al
[snip long uninteresting lines]
17:41:22 environment
17:41:22 out: total 16584
17:41:22 out: drwxr-xr-x. 1 root root 54 Jan 8 17:41 .
17:41:22 out: drwxr-xr-x. 1 root root 1456 Jan 8 17:41 ..
17:41:22 out: -rw-r--r--. 1 root root 16980246 Jan 8 17:41 bootc-1.12.0-1.fc44.src.rpm
17:41:22 err: ./bootc-1.12.0-vendor.tar.zstd
17:41:22 err: ./bootc-1.12.0.tar.zstd
17:41:22 err: ./bootc.spec
17:41:22 err: 33161 blocks
17:41:22 Command returned '141' (unrecognized).
17:41:22 fail: Command '/var/ARTIFACTS/work-plan-01-readonlyj35bbc8i/plans/all/plan-01-readonly/tree/tmt-prepare-wrapper.sh-default-1-default-0' returned 141.
```
The 141 is implying that we're getting SIGPIPE from rpm2cpio trying to write into cpio in this case. Which makes sense because we see the cpio output being emitted to stderr but we never see any output from zstd later on. So cpio is completing and then we're getting SIGPIPE.
Contributor guide
Assessment
This issue has not been assessed yet.