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

QSB-069 update: "cat: write error: Broken pipe" #6691

Closed
andrewdavidwong opened this issue Jun 11, 2021 · 11 comments · Fixed by QubesOS/qubes-core-admin-linux#76
Closed

QSB-069 update: "cat: write error: Broken pipe" #6691

andrewdavidwong opened this issue Jun 11, 2021 · 11 comments · Fixed by QubesOS/qubes-core-admin-linux#76
Labels
C: updates diagnosed Technical diagnosis has been performed (see issue comments). P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. r4.0-dom0-stable r4.1-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@andrewdavidwong
Copy link
Member

Qubes OS version

R4.0

Are you using any testing repositories? If so, please list them and where they are enabled (i.e., dom0, TemplateVM, or StandaloneVM).

security-testing

Are you providing feedback about a specific package or packages in testing? (If so, please list the package(s) here and provide feedback in updates-status, linking to this issue.)

Not sure which package it is, but it's from the update batch for QSB-069 (see below).

Affected component(s) or functionality

Updates

Brief summary

Updating for QSB-069 results in cat: write error: Broken pipe on the first line of the scriptlet output.

How Reproducible

Unknown (I only had to do this update once), but probably 100%.

To Reproduce

Update for QSB-069, receiving this output (note scriptlet output line 1):

[...]
Transaction performed with:
     Installed     dnf-1.1.10-6.fc25.noarch   @anaconda/rawhide
     Installed     rpm-4.14.2.1-5.fc25.x86_64 @qubes-dom0-cached
Packages Altered:
     Upgraded microcode_ctl-2:2.1-32.qubes1.fc25.x86_64 @qubes-dom0-cached
     Upgrade                3:2.1-33.qubes1.fc25.x86_64 @qubes-dom0-cached
     Upgraded python3-xen-2001:4.8.5-32.fc25.x86_64     @qubes-dom0-cached
     Upgrade              2001:4.8.5-34.fc25.x86_64     @qubes-dom0-cached
     Upgraded xen-2001:4.8.5-32.fc25.x86_64             @qubes-dom0-cached
     Upgrade      2001:4.8.5-34.fc25.x86_64             @qubes-dom0-cached
     Upgraded xen-hvm-2001:4.8.5-32.fc25.x86_64         @qubes-dom0-cached
     Upgrade          2001:4.8.5-34.fc25.x86_64         @qubes-dom0-cached
     Upgraded xen-hypervisor-2001:4.8.5-32.fc25.x86_64  @qubes-dom0-cached
     Upgrade                 2001:4.8.5-34.fc25.x86_64  @qubes-dom0-cached
     Upgraded xen-libs-2001:4.8.5-32.fc25.x86_64        @qubes-dom0-cached
     Upgrade           2001:4.8.5-34.fc25.x86_64        @qubes-dom0-cached
     Upgraded xen-licenses-2001:4.8.5-32.fc25.x86_64    @qubes-dom0-cached
     Upgrade               2001:4.8.5-34.fc25.x86_64    @qubes-dom0-cached
     Upgraded xen-runtime-2001:4.8.5-32.fc25.x86_64     @qubes-dom0-cached
     Upgrade              2001:4.8.5-34.fc25.x86_64     @qubes-dom0-cached
Scriptlet output:
    1 cat: write error: Broken pipe
    2 Generating grub configuration file ...
    3 Found theme: /boot/grub2/themes/system/theme.txt
    4 Found linux image: /boot/vmlinuz-5.4.107-1.fc25.qubes.x86_64
    5 Found initrd image: /boot/initramfs-5.4.107-1.fc25.qubes.x86_64.img
    6 Found linux image: /boot/vmlinuz-5.4.98-1.fc25.qubes.x86_64
    7 Found initrd image: /boot/initramfs-5.4.98-1.fc25.qubes.x86_64.img
    8 Found linux image: /boot/vmlinuz-5.4.88-1.qubes.x86_64
    9 Found initrd image: /boot/initramfs-5.4.88-1.qubes.x86_64.img
   10 Found linux image: /boot/vmlinuz-5.4.107-1.fc25.qubes.x86_64
   11 Found initrd image: /boot/initramfs-5.4.107-1.fc25.qubes.x86_64.img
   12 Found linux image: /boot/vmlinuz-5.4.98-1.fc25.qubes.x86_64
   13 Found initrd image: /boot/initramfs-5.4.98-1.fc25.qubes.x86_64.img
   14 Found linux image: /boot/vmlinuz-5.4.88-1.qubes.x86_64
   15 Found initrd image: /boot/initramfs-5.4.88-1.qubes.x86_64.img
   16 Found linux image: /boot/vmlinuz-5.4.107-1.fc25.qubes.x86_64
   17 Found initrd image: /boot/initramfs-5.4.107-1.fc25.qubes.x86_64.img
   18 Found linux image: /boot/vmlinuz-5.4.98-1.fc25.qubes.x86_64
   19 Found initrd image: /boot/initramfs-5.4.98-1.fc25.qubes.x86_64.img
   20 Found linux image: /boot/vmlinuz-5.4.88-1.qubes.x86_64
   21 Found initrd image: /boot/initramfs-5.4.88-1.qubes.x86_64.img
   22 done
[...]

Expected behavior

No errors.

Actual behavior

cat: write error: Broken pipe

Additional context

@DemiMarie wrote in a qubes-devel thread on this:

This is normal, but it is still a bad user experience. The culprit
is probably a shell script being invoked via systemd, but without
IgnoreSIGPIPE=false set (default is true). Please file an issue.

Relevant documentation you've consulted

N/A

Related, non-duplicate issues

None found.

@andrewdavidwong andrewdavidwong added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. C: updates labels Jun 11, 2021
@andrewdavidwong andrewdavidwong added this to the Release 4.0 updates milestone Jun 11, 2021
@marmarek
Copy link
Member

This is normal, but it is still a bad user experience. The culprit
is probably a shell script being invoked via systemd, but without
IgnoreSIGPIPE=false set (default is true). Please file an issue.

The script is called directly by rpm, without systemd involvement. The cat that is failing is (intentionally) interrupted by internal lsinitrd call near the end of dracut script. So, yes, the message is totally harmless.

I do see signal(SIGPIPE, SIG_DFL) call in the RPM, and I can confirm (via strace) it really happens, so something else is responsible.

Since the error is harmless, I'm not going to spend more time on debugging why it happens.
As a workaround I can reduce dracut verbosity (set sysloglvl=4) which should avoid lsinitrd call at all. It will also make dracut call a bit faster.

@andrewdavidwong andrewdavidwong added P: minor Priority: minor. The lowest priority, below "default." diagnosed Technical diagnosis has been performed (see issue comments). pr submitted A pull request has been submitted for this issue. and removed P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. needs diagnosis Requires technical diagnosis from developer. Replace with "diagnosed" or remove if otherwise closed. labels Jun 16, 2021
@marmarek
Copy link
Member

Anyway, since the issue is minor, I'm going to upload microcode_ctl package to the stable repo, to have security fix shipped to all users.

@andrewdavidwong
Copy link
Member Author

Anyway, since the issue is minor, I'm going to upload microcode_ctl package to the stable repo, to have security fix shipped to all users.

Would it be possible to fix the cat: write error: Broken pipe before pushing that to stable, or would it delay the security update by too much? A lot of users will still be confused and worried by the cat: write error: Broken pipe. They won't know that it's harmless, and the vast majority of them won't know how to find this issue in order to learn that it's harmless. Of course, getting the security fix out to stable is more important, if we have to choose just one. I just wanted to point out that this will result in a lot of users worrying over nothing and repeatedly asking about it.

@marmarek
Copy link
Member

The update changing verbosity is a separate update and so would need to stay in current-testing for about a week - that's the minimal delay and I'd rather avoid it in context of security fix.

@andrewdavidwong
Copy link
Member Author

The update changing verbosity is a separate update and so would need to stay in current-testing for about a week - that's the minimal delay and I'd rather avoid it in context of security fix.

No problem, then. Thanks for considering it!

@andrewdavidwong
Copy link
Member Author

(Preemptively pinning this issue to make it easier for users to find.)

@andrewdavidwong andrewdavidwong pinned this issue Jun 16, 2021
@DemiMarie
Copy link

Anything that makes dracut faster is certainly a good thing!

@qubesos-bot
Copy link

Automated announcement from builder-github

The package qubes-core-dom0-linux-4.1.12-1.fc32 has been pushed to the r4.1 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-admin-linux (including package qubes-core-dom0-linux-4.1.13-1.fc32) has been pushed to the r4.1 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

marmarek added a commit to marmarek/qubes-core-admin-linux that referenced this issue Dec 3, 2021
Fixes QubesOS/qubes-issues#6691

(cherry picked from commit 451ec07)
@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-admin-linux (including package qubes-core-dom0-linux-4.0.32-1.fc25) has been pushed to the r4.0 testing repository for dom0.
To test this update, please install it with the following command:

sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing

Changes included in this update

@qubesos-bot
Copy link

Automated announcement from builder-github

The component core-admin-linux (including package qubes-core-dom0-linux-4.0.33-1.fc25) has been pushed to the r4.0 stable repository for dom0.
To install this update, please use the standard update command:

sudo qubes-dom0-update

Or update dom0 via Qubes Manager.

Changes included in this update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: updates diagnosed Technical diagnosis has been performed (see issue comments). P: minor Priority: minor. The lowest priority, below "default." pr submitted A pull request has been submitted for this issue. r4.0-dom0-stable r4.1-dom0-stable T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants