Bugzilla – Bug 541253
polkitd seems to leak memory / use high CPU
Last modified: 2010-07-19 16:14:22 UTC
top: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2173 root 20 0 388m 383m 3064 R 40 12.6 21:17.80 polkitd 18836 bart 20 0 724m 269m 34m S 18 8.9 5:38.45 firefox It's constantly like this. Anything that tops firefox has serious problems.
Bad memory leak also: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 2173 root 20 0 3059m 2.1g 2132 R 7 71.3 182:43.02 polkitd
can you strace it or attach gdbn to see what it does please?
Created attachment 319496 [details] strace output When I kill polkitd, it immediately starts again, and starts looping and leaking memory. Here is strace output from just a few seconds of watching the process.
seems to repeatedly read the local data files? is the clock correct?
run: ls -l /var/lib/polkit-1/localauthority/10-vendor.d/ date
polkit1 -> kay
Created attachment 319533 [details] requested output $ sudo ls -l /var/lib/polkit-1/localauthority/10-vendor.d/ $ date
This appears to be an upgrade issue. Although I did a clean install of 11.2 m7, I kept my /home partition from 11.1. I've since removed the following from $HOME/: .gnome2 .gtkrc-1.2-gnome2 .gnome2_private .gvfs .dbus .gnome-system-monitor.bart .turnpike .dbus-keyrings .gtk-bookmarks .gnome .gtkrc Now this problem is no longer present. OpenSUSE needs to be fixed to be able to handle upgrades.
This problem returned after enabling desktop effects.
A possibly useful stack trace. #0 0xb7cc4f15 in ?? () from /usr/lib/libgio-2.0.so.0 #1 0xb7cc57ee in ?? () from /usr/lib/libgio-2.0.so.0 #2 0xb7cc498b in ?? () from /usr/lib/libgio-2.0.so.0 #3 0xb7c5e6a9 in g_content_type_guess () from /usr/lib/libgio-2.0.so.0 #4 0xb7cb82ab in ?? () from /usr/lib/libgio-2.0.so.0 #5 0xb7cb8f37 in ?? () from /usr/lib/libgio-2.0.so.0 #6 0xb7cb5f0e in ?? () from /usr/lib/libgio-2.0.so.0 #7 0xb7c73420 in g_file_enumerator_next_file () from /usr/lib/libgio-2.0.so.0 #8 0xb7fe9fae in polkit_backend_local_authorization_store_lookup () from /usr/lib/libpolkit-backend-1.so.0 #9 0xb7fe59b9 in ?? () from /usr/lib/libpolkit-backend-1.so.0 #10 0xb7fe201b in polkit_backend_interactive_authority_check_authorization_sync () from /usr/lib/libpolkit-backend-1.so.0 #11 0xb7fe4f01 in ?? () from /usr/lib/libpolkit-backend-1.so.0 #12 0xb7fe1953 in polkit_backend_authority_check_authorization () from /usr/lib/libpolkit-backend-1.so.0 #13 0xb7fe1b0c in ?? () from /usr/lib/libpolkit-backend-1.so.0 #14 0xb7d475b4 in ?? () from /usr/lib/libpolkit-gobject-1.so.0 #15 0xb7d11152 in ?? () from /usr/lib/libeggdbus-1.so.0 #16 0xb7b97a53 in dbus_connection_dispatch () from /lib/libdbus-1.so.3 #17 0xb7bd1c0d in ?? () from /usr/lib/libdbus-glib-1.so.2 #18 0xb7ef5442 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #19 0xb7ef8d18 in ?? () from /usr/lib/libglib-2.0.so.0 #20 0xb7ef916f in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #21 0x0804886a in ?? () #22 0xb7d71abe in __libc_start_main () from /lib/libc.so.6 #23 0x08048711 in ?? ()
what is this blocking?
Blocking shipment. A process that runs by default, and respawns itself when killed, and leaks memory to the tune of 3GB in a few hours, deserves the most severe bug setting, IMO. If Blocker means something else for OpenSUSE, feel free to change it to Critical.
We have documentation about this: http://en.opensuse.org/Bugs/Definitions
but it only happens to you so far and it does not happen for new users, I don't see this as ship stopper
(In reply to comment #15) > but it only happens to you so far Nope, happens to me as well.
What does: pmap $(pidof /usr/lib/polkit-1/polkitd) print in case it uses a lot of memory?
22272: polkitd START SIZE RSS PSS DIRTY SWAP PERM MAPPING 0000000000400000 4K 0K 0K 0K 0K r-xp /usr/lib/polkit-1/polkitd 0000000000600000 4K 4K 4K 4K 0K r--p /usr/lib/polkit-1/polkitd 0000000000601000 4K 0K 0K 0K 4K rw-p /usr/lib/polkit-1/polkitd 0000000000602000 118388K 117728K 117728K 117700K 660K rw-p [heap] 00007fce9d400000 76K 0K 0K 0K 0K r-xp /usr/lib64/gio/modules/libgioremote-volume-monitor.so;4acdbcd6 00007fce9d413000 2044K 0K 0K 0K 0K ---p /usr/lib64/gio/modules/libgioremote-volume-monitor.so;4acdbcd6 00007fce9d612000 4K 0K 0K 0K 4K r--p /usr/lib64/gio/modules/libgioremote-volume-monitor.so;4acdbcd6 00007fce9d613000 4K 0K 0K 0K 4K rw-p /usr/lib64/gio/modules/libgioremote-volume-monitor.so;4acdbcd6 00007fce9d821000 92K 0K 0K 0K 0K r-xp /usr/lib64/libgvfscommon.so.0.0.0 00007fce9d838000 2044K 0K 0K 0K 0K ---p /usr/lib64/libgvfscommon.so.0.0.0 00007fce9da37000 4K 0K 0K 0K 4K r--p /usr/lib64/libgvfscommon.so.0.0.0 00007fce9da38000 4K 0K 0K 0K 4K rw-p /usr/lib64/libgvfscommon.so.0.0.0 00007fce9e273000 8K 8K 0K 0K 0K r-xp /lib64/libdl-2.10.1.so 00007fce9e275000 2048K 0K 0K 0K 0K ---p /lib64/libdl-2.10.1.so 00007fce9e475000 4K 0K 0K 0K 4K r--p /lib64/libdl-2.10.1.so 00007fce9e476000 4K 0K 0K 0K 4K rw-p /lib64/libdl-2.10.1.so 00007fce9e477000 32K 4K 0K 0K 0K r-xp /lib64/librt-2.10.1.so 00007fce9e47f000 2044K 0K 0K 0K 0K ---p /lib64/librt-2.10.1.so 00007fce9e67e000 4K 0K 0K 0K 4K r--p /lib64/librt-2.10.1.so 00007fce9e67f000 4K 0K 0K 0K 4K rw-p /lib64/librt-2.10.1.so 00007fce9e680000 88K 40K 0K 0K 0K r-xp /lib64/libpthread-2.10.1.so 00007fce9e696000 2048K 0K 0K 0K 0K ---p /lib64/libpthread-2.10.1.so 00007fce9e896000 4K 0K 0K 0K 4K r--p /lib64/libpthread-2.10.1.so 00007fce9e897000 4K 0K 0K 0K 4K rw-p /lib64/libpthread-2.10.1.so 00007fce9e898000 16K 0K 0K 0K 4K rw-p [anon] 00007fce9e89c000 112K 0K 0K 0K 0K r-xp /lib64/libselinux.so.1 00007fce9e8b8000 2044K 0K 0K 0K 0K ---p /lib64/libselinux.so.1 00007fce9eab7000 4K 0K 0K 0K 4K r--p /lib64/libselinux.so.1 00007fce9eab8000 4K 0K 0K 0K 4K rw-p /lib64/libselinux.so.1 00007fce9eab9000 4K 0K 0K 0K 4K rw-p [anon] 00007fce9eaba000 76K 4K 0K 0K 0K r-xp /lib64/libresolv-2.10.1.so 00007fce9eacd000 2044K 0K 0K 0K 0K ---p /lib64/libresolv-2.10.1.so 00007fce9eccc000 4K 0K 0K 0K 4K r--p /lib64/libresolv-2.10.1.so 00007fce9eccd000 4K 0K 0K 0K 4K rw-p /lib64/libresolv-2.10.1.so 00007fce9ecce000 8K 0K 0K 0K 0K rw-p [anon] 00007fce9ecd0000 12K 4K 0K 0K 0K r-xp /usr/lib64/libgmodule-2.0.so.0.2106.0 00007fce9ecd3000 2044K 0K 0K 0K 0K ---p /usr/lib64/libgmodule-2.0.so.0.2106.0 00007fce9eed2000 4K 0K 0K 0K 4K r--p /usr/lib64/libgmodule-2.0.so.0.2106.0 00007fce9eed3000 4K 0K 0K 0K 4K rw-p /usr/lib64/libgmodule-2.0.so.0.2106.0 00007fce9eed4000 248K 196K 65K 0K 0K r-xp /lib64/libdbus-1.so.3.4.0 00007fce9ef12000 2048K 0K 0K 0K 0K ---p /lib64/libdbus-1.so.3.4.0 00007fce9f112000 4K 4K 4K 4K 0K r--p /lib64/libdbus-1.so.3.4.0 00007fce9f113000 4K 4K 4K 4K 0K rw-p /lib64/libdbus-1.so.3.4.0 00007fce9f114000 128K 16K 10K 0K 0K r-xp /usr/lib64/libdbus-glib-1.so.2.1.0 00007fce9f134000 2048K 0K 0K 0K 0K ---p /usr/lib64/libdbus-glib-1.so.2.1.0 00007fce9f334000 4K 4K 4K 4K 0K r--p /usr/lib64/libdbus-glib-1.so.2.1.0 00007fce9f335000 4K 4K 4K 4K 0K rw-p /usr/lib64/libdbus-glib-1.so.2.1.0 00007fce9f336000 180K 8K 0K 0K 0K r-xp /lib64/libpcre.so.0.0.1 00007fce9f363000 2044K 0K 0K 0K 0K ---p /lib64/libpcre.so.0.0.1 00007fce9f562000 4K 0K 0K 0K 4K r--p /lib64/libpcre.so.0.0.1 00007fce9f563000 4K 0K 0K 0K 4K rw-p /lib64/libpcre.so.0.0.1 00007fce9f564000 152K 0K 0K 0K 0K r-xp /lib64/libexpat.so.1.5.2 00007fce9f58a000 2048K 0K 0K 0K 0K ---p /lib64/libexpat.so.1.5.2 00007fce9f78a000 8K 8K 8K 8K 0K r--p /lib64/libexpat.so.1.5.2 00007fce9f78c000 4K 4K 4K 4K 0K rw-p /lib64/libexpat.so.1.5.2 00007fce9f78d000 684K 184K 28K 0K 0K r-xp /usr/lib64/libgio-2.0.so.0.2106.0 00007fce9f838000 2048K 0K 0K 0K 0K ---p /usr/lib64/libgio-2.0.so.0.2106.0 00007fce9fa38000 8K 4K 4K 4K 4K r--p /usr/lib64/libgio-2.0.so.0.2106.0 00007fce9fa3a000 4K 4K 4K 4K 0K rw-p /usr/lib64/libgio-2.0.so.0.2106.0 00007fce9fa3b000 4K 4K 4K 4K 0K rw-p [anon] 00007fce9fa3c000 276K 156K 156K 0K 0K r-xp /usr/lib64/libeggdbus-1.so.0.0.0 00007fce9fa81000 2048K 0K 0K 0K 0K ---p /usr/lib64/libeggdbus-1.so.0.0.0 00007fce9fc81000 8K 8K 8K 8K 0K r--p /usr/lib64/libeggdbus-1.so.0.0.0 00007fce9fc83000 4K 4K 4K 4K 0K rw-p /usr/lib64/libeggdbus-1.so.0.0.0 00007fce9fc84000 4K 4K 4K 4K 0K rw-p [anon] 00007fce9fc85000 124K 56K 27K 0K 0K r-xp /usr/lib64/libpolkit-gobject-1.so.0.0.0 00007fce9fca4000 2048K 0K 0K 0K 0K ---p /usr/lib64/libpolkit-gobject-1.so.0.0.0 00007fce9fea4000 4K 4K 4K 4K 0K r--p /usr/lib64/libpolkit-gobject-1.so.0.0.0 00007fce9fea5000 4K 4K 4K 4K 0K rw-p /usr/lib64/libpolkit-gobject-1.so.0.0.0 00007fce9fea6000 1348K 440K 19K 0K 0K r-xp /lib64/libc-2.10.1.so 00007fce9fff7000 2048K 0K 0K 0K 0K ---p /lib64/libc-2.10.1.so 00007fcea01f7000 16K 16K 16K 16K 0K r--p /lib64/libc-2.10.1.so 00007fcea01fb000 4K 4K 4K 4K 0K rw-p /lib64/libc-2.10.1.so 00007fcea01fc000 20K 16K 16K 16K 4K rw-p [anon] 00007fcea0201000 788K 348K 13K 0K 0K r-xp /usr/lib64/libglib-2.0.so.0.2106.0 00007fcea02c6000 2044K 0K 0K 0K 0K ---p /usr/lib64/libglib-2.0.so.0.2106.0 00007fcea04c5000 4K 4K 4K 4K 0K r--p /usr/lib64/libglib-2.0.so.0.2106.0 00007fcea04c6000 4K 4K 4K 4K 0K rw-p /usr/lib64/libglib-2.0.so.0.2106.0 00007fcea04c7000 4K 4K 4K 4K 0K rw-p [anon] 00007fcea04c8000 272K 216K 4K 0K 0K r-xp /usr/lib64/libgobject-2.0.so.0.2106.0 00007fcea050c000 2044K 0K 0K 0K 0K ---p /usr/lib64/libgobject-2.0.so.0.2106.0 00007fcea070b000 4K 4K 4K 4K 0K r--p /usr/lib64/libgobject-2.0.so.0.2106.0 00007fcea070c000 4K 4K 4K 4K 0K rw-p /usr/lib64/libgobject-2.0.so.0.2106.0 00007fcea070d000 4K 4K 4K 4K 0K rw-p [anon] 00007fcea070e000 184K 104K 104K 0K 0K r-xp /usr/lib64/libpolkit-backend-1.so.0.0.0 00007fcea073c000 2048K 0K 0K 0K 0K ---p /usr/lib64/libpolkit-backend-1.so.0.0.0 00007fcea093c000 8K 8K 8K 8K 0K r--p /usr/lib64/libpolkit-backend-1.so.0.0.0 00007fcea093e000 4K 4K 4K 4K 0K rw-p /usr/lib64/libpolkit-backend-1.so.0.0.0 00007fcea093f000 120K 48K 0K 0K 0K r-xp /lib64/ld-2.10.1.so 00007fcea0aad000 212K 4K 2K 0K 0K r--s /var/run/nscd/group 00007fcea0ae2000 212K 4K 1K 0K 0K r--s /var/run/nscd/passwd 00007fcea0b17000 32K 16K 16K 16K 16K rw-p [anon] 00007fcea0b37000 4K 0K 0K 0K 4K rw-p [anon] 00007fcea0b38000 28K 24K 1K 0K 0K r--s /usr/lib64/gconv/gconv-modules.cache 00007fcea0b3f000 108K 72K 49K 0K 0K r--s /usr/share/mime/mime.cache 00007fcea0b5a000 8K 8K 8K 8K 0K rw-p [anon] 00007fcea0b5c000 4K 4K 4K 4K 0K r--p /lib64/ld-2.10.1.so 00007fcea0b5d000 4K 4K 4K 4K 0K rw-p /lib64/ld-2.10.1.so 00007fff1c1d8000 84K 20K 20K 20K 0K rw-p [stack] 00007fff1c1ff000 4K 4K 0K 0K 0K r-xp [vdso] ffffffffff600000 4K 0K 0K 0K 0K r-xp [vsyscall] Total: 163224K 119860K 118399K 117892K 772K 118664K writable-private, 44000K readonly-private, 560K shared, and 118196K referenced
Created attachment 321945 [details] pmap output Bah, it got ugly line wrapped.
Created attachment 321947 [details] valgrind --log-file=polkit_valgrind.log --leak-check=full /usr/lib/polkit-1/polkitd Note that polkitd was running, so this one exited immediately. There are many leaks though.
I upgraded both, my notebook and my desktop. On my desktop (x86 version) polkitd is number 1 on top as soon as I log on. It comes to the point that my desktop icons won't load until I kill it (maybe it would work after a long time). I will check on my laptop because I didn't notice this issue right after upgrading.
My laptop doesn't seem to have the problem. Just out of curiosity, what are you all using (x86 or x64)?
I can not reproduce anything similar to the mentioned problem. There also seem to be no reports for other distributions shipping the same software. New version submitted to factory, which need to be re-checked if it still happens, although there are no changes/fixes to this problem. I'm closing this bug for now.
I'm having this problem too. I have some additional information which might be useful. I'm also on 11.2 When I killed one of the polkitd processes, this showed up in /var/log/messages: Mar 23 15:25:48 worklaptop rtkit-daemon[2588]: Warning: PolicyKit call failed: Message did not receive a reply (timeout by message bus) it *may* have to do with rtkit-daemon: Also, I noticed via strace that polkitd is logging a *LOT* of information, but it's going nowhere because stdin/stdout/stderr are tied to /dev/null (as they should be) but polkit ***really*** needs to be able to log to syslog *or* the logs being sent to stderr need to be captured and sent there. Logs sent nowhere don't do anybody any good. Partial strace: open("/var/lib/polkit-1/localauthority/20-org.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "\n** (process:6681): WARNING **: Error enumerating files in file:///var/lib/polkit-1/localauthority/20-org.d: No such file or directory\n", 135) = 135 open("/var/lib/polkit-1/localauthority/30-site.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "\n** (process:6681): WARNING **: Error enumerating files in file:///var/lib/polkit-1/localauthority/30-site.d: No such file or directory\n", 136) = 136 open("/var/lib/polkit-1/localauthority/50-local.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "\n** (process:6681): WARNING **: Error enumerating files in file:///var/lib/polkit-1/localauthority/50-local.d: No such file or directory\n", 137) = 137 open("/var/lib/polkit-1/localauthority/90-mandatory.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOENT (No such file or directory) write(2, "\n** (process:6681): WARNING **: Error enumerating files in file:///var/lib/polkit-1/localauthority/90-mandatory.d: No such file or directory\n", 141) = 141 open("/var/lib/polkit-1/localauthority/10-vendor.d", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 6 getdents64(6, /* 144 entries */, 32768) = 10168 getdents64(6, /* 0 entries */, 32768) = 0 lstat("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.RealtimeKit1.acquire-high-priority.pkla", {st_mode=S_IFREG|0644, st_size=203, ...}) = 0 open("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.RealtimeKit1.acquire-high-priority.pkla", O_RDONLY) = 7 read(7, "[org.freedesktop.RealtimeKit1.acquire-high-priority]\nIdentity=unix-user:*\nAction=org.freedesktop.RealtimeKit1.acquire-high-priority\nResultAny=auth_admin\nResultInactive=auth_admin\nResultActive=auth_admin\n", 4066) = 203 close(7) = 0 lstat("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.RealtimeKit1.acquire-real-time.pkla", {st_mode=S_IFREG|0644, st_size=195, ...}) = 0 open("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.RealtimeKit1.acquire-real-time.pkla", O_RDONLY) = 7 read(7, "[org.freedesktop.RealtimeKit1.acquire-real-time]\nIdentity=unix-user:*\nAction=org.freedesktop.RealtimeKit1.acquire-real-time\nResultAny=auth_admin\nResultInactive=auth_admin\nResultActive=auth_admin\n", 4066) = 195 close(7) = 0 lstat("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.consolekit.system.restart-multiple-users.pkla", {st_mode=S_IFREG|0644, st_size=218, ...}) = 0 open("/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.consolekit.system.restart-multiple-users.pkla", O_RDONLY) = 7 read(7, "[org.freedesktop.consolekit.system.restart-multiple-users]\nIdentity=unix-user:*\nAction=org.freedesktop.consolekit.system.restart-multiple-users\nResultAny=auth_admin_keep\nResultInactive=auth_admin_keep\nResultActive=yes\n", 4066) = 218 close(7) = 0 The core of the issue might be that I have pulseaudio configured to use real time priority: 2010-03-23T15:32:31.48696 I: core-util.c: Failed to acquire high-priority scheduling: Permission denied 2010-03-23T15:32:31.48699 I: main.c: This is PulseAudio 0.9.21 2010-03-23T15:32:31.48701 I: main.c: Page size is 4096 bytes 2010-03-23T15:32:31.48712 I: main.c: Machine ID is 960950afac61217d5c079a0047faf324. 2010-03-23T15:32:31.48724 I: main.c: Using runtime directory /home/jnelson/.pulse/960950afac61217d5c079a0047faf324-runtime. 2010-03-23T15:32:31.48729 I: main.c: Using state directory /home/jnelson/.pulse. 2010-03-23T15:32:31.48729 I: main.c: Using modules directory /usr/lib64/pulse-0.9.21/modules. 2010-03-23T15:32:31.48730 I: main.c: Running in system mode: no 2010-03-23T15:32:31.48745 E: pid.c: Daemon already running. 2010-03-23T15:32:31.48746 E: main.c: pa_pid_file_create() failed. 2010-03-23T15:32:31.50706 I: main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted 2010-03-23T15:32:31.50709 I: main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted As soon as I stop pulseaudio the polkit issue goes away. So, for me, it seems it goes pulseaudio asks for realtime -> rtkit -> polkit -> polkit barfs -> rtkit says no -> pulseaudio exits -> loop!
Please put: autospawn=no in: /etc/pulse/client.conf Kill PA: pulseaudio -k restart PA: pulseaudio -vvvvvvvC and paste the output here in the hope it tells us why it exists, which it shouldn't.
I get this occationally too and will try to get results, the next time it happens. I have two (real) users on my system and it mostly seems to happen when I log out from one session and log in as the other user. I have not seen it on first login after a clean boot.
2010-04-20T15:43:12.66486 E: pid.c: Daemon already running. 2010-04-20T15:43:12.66489 E: main.c: pa_pid_file_create() failed.
Closing this bug again, because of lack of idea how to fix it or where to look for. openSUSE 11.3 is released. If possible, please check if the problem still exists. I was never able to reproduce anything, and upstream has no reports about such problems from other distributions.
I ran into this today after upgrading from 11.2 to 11.3. After killing the daemon a couple of times and then removing ~/.dbus the problem seems to have went away. Will report if it occurs again.