Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602468 - polkit uses a lot of cpu with hardened kernel
Summary: polkit uses a lot of cpu with hardened kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: Normal major (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-12 19:37 UTC by Oscar Andrea Merandi
Modified: 2017-02-14 11:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
polkitd strace (strace.log,61.18 KB, text/plain)
2017-02-14 10:10 UTC, Thanh
Details
kernel config (config-4.9.8-hardened,119.13 KB, text/x-mpsub)
2017-02-14 10:13 UTC, Thanh
Details
kernel config hardened (4.8.15) working (.config,121.50 KB, text/plain)
2017-02-14 11:28 UTC, Oscar Andrea Merandi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oscar Andrea Merandi 2016-12-12 19:37:22 UTC
polkit uses a lot of cpu with hardened kernel, with non-hardened kernel no problem.
useful information:
https://paste.pound-python.org/show/EYDRILi7A9LMBoaXX6gI/

screenshot:
http://imgur.com/sE8lVl2

perf report:
 https://paste.pound-python.org/show/6HPsU7IEg2EasgpedU1F/

Reproducible: Always
Comment 1 Jason Zaman gentoo-dev 2016-12-19 04:09:24 UTC
The pastes dont open for me. Can you attach them directly here? In general pastebins are not good cuz they expire and then coming back to the bug later makes no sense.
Comment 2 Jason Zaman gentoo-dev 2016-12-19 04:11:00 UTC
Hm the perf report one finally loaded. looks like a lot of time is spent mmap/munmapping stuff? Can you attach your kernel config too?
Comment 3 Oscar Andrea Merandi 2016-12-19 18:36:23 UTC
(In reply to Jason Zaman from comment #2)
> Hm the perf report one finally loaded. looks like a lot of time is spent
> mmap/munmapping stuff? Can you attach your kernel config too?

I tried and they work all the links, for safety I still loaded on github logs that can be used (to tell the truth is not the same hardened kernel of when I opened the bugs I guess, but it's still the hardened kernel gentoo affected by the same problem)


https://github.com/oscarandrea/gentooBUG/blob/master/logkernel.txt
Comment 4 Thanh 2017-02-14 10:10:47 UTC
Created attachment 463708 [details]
polkitd strace
Comment 5 Thanh 2017-02-14 10:12:35 UTC
I got this problem too. Everything worked well before. After I upgraded system, included:
hardened-sources: 4.8.15 -> 4.9.8
polkit: 0.113-r1 -> 0.113-r2

Polkit uses a lot of cpu. I attached strace, and kernel config.

those lines keep spawning very fast.

[pid  4344] 02:50:25.626126 munmap(0x3401259e000, 1048576) = 0
[pid  4344] 02:50:25.626148 mmap(NULL, 2097152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3400ccd8000
Comment 6 Thanh 2017-02-14 10:13:29 UTC
Created attachment 463710 [details]
kernel config
Comment 7 Oscar Andrea Merandi 2017-02-14 11:26:20 UTC
(In reply to Thanh from comment #5)
> I got this problem too. Everything worked well before. After I upgraded
> system, included:
> hardened-sources: 4.8.15 -> 4.9.8
> polkit: 0.113-r1 -> 0.113-r2
> 
> Polkit uses a lot of cpu. I attached strace, and kernel config.
> 
> those lines keep spawning very fast.
> 
> [pid  4344] 02:50:25.626126 munmap(0x3401259e000, 1048576) = 0
> [pid  4344] 02:50:25.626148 mmap(NULL, 2097152, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x3400ccd8000

thanks for answering, unfortunately it's been a long time since I've reported the bug, too, now I no longer have this problem, I do not know if it's because I disabled several options, or update the kernel, this is my new config, maybe someone can help
https://paste.pound-python.org/show/g6KVH3b4LDcDRYle8hV3/
Comment 8 Oscar Andrea Merandi 2017-02-14 11:28:59 UTC
Created attachment 463712 [details]
kernel config hardened (4.8.15) working