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 sporadically fails to start polkitd #2019

Closed
hp4 opened this issue Nov 24, 2015 · 10 comments
Closed

systemd sporadically fails to start polkitd #2019

hp4 opened this issue Nov 24, 2015 · 10 comments
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer pid1

Comments

@hp4
Copy link

hp4 commented Nov 24, 2015

Currently on my system polkit-service can not be started (see journal entries below). This behavior occurs sporadically after reboot as described in several discussion forums and may disappear or reappear after reboot.

The polkit developer asked me to reroute this to systemd because polkitd correctly finishes its initialization and reaches its main loop. (https://bugs.freedesktop.org/show_bug.cgi?id=93066)

My system:
Linux 4.1.13-1-ARCH
polkit 0.113-4
systemd 227-1

Why does systemd decide on timeout? What is missing if polkitd is running correctly?


Nov 24 15:31:15 mars dbus[214]: [system] Successfully activated service 'org.freedesktop.PolicyKit1'
Nov 24 15:31:15 mars polkitd[3917]: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Nov 24 15:31:15 mars polkitd[3917]: 15:31:15.920: Acquired the name org.freedesktop.PolicyKit1 on the system bus
Nov 24 15:31:16 mars polkitd[3917]: Registered Authentication Agent for unix-process:3910:22925153 (system bus name :1.58 [/usr/bin/pkttyagent --notify-fd 4 --fallback], object path /org/freed
Nov 24 15:31:16 mars polkitd[3917]: 15:31:16.023: Registered Authentication Agent for unix-process:3910:22925153 (system bus name :1.58 [/usr/bin/pkttyagent --notify-fd 4 --fallback], object p
Nov 24 15:32:44 mars systemd[1]: polkit.service: Start operation timed out. Terminating.
Nov 24 15:32:44 mars systemd[1]: Failed to start Authorization Manager.
-- Subject: Unit polkit.service has failed
-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- Unit polkit.service has failed.

-- The result is failed.
Nov 24 15:32:44 mars systemd[1]: polkit.service: Unit entered failed state.
Nov 24 15:32:44 mars systemd[1]: polkit.service: Failed with result 'timeout'.

@heftig
Copy link
Contributor

heftig commented Nov 24, 2015

This suggests that systemd is not seeing the D-Bus name (org.freedesktop.PolicyKit1) appear, or is not associating it correctly.

@hp4
Copy link
Author

hp4 commented Nov 24, 2015

attached please find the results of dbus monitoring, maybe it's possible to find a hint for the reason of the timeout?

systemd-dbus.txt

@hp4
Copy link
Author

hp4 commented Nov 27, 2015

there seems to be a long-standing problem with systemd somehow delaying ssh-logins.
( e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=770135 and many others).

An indication might also be:
pam_systemd(sshd:session): Failed to create session: Connection timed out

I've found a lot of discussions on the net, but no solution. This bug seems to appear and disappear after reboots in an unpredictable manner.

@martinpitt
Copy link
Contributor

This sounds like another instance of issue #1505. Can you please retry with 228?

@martinpitt martinpitt added the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label Nov 27, 2015
@poettering
Copy link
Member

Yes, please try with 228 before we look into this further.

@hp4
Copy link
Author

hp4 commented Nov 27, 2015

Having read a lot of these "ssh-login-delayed" issues beginning with systemd-219 or even earlier it seems to me that there will be a high probability that this problem will disappear after the update. But only because this problem is known to disappear after restarts of systemd or dbus or systemd-logind or reboot or ... and not because the problem has been fixed (at least if you can't point to special source correction which definitely explains this behavior).

I've just seen that systemd-228 is now available for my packet-manager. Are you really sure that I should update to 228 before having used all trace/debug options? In view of the description above you won't be able to tell whether the problem has really been fixed.

@poettering
Copy link
Member

Well, we generally try to focus on fixing bugs that occur in the most recent systemd versions. Hence, yes, please try to reproduce this with 228, and if it happens there too, let's investigate this further.

@hp4
Copy link
Author

hp4 commented Nov 27, 2015

ok, I've done the system update (all together 34 packages, since I often got into troubles when updating only selected ones, packages in the ARCH-Linux sometimes seem to not describe all their dependencies).

What might be interesting for you is that at least glib2, dbus, libdbus, systemd and libsystemd were updated.

Now everything works fine, I can login via ssh instantaneously without delay. But that was to be expected. So let's see what happens in the future.

@heftig
Copy link
Contributor

heftig commented Nov 27, 2015

ok, I've done the system update (all together 34 packages, since I often got into troubles when updating only selected ones, packages in the ARCH-Linux sometimes seem to not describe all their dependencies).

They don't. More specifically, dependencies are usually not versioned. Upgrading only part of your Arch Linux system is explicitly _unsupported_. It's all or nothing.

@poettering
Copy link
Member

OK, closing then. Feel free to reopen if the problem resurfaces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer pid1
Development

No branches or pull requests

4 participants