Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Created attachment 1205662[details]
polkit-valgrind-debug.log
User problem description:
"""
polkitd process starts with 27Mb of memory footprint and grows to over 1G within a day or two
RHEL 7.2 with Gnome, all latest patches applied
always, while the box is up, reproducible
"""
When installing debug packages and run polkit under
valgrind, a sample of the leaks is attached.
On another valgrind run, but before installing debuginfo
packages, and run for a longer time a larger leak was detected:
==8970== 6,785,263 bytes in 344,167 blocks are definitely lost in loss record 2,375 of 2,375
==8970== at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==8970== by 0x5CD11E6: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x115B49: ??? (in /usr/lib/polkit-1/polkitd)
==8970== by 0x5C57868: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x5C50E28: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x5C5774C: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x5C579C8: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x5C57D14: ??? (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x5BC3559: JS_CallFunctionName (in /usr/lib64/libmozjs-17.0.so)
==8970== by 0x114884: ??? (in /usr/lib/polkit-1/polkitd)
==8970== by 0x118AFC: ??? (in /usr/lib/polkit-1/polkitd)
==8970== by 0x1194DF: ??? (in /usr/lib/polkit-1/polkitd)
Created attachment 1206930[details]
polkit-valgrind-debug--test_package.log
User run a test package under valgrind over the
weekend with this patch:
diff -up polkit-0.112/src/polkitbackend/polkitbackendjsauthority.c.orig polkit-0.112/src/polkitbackend/polkitbackendjsauthority.c
--- polkit-0.112/src/polkitbackend/polkitbackendjsauthority.c.orig 2016-09-30 16:05:49.011691879 -0300
+++ polkit-0.112/src/polkitbackend/polkitbackendjsauthority.c 2016-09-30 16:06:07.547670140 -0300
@@ -1420,7 +1420,6 @@ js_polkit_spawn (JSContext *cx,
goto out;
}
s = JS_EncodeString (cx, JSVAL_TO_STRING (elem_val));
- s = JS_EncodeString (cx, JSVAL_TO_STRING (elem_val));
argv[n] = g_strdup (s);
JS_free (cx, s);
}
and it appears to not have leaks, just not released
resources at exit.
Created attachment 1205662 [details] polkit-valgrind-debug.log User problem description: """ polkitd process starts with 27Mb of memory footprint and grows to over 1G within a day or two RHEL 7.2 with Gnome, all latest patches applied always, while the box is up, reproducible """ When installing debug packages and run polkit under valgrind, a sample of the leaks is attached. On another valgrind run, but before installing debuginfo packages, and run for a longer time a larger leak was detected: ==8970== 6,785,263 bytes in 344,167 blocks are definitely lost in loss record 2,375 of 2,375 ==8970== at 0x4C29BFD: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==8970== by 0x5CD11E6: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x115B49: ??? (in /usr/lib/polkit-1/polkitd) ==8970== by 0x5C57868: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x5C50E28: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x5C5774C: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x5C579C8: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x5C57D14: ??? (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x5BC3559: JS_CallFunctionName (in /usr/lib64/libmozjs-17.0.so) ==8970== by 0x114884: ??? (in /usr/lib/polkit-1/polkitd) ==8970== by 0x118AFC: ??? (in /usr/lib/polkit-1/polkitd) ==8970== by 0x1194DF: ??? (in /usr/lib/polkit-1/polkitd)