Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1267609 - service messagebus restart breaks various stuff
Summary: service messagebus restart breaks various stuff
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.1
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-30 14:04 UTC by Karel Srot
Modified: 2015-09-30 16:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-30 16:15:28 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Karel Srot 2015-09-30 14:04:40 UTC
Description of problem:

Accidentally I have encountered that after 
  service messagebus restart
things doesn't work as properly as before.

Most significant change is some timeout that happens during a login and delays each login or su operation. Beside that, this change also prevented me to log in to an openstack virtual system since the connection timed out after ~2 minutes and couldn't be re-established. Also, bug 1249627 could be related.

As both polkit and dbus didn't change in 7.2 I suppose this is due to systemd.

Very easy to reproduce:

[root@x86-64-v08 ~]# rpm -q kernel systemd dbus
kernel-3.10.0-319.el7.x86_64
systemd-219-16.el7.x86_64
dbus-1.6.12-13.el7.x86_64

[root@x86-64-v08 ~]# systemctl status > /tmp/pre

[root@x86-64-v08 ~]# time su - tester -c id
uid=1001(tester) gid=1001(tester) groups=1001(tester) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

real	0m0.230s
user	0m0.068s
sys	0m0.091s

[root@x86-64-v08 ~]# service messagebus restart
Redirecting to /bin/systemctl restart  messagebus.service
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.
[root@x86-64-v08 ~]# sleep 3
[root@x86-64-v08 ~]# systemctl status > /tmp/post

[root@x86-64-v08 ~]# time su - tester -c id
uid=1001(tester) gid=1001(tester) groups=1001(tester) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

real	0m25.172s
user	0m0.058s
sys	0m0.112s

[root@x86-64-v08 ~]# tail /var/log/messages
Sep 30 15:59:38 x86-64-v08 systemd: Unit tuned.service entered failed state.
Sep 30 15:59:38 x86-64-v08 systemd: tuned.service failed.
Sep 30 15:59:38 x86-64-v08 systemd: Started D-Bus System Message Bus.
Sep 30 15:59:39 x86-64-v08 systemd: Starting D-Bus System Message Bus...
Sep 30 15:59:53 x86-64-v08 su: (to tester) root on pts/1
Sep 30 15:59:53 x86-64-v08 dbus[2217]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Sep 30 15:59:53 x86-64-v08 systemd: Started Login Service.
Sep 30 15:59:53 x86-64-v08 dbus-daemon: dbus[2217]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Sep 30 16:00:18 x86-64-v08 dbus[2217]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Sep 30 16:00:18 x86-64-v08 dbus-daemon: dbus[2217]: [system] Failed to activate service 'org.freedesktop.login1': timed out

[root@x86-64-v08 ~]# diff /tmp/pre /tmp/post
2c2
<     State: running
---
>     State: degraded
4,5c4,5
<    Failed: 0 units
<     Since: Wed 2015-09-30 15:56:25 CEST; 2min 48s ago
---
>    Failed: 2 units
>     Since: Wed 2015-09-30 15:56:25 CEST; 3min 24s ago
13c13
<            │   │ └─2175 systemctl status
---
>            │   │ └─2220 systemctl status
17a18,19
>              ├─dbus.service
>              │ └─2217 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
31,32d32
<              ├─tuned.service
<              │ └─878 /usr/bin/python -Es /usr/sbin/tuned -l -P
41,44d40
<              ├─polkit.service
<              │ └─617 /usr/lib/polkit-1/polkitd --no-debug
<              ├─wpa_supplicant.service
<              │ └─616 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant/wpa_supplicant.conf -u -f /var/log/wpa_supplicant.log -P /var/run/wpa_supplicant.pid
51,52d46
<              ├─dbus.service
<              │ └─579 /bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
54d47
<              │ ├─577 /usr/sbin/NetworkManager --no-daemon

Comment 2 Lukáš Nykrýn 2015-09-30 16:15:28 UTC
You can't restart dbus, it will kill the machine. Only change between 7.1 and 7.2 is that logind segfaulted on 7.1 so it looked like it is working.


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