Bug 1497444
Summary: | kernel-core package installation gives cat: write error: Broken pipe error | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ömer Fadıl Usta <omerusta> | ||||
Component: | dracut | Assignee: | dracut-maint-list | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | airlied, ajax, andrea.vai, augol, axel.sommerfeldt, ben.r.xiao, bojan, bskeggs, cristian.ciupitu, devin, dimitris.on.linux, dracut-maint-list, eparis, esandeen, harald, hdegoede, heldwin, horsley1953, ichavero, itamar, jarodwilson, jdickers, jforbes, jglisse, joe, jonathan, josef, jwboyer, kernel-maint, klaas, labbott, linville, luminoso, mchehab, mjg59, nhorman, patmans, quintela, rc040203, russ+bugzilla-redhat, steved, vedran, zbyszek | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-01-18 09:09:43 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Ömer Fadıl Usta
2017-09-30 13:16:22 UTC
Same here on Fedora 27: dnf reinstall kernel-core Failed to synchronize cache for repo 'taw-Riot', disabling. Failed to synchronize cache for repo 'ring', disabling. Last metadata expiration check: 2:23:57 ago on Sat Oct 14 09:17:53 2017. Dependencies resolved. ============================================================================================================================================ Package Arch Version Repository Size ============================================================================================================================================ Reinstalling: kernel-core x86_64 4.13.5-300.fc27 fedora 21 M Transaction Summary ============================================================================================================================================ Total download size: 21 M Is this ok [y/N]: y Downloading Packages: kernel-core-4.13.5-300.fc27.x86_64.rpm 534 kB/s | 21 MB 00:40 -------------------------------------------------------------------------------------------------------------------------------------------- Total 527 kB/s | 21 MB 00:41 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Reinstalling : kernel-core-4.13.5-300.fc27.x86_64 1/2 Running scriptlet: kernel-core-4.13.5-300.fc27.x86_64 1/2 Running scriptlet: kernel-core-4.13.5-300.fc27.x86_64 2/2 Erasing : kernel-core-4.13.5-300.fc27.x86_64 2/2 Running scriptlet: kernel-core-4.13.5-300.fc27.x86_64 2/2 cat: write error: Broken pipe Verifying : kernel-core-4.13.5-300.fc27.x86_64 1/2 Verifying : kernel-core-4.13.5-300.fc27.x86_64 2/2 Reinstalled: kernel-core.x86_64 4.13.5-300.fc27 Complete! *** Bug 1502196 has been marked as a duplicate of this bug. *** Yeah, same problem here. My grub.cfg does not get edited properly either. No idea what's going on. I think that dracut creates a file with cat and then closes it causing cat to complain about the pipe. The verbose log from reinstalling kernel core: (set -x in /usr/lib/kernel/install.d/50-dracut.install and add -v to the command.) + dracut -v /boot/2ac2df52725849988ffb627438d0378d/4.13.13-300.fc27.x86_64/initrd 4.13.13-300.fc27.x86_64 dracut: Executing: /usr/bin/dracut -v /boot/2ac2df52725849988ffb627438d0378d/4.13.13-300.fc27.x86_64/initrd 4.13.13-300.fc27.x86_64 dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found! dracut: dracut module 'biosdevname' will not be installed, because command 'biosdevname' could not be found! dracut: dracut module 'busybox' will not be installed, because command 'busybox' could not be found! dracut: *** Including module: bash *** dracut: *** Including module: systemd *** dracut: *** Including module: systemd-initrd *** dracut: *** Including module: nss-softokn *** dracut: *** Including module: i18n *** dracut: *** Including module: network *** dracut: *** Including module: ifcfg *** dracut: *** Including module: drm *** dracut: *** Including module: plymouth *** dracut: *** Including module: kernel-modules *** dracut: *** Including module: kernel-network-modules *** dracut: *** Including module: resume *** dracut: *** Including module: rootfs-block *** dracut: *** Including module: terminfo *** dracut: *** Including module: udev-rules *** dracut: Skipping udev rule: 40-redhat.rules dracut: Skipping udev rule: 50-firmware.rules dracut: Skipping udev rule: 50-udev.rules dracut: Skipping udev rule: 91-permissions.rules dracut: Skipping udev rule: 80-drivers-modprobe.rules dracut: *** Including module: dracut-systemd *** dracut: *** Including module: usrmount *** dracut: *** Including module: base *** dracut: *** Including module: fs-lib *** dracut: *** Including module: shutdown *** dracut: *** Including modules done *** dracut: *** Installing kernel module dependencies *** dracut: *** Installing kernel module dependencies done *** dracut: *** Resolving executable dependencies *** dracut: *** Resolving executable dependencies done*** dracut: *** Hardlinking files *** dracut: *** Hardlinking files done *** dracut: *** Stripping files *** dracut: *** Stripping files done *** dracut: *** Generating early-microcode cpio image *** dracut: *** Constructing GenuineIntel.bin **** dracut: *** Store current command line parameters *** dracut: *** Creating image file '/boot/2ac2df52725849988ffb627438d0378d/4.13.13-300.fc27.x86_64/initrd' *** cat: write error: Broken pipe dracut: *** Creating initramfs image file '/boot/2ac2df52725849988ffb627438d0378d/4.13.13-300.fc27.x86_64/initrd' done *** + ret=0 + exit 0 (In reply to Bojan Smojver from comment #3) > Yeah, same problem here. My grub.cfg does not get edited properly either. No > idea what's going on. BTW, this may have been a permissions problem. For whatever reason, /boot/grub2/grub.cfg on this one machine had 0400 permissions. Anyway, we'll see at the next kernel upgrade with 0664 permissions set. (In reply to Bojan Smojver from comment #5) > BTW, this may have been a permissions problem. For whatever reason, > /boot/grub2/grub.cfg on this one machine had 0400 permissions. Anyway, we'll > see at the next kernel upgrade with 0664 permissions set. Nope. Just upgraded the same box to 4.13.14 and grub.cfg still did not get edited. Reboot brought the box back to the only (and old) kernel in grub.cfg. (In reply to Bojan Smojver from comment #6) > Nope. Just upgraded the same box to 4.13.14 and grub.cfg still did not get > edited. Reboot brought the box back to the only (and old) kernel in grub.cfg. Somehow, I must have removed grub2-pc package from this machine. Once I put that back, everything started working as expected. PEBKAC. I assume it goes without saying, but this happens when installing kernel-debug-core as well. Also I have noticed the following in /boot: [root@jdickers ~]# ls -lR /boot/3053295745c94057a40abbffb5ed2703/ /boot/3053295745c94057a40abbffb5ed2703/: total 4 drwxr-xr-x. 2 root root 1024 Nov 29 10:14 4.13.15-300.fc27.x86_64 drwxr-xr-x. 2 root root 1024 Nov 29 10:13 4.13.15-300.fc27.x86_64+debug /boot/3053295745c94057a40abbffb5ed2703/4.13.15-300.fc27.x86_64: total 0 /boot/3053295745c94057a40abbffb5ed2703/4.13.15-300.fc27.x86_64+debug: total 0 [root@jdickers ~]# Could this be a symptom of the broken pipe? Created attachment 1361367 [details]
debug log of dracut
I also see this bug on f27, when I install a new kernel, or reinstall:
kernel-core-4.13.16-300.fc27.x86_64
It seems to only appear after the removal of the reinstalled kernel.
But my grub.cfg is correctly updated.
If I remove: dracut-config-rescue-046-5.fc27.x86_64
I don't have anymore a:
initramfs-0-rescue-$(cat /etc/machine-id).img
vmlinuz-0-rescue-$(cat /etc/machine-id)
in /boot, but only a folder with the content of /etc/machine-id, that is not deleted.
If you look in the attachment, you see also 2 --help getting triggered (one for ln and an other for cpio)
I'm still seeing this, along with a new error: Running scriptlet: kernel-core-4.13.16-302.fc27.x86_64 21/21 ln: target '/boot/dtb' is not a directory cat: write error: Broken pipe My system still boots, but it is not very confidence inspiring to get random meaningless error spewed out when installing a new kernel. If I add: stdloglvl=6, in /usr/lib/dracut/dracut-logger.sh, I get more verbose infos, but I am not sure what is the source of the problem. It leads to /usr/bin/lsinitrd (maybe something close to bug #1323401 ?), and I can see a relation with: echo "Early CPIO image" list_files and all the variants of: $CAT "$image" | cpio --extract --verbose --quiet --list | sort -n -k5 $CAT "$image" | cpio --extract --verbose --quiet --list | sort -k9 etc. If I comment the function: list_files, I don't get the broken pipe anymore, but maybe there are more things related. The print to stdout seems to be laggy(?), so the broken pipe happens and is printed before the others lines that should be normally printed after. So it is confusing while trying to debug. There is also a problem with: version=$($CAT "$image" | cpio --extract --verbose --quiet --to-stdout -- \ $(dracutlibdirs 'dracut-*') 2>/dev/null) ((ret+=$?)) echo "Version: $version" having an empty variable $version, even if I comment the function: list_files. Not sure if it really helps to find out what is happening, but I posted where I was lost. Maybe someone has an idea. *** Bug 1525253 has been marked as a duplicate of this bug. *** I'm also seeing this with Fedora 27 on two different systems. It looks this is harmless output, as there's a change in the dracut repo to just ignore the lsinitrd "cat" errors, but there's no explanation in the changelog here: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/commit/?id=e190224345f3a8b2f9e85d84bc879dd96bf265da There was also a previous change to avoid outputting the "Broken pipe" error at least in some cases, this change: https://git.kernel.org/pub/scm/boot/dracut/dracut.git/commit/lsinitrd.sh?id=3ce142861d88c357864d3a3bef7ec453826d737d This is almost certainly dracut related and not the kernel or any of its packaging. Oh dear, fancy "pagure over dist-git" stuff is just broken. I am definitely not the default assignee for "dracut", re-assigning manually. And the whole mess is only because I created a fork of dracut in pagure to provide a small patch... This issue just happened to me but there wasn't any problem adding an entry to /boot/grub2/grub.cfg and I rebooted with the new kernel without an issue. I am seeing this same error, and /boot/grub2/grub.cfg was not being updated with new kernel installations (the fc27 kernel when I initially upgraded from fc25 was added, but nothing since). I installed grub2-pc as per comment 7 (thanks for the tip, Bojan!) and reinstalled the latest kernel-core, and although the "cat: write error: Broken pipe" still shows, grub.cfg is now being updated with the new kernel. Looking through "dnf history", it seems grub2-pc got removed when I did a "dnf autoremove" as part of my post-upgrade cleanup. I think this needs to be set as an explicit dependency of the kernel-core package so it's not removed. I will log a separate bug for that. Bug 1535458 logged. dracut-046-92.git20180118.fc28 |