Bug 1919538 - systemd-ask-password causes systemd to use very high CPU usage for a few minutes
Summary: systemd-ask-password causes systemd to use very high CPU usage for a few minutes
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-23 14:30 UTC by Barry Scott
Modified: 2022-12-13 15:17 UTC (History)
14 users (show)

Fixed In Version: systemd-250~rc3-1.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 15:17:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Barry Scott 2021-01-23 14:30:10 UTC
Description of problem:

systemd-ask-password causes systemd to use very high CPU usage for a few minutes.

Version-Release number of selected component (if applicable):

systemd-246.7-2.fc33.x86_64

How reproducible:

Steps to Reproduce:
1. boot fedora 33
2. login to KDE
3. start a terminal and run top
4. start a terminal and run:
  systemctl >before
  systemd-ask-password 'testing: ' </dev/null >p

I am seeing this behaviour on two systems. A dell laptop and a VMware VM.

I can reproduce reliably.

Actual results:

top shows 3 processes using high CPU for 90 seconds.

systemd - 98.7%
systemd-logind - 98.7%
dbus-broker - 76.7%

The journal contains a lot of logs related to this problem.

Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
Jan 16 15:18:19 vmf33.chelsea.private systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.
etc...

# journalctl -b  | grep Condition | wc -l
37555

The time between the first log and the last log is 90 seconds.


Expected results:

systemd-ask-password does not lock the machine with 90 seconds of very high PCU usage.

1. systemd-ask-password 'testing: ' </dev/null >p
2. messgae sent to all terminals:
Broadcast message from root.private (Sat 2021-01-16 15:28:02 GMT):

Password entry required for 'testing:' (PID 1862).
Please enter password with the systemd-tty-ask-password-agent tool.

Additional info:

Looking at the services before and after running systemd-ask-password once I see this diff:

# diff -u before after | grep '^[-+]'
--- before      2021-01-16 15:35:51.850438282 +0000
+++ after       2021-01-16 15:36:08.875736785 +0000
-  systemd-ask-password-plymouth.path                                                             loaded active waiting   Forward Password Requests to Plymouth Directory Watch                    
-  systemd-ask-password-wall.path                                                                 loaded active waiting   Forward Password Requests to Wall Directory Watch                        
+  systemd-ask-password-wall.path                                                                 loaded active running   Forward Password Requests to Wall Directory Watch                        
-  fprintd.service                                                                                loaded active running   Fingerprint Authentication Daemon                                        
+  systemd-ask-password-wall.service                                                              loaded active running   Forward Password Requests to Wall                                        
-196 loaded units listed. Pass --all to see loaded but inactive units, too.
+195 loaded units listed. Pass --all to see loaded but inactive units, too.

Comment 1 antofthy 2021-04-29 23:40:58 UTC
I have also seen this... Though the command was different...

systemd-ask-password --no-tty "test of no-tty passwd:"


Logs filled with entries...
Apr 30 09:25:06 lurker systemd[1]: Condition check resulted in Forward Password Requests to Plymouth being skipped.

Comment 2 Zbigniew Jędrzejewski-Szmek 2021-05-15 20:09:37 UTC
https://github.com/systemd/systemd/issues/17433

Comment 3 Ben Cotton 2021-11-04 14:01:46 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2021-11-04 14:30:57 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Ben Cotton 2021-11-04 15:28:38 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '33'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 33 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Zbigniew Jędrzejewski-Szmek 2021-11-05 08:09:08 UTC
A fix was finally merged upstream two days ago: https://github.com/systemd/systemd/pull/21030.

Comment 7 Barry Scott 2021-11-12 11:22:08 UTC
This bug is not fixed on F35.

I can reproduce at will.

Comment 8 Zbigniew Jędrzejewski-Szmek 2021-11-12 12:42:22 UTC
Please see the my previous message.

Comment 9 Zbigniew Jędrzejewski-Szmek 2022-01-11 19:27:49 UTC
https://github.com/systemd/systemd/pull/21030 was reverted.
https://github.com/systemd/systemd/pull/21808 was the next attempt.
I'll include the latest patch in v249-stable, let's hope that this doesn't break anything.

Comment 10 Fedora Update System 2022-01-11 21:42:38 UTC
FEDORA-2022-f38f479b8f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f38f479b8f

Comment 11 Fedora Update System 2022-01-12 01:49:22 UTC
FEDORA-2022-f38f479b8f has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2022-f38f479b8f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-f38f479b8f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2022-01-12 22:17:26 UTC
FEDORA-2022-f38f479b8f has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-f38f479b8f

Comment 13 Till Hofmann 2022-01-19 17:08:27 UTC
FEDORA-2022-f38f479b8f did not fix this issue, I can still reproduce the issue with

    systemd-ask-password --no-tty "test of no-tty passed:"

$ rpm -qi systemd
Name        : systemd
Version     : 249.9
Release     : 1.fc35
Architecture: armv7hl
Install Date: Wed 19 Jan 2022 06:50:34 CET
Group       : Unspecified
Size        : 11539280
License     : LGPLv2+ and MIT and GPLv2+
Signature   : RSA/SHA256, Wed 12 Jan 2022 23:17:31 CET, Key ID db4639719867c58f
Source RPM  : systemd-249.9-1.fc35.src.rpm
Build Date  : Wed 12 Jan 2022 22:49:26 CET
Build Host  : buildvm-a32-23.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://www.freedesktop.org/wiki/Software/systemd
Bug URL     : https://bugz.fedoraproject.org/systemd
Summary     : System and Service Manager

Comment 14 Ben Cotton 2022-11-29 16:51:25 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 15 Ben Cotton 2022-12-13 15:17:11 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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