RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1605220 - plymouth ask-for-password passes empty STDIN to command and spins in endless loop
Summary: plymouth ask-for-password passes empty STDIN to command and spins in endless ...
Keywords:
Status: CLOSED DUPLICATE of bug 1600990
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: plymouth
Version: 7.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Ray Strode [halfline]
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-20 13:12 UTC by Ondrej Kozina
Modified: 2018-07-20 16:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-20 16:41:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
srpm (1.22 MB, application/x-rpm)
2018-07-20 14:59 UTC, Ray Strode [halfline]
no flags Details

Description Ondrej Kozina 2018-07-20 13:12:21 UTC
Description of problem:

There's a dracut module for reencryption of rootfs device from initrd phase. This module runs following command (one particular example that's able to hit the issue):

/bin/plymouth ask-for-password --prompt "some message" --command="/sbin/cryptsetup-reencrypt /dev/sda2 -T 1 --use-fsync --progress-frequency 5 -B 32"

Sometimes (it's not 100% reproducible) this command ends in endless loop due to following:

a) user inputs passphrase in plymouth prompt (non empty string only input)
b) cryptsetup-reencrypt process starts and get STDIN filedescriptor set to EOF (iow read() syscall on stdin returns 0 immediately)
c) cryptsetup-reencrypt fails with error (Nothing to read)
d) it's immediately restarted and here we're moving to step b) again.

b) to d) repeats endlessly.

Note that it's not 'plymouth' command that is repeated. The plymouth command runs cryptsetup-reencrypt in endless loop with broken stdin.

Version-Release number of selected component (if applicable):
kernel-3.10.0-919.el7.x86_64
plymouth-0.8.9-0.31.20140113.el7.x86_64
dracut-033-547.el7.x86_64

cryptsetup-2.0.3-1.el7
cryptsetup-1.7.4-4.el7 (it doesn't matter which cryptsetup version. Tested with 7.5 version and with rebased 2.0.3 for RHEL7.6)

How reproducible:
Not always, testing on VM in qemu.

Actual results:
Occasional endless loop.

Expected results:
Passphrase is passed correctly to STDIN of --command.

Additional info:
It seems to be easier to reproduce when I route serial to host via "console=ttyS0,115200 console=tty" kernel cmdline parameters.

Comment 2 Ray Strode [halfline] 2018-07-20 14:29:39 UTC
maybe a dupe of bug 1600990

Can you give this patch a try?

https://cgit.freedesktop.org/plymouth/commit/?id=b97c30a019e412d30337515e615433bf6f886972

If you want me to throw it in a scratch build, I'll be happy to, just let me know.

Comment 3 Ondrej Kozina 2018-07-20 14:35:51 UTC
Yes please. Scratch build would save me some precious time. Thanks!

Comment 4 Ray Strode [halfline] 2018-07-20 14:41:48 UTC
okay should be here assuming it doesn't fail for some reason:

Task info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=17269269

Comment 5 Ray Strode [halfline] 2018-07-20 14:42:40 UTC
(make sure to rebuild initramfs with "dracut -f" after installing it)

Comment 6 Ondrej Kozina 2018-07-20 14:53:32 UTC
Hmm. Not sure why but all links on that site gives me 403: Forbidden. Could you attach srpm to bugzilla? I'll try to rebuild it myself locally.

...and I thought Friday 13th was last week

Comment 7 Ray Strode [halfline] 2018-07-20 14:59:50 UTC
Created attachment 1465252 [details]
srpm

weird some buildroot issue i guess

Comment 8 Ray Strode [halfline] 2018-07-20 15:00:07 UTC
s/buildroot/builder/

Comment 9 Ray Strode [halfline] 2018-07-20 15:01:49 UTC
oh it's here:

http://download.eng.bos.redhat.com/brew_scratch/scratch/rstrode/task_17269269/

brew is just putting the wrong url on the page

Comment 10 Ray Strode [halfline] 2018-07-20 15:03:34 UTC
brew issue: https://projects.engineering.redhat.com/browse/BST-306

Comment 11 Ondrej Kozina 2018-07-20 15:21:51 UTC
Yes, that commit seems to fix the issue! Thank you. I'll be experimenting with it for some time to double check. Just in case.

Comment 12 Ray Strode [halfline] 2018-07-20 16:41:34 UTC

*** This bug has been marked as a duplicate of bug 1600990 ***


Note You need to log in before you can comment on or make changes to this bug.