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

Systemd tries to start some services repeatedly after failing condition check #15401

Closed
hexchain opened this issue Apr 10, 2020 · 7 comments
Closed
Labels
pid1 regression ⚠️ A bug in something that used to work correctly and broke through some recent commit

Comments

@hexchain
Copy link
Contributor

systemd version the issue has been seen with

v245.4

Used distribution

Arch Linux

Expected behaviour you didn't see
These services are executed only once, and if they fail condition check, they might only be restarted once the conditions are changed.

Unexpected behaviour you saw
Some services that are probably supposed to execute only once are constantly being started, despite failing condition check every time.

Such services include:

systemd-machine-id-commit.service
systemd-firstboot.service
systemd-boot-system-token.service
systemd-pstore.service

Relevant logs (generated with journalctl -b _PID=1 _COMM=systemd | grep 'Condition check resulted in' -A2 -B2):

https://paste.xinu.at/Ltc

Steps to reproduce the problem
It happens all the time.

@hexchain hexchain changed the title Systemd tries to start some services constantly Systemd tries to start some services repeatedly Apr 13, 2020
@jdebp
Copy link

jdebp commented Apr 14, 2020

@mbiebl
Copy link
Contributor

mbiebl commented Apr 14, 2020

looks like another duplicate / instance of #15091 , i.e. a result of 097537f.

@hexchain
Copy link
Contributor Author

The conclusion there seems to be adding RemainAfterExit=yes to affected services, but I'm not sure how that applies to services that have failed condition check.

(Didn't test, this is just a guess)

@anitazha
Copy link
Member

The services you listed do have RemainAfterExit=yes so it could be another bug or at least another corner case to 097537f

@anitazha anitazha added bug 🐛 Programming errors, that need preferential fixing pid1 regression ⚠️ A bug in something that used to work correctly and broke through some recent commit and removed bug 🐛 Programming errors, that need preferential fixing labels Apr 14, 2020
@hexchain
Copy link
Contributor Author

Those services failed condition test so they were not activated/executed at all. I guess RemainAfterExit is irrelevant here?

@anitazha anitazha changed the title Systemd tries to start some services repeatedly Systemd tries to start some services repeatedly after failing condition check Apr 14, 2020
@hexchain
Copy link
Contributor Author

Here are some systemd debug logs when pressing XF86BrightnessUp/Down key in Plasma (which then calls org.kde.powerdevil.backlighthelper over system bus):
https://paste.xinu.at/TBqUY/
https://paste.xinu.at/m4Mi/

It seems to me that systemd is trying to walk the whole dependency tree and start everything that is not already active, despite those dependencies themselves are activated. Is this expected?

@keszybz
Copy link
Member

keszybz commented Jan 4, 2022

This seems to be the same as #15188. Unfortunately all the pastebin logs are not available anymore, so it's even hard to say what the original issue was. In the fututure, please paste the logs directly in the issue (or attach, if they are very long).

@keszybz keszybz closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pid1 regression ⚠️ A bug in something that used to work correctly and broke through some recent commit
Development

No branches or pull requests

5 participants