systemd-logind can get hung in cg_enumerate_tasks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Fix Released
|
High
|
Stéphane Graber |
Bug Description
While looking into some leftover processes after session end, I discovered that logind can get into a hung state. Here's roughly what I did (sorry that I don't have exact steps)
1. Log in to unity, log out
2. ssh in
3. loginctl
4. loginctl session-status <your closing session>
5. log in, log out
6. loginctl session-status <your new closing session>
7. log in
8. loginctl (systemd-logind is hung at this point)
bt of loginctl while it's hung showing that it's going to timeout waiting for a reply from logind over dbus
(gdb) bt
#0 0x00007ffff6e67fa0 in __poll_nocancel () at ../sysdeps/
#1 0x00007ffff757c4b8 in socket_do_iteration (transport=
at ../../dbus/
#2 0x00007ffff757b3ff in _dbus_transport
timeout_
#3 0x00007ffff75659dc in _dbus_connectio
pending=
at ../../dbus/
#4 0x00007ffff7566389 in _dbus_connectio
at ../../dbus/
#5 0x00007ffff757572a in dbus_pending_
#6 0x00007ffff756694d in dbus_connection
message=
error=
#7 0x000000000040ebf4 in bus_method_
destination
path=
interface=
method=
return_
at ../src/
#8 0x0000000000404426 in list_sessions (bus=0x618ad0, args=<optimised out>, n=<optimised out>)
at ../src/
#9 0x0000000000403b09 in loginctl_main (error=
bus=0x618ad0) at ../src/
#10 main (argc=<optimised out>, argv=0x7fffffff
and here's the bt of systemd-logind
(gdb) bt full
#0 0x00007f75545d6fa0 in __poll_nocancel () at ../sysdeps/
No locals.
#1 0x00007f7554ada4b8 in socket_do_iteration (transport=
poll_fd = {
fd = 1041,
events = 1,
revents = 0
}
poll_res = <optimised out>
#2 0x00007f7554ad93ff in _dbus_transport
No locals.
#3 0x00007f7554ac39dc in _dbus_connectio
No locals.
#4 0x00007f7554ac3b84 in _dbus_connectio
No locals.
#5 0x00007f7554ac4331 in _dbus_connectio
tv_sec = 0
tv_usec = 140735977390056
status = <optimised out>
connection = 0x2c87470
timeout = <optimised out>
#6 0x00007f7554ad372a in dbus_pending_
#7 0x00007f7554ac494d in dbus_connection
reply = <optimised out>
pending = 0x2c63930
#8 0x00007f7555125a85 in cgmanager_ping_sync () from /lib/x86_
No symbol table info available.
#9 0x0000000000422285 in cgm_dbus_connect () at ../src/
dbus_error = {
name = 0x0,
message = 0x0,
dummy1 = 1,
dummy2 = 0,
dummy3 = 0,
dummy4 = 0,
dummy5 = 0,
padding1 = 0x285
}
connection = <optimised out>
__func__ = "cgm_dbus_connect"
#10 0x00000000004205fc in cg_enumerate_tasks (controller=
fs = 0x0
f = <optimised out>
r = <optimised out>
value = 0x0
template = 0x0
fd = <optimised out>
#11 0x00000000004207da in cg_is_empty (controller=
f = 0x0
pid = 0
self_pid = <optimised out>
found = false
r = <optimised out>
#12 0x0000000000420932 in cg_is_empty_
d = 0x0
fn = 0x0
r = <optimised out>
children = 0x7f7554ac3de5 <dbus_connectio
p1 = <optimised out>
#13 0x000000000040fbb9 in session_check_gc (s=s@entry=
r = <optimised out>
#14 0x00000000004085e6 in manager_gc (m=m@entry=
seat = <optimised out>
session = 0x2134f10
user = <optimised out>
i = 0xffffffffffffffff
#15 0x00000000004093c5 in manager_run (m=m@entry=
event = {
events = 4294967295,
data = {
ptr = 0xffffffff,
fd = -1,
u32 = 4294967295,
u64 = 4294967295
}
}
n = <optimised out>
msec = -1
__func__ = "manager_run"
#16 0x00000000004061cc in main (argc=<optimised out>, argv=<optimised out>) at ../src/
m = 0x2067010
r = 0
__func__ = "main"
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: systemd-services 204-5ubuntu15
ProcVersionSign
Uname: Linux 3.13.0-22-generic x86_64
ApportVersion: 2.14-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Thu Apr 3 12:04:11 2014
InstallationDate: Installed on 2012-10-07 (542 days ago)
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20121007)
SourcePackage: systemd
UpgradeStatus: Upgraded to trusty on 2013-05-07 (331 days ago)
Related branches
Changed in systemd (Ubuntu): | |
assignee: | nobody → Stéphane Graber (stgraber) |
Looks like it's actually stuck in cgmanager_ping_sync during the connection, so apparently the cgmanager daemon is somehow stuck...