Bug 1867899

Summary: sssd_kcm hit 100% CPU usage when run postgresql benchmark
Product: Red Hat Enterprise Linux 8 Reporter: haidar <haidarvm>
Component: sssdAssignee: Pavel Březina <pbrezina>
Status: CLOSED DUPLICATE QA Contact: sssd-qe <sssd-qe>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 8.2CC: atikhono, grajaiya, jhrozek, lslebodn, mzidek, pbrezina, rharwood, tscherf
Target Milestone: rcKeywords: Reopened
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-02 15:11:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description haidar 2020-08-11 07:25:56 UTC
sssd_kcm slow postgres benchmark when i'm using ab 

ab -t 10 -n 5000 http://localhost/pgsql.php

top result :

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND         
   3048 root      20   0  421072  60368   8372 R  99.0   0.8   2:00.64 sssd_kcm        
   4065 haidar    20   0 3303692 203312  80424 S   4.0   2.6   2:52.84 gnome-shell     
   2112 netdata   20   0   98912   9548   4100 S   3.7   0.1   2:29.40 apps.plugin     
   2787 haidar    20   0  773344  50592  37672 S   3.3   0.6   2:10.93 Xorg            
  20564 postgres  20   0  497128  25220  23836 R   3.3   0.3   0:04.02 postmaster      
   3596 haidar    20   0  786672  49396  30536 S   3.0   0.6   0:10.28 xfce4-terminal  
   2071 netdata   20   0  306720  68240   6696 S   1.7   0.9   0:59.87 netdata         
   3820 haidar    20   0 1706844 439188 176904 S   1.3   5.5   3:13.69 chrome          
   8206 haidar    20   0   77992   7932   4468 R   1.0   0.1   0:00.26 nginx           
  23039 haidar    20   0 9502364 290960 112292 S   1.0   3.7   0:49.46 chrome          
   2114 netdata   20   0  115216   8956   7520 S   0.7   0.1   0:34.26 cups.plugin     
   2115 netdata   20   0  151900  26268   7508 S   0.7   0.3   0:19.05 python          
   8204 haidar    20   0   78288   7920   4468 S   0.7   0.1   0:02.06 nginx           
  17178 haidar    20   0  722036  24052  15972 S   0.7   0.3   0:00.42 php-fpm         
  17290 haidar    20   0  722036  24292  16212 S   0.7   0.3   0:00.41 php-fpm

It's make completely slow of postgres performance.

Version 
sssd-kcm-2.2.3-20.el8.x86_64
postgresql12-server-12.3-5PGDG.rhel8.x86_64
CPE OS Name: cpe:/o:redhat:enterprise_linux:8.2:GA

Comment 1 jstephen 2020-08-21 14:57:30 UTC
Hello,

Does this problem occur under regular postgres production load, or is it only an issue when running the benchmarking tool?

Could you please provide debug logs from sssd-kcm when reproducing this issue? See 'OBTAINING DEBUG LOGS' in man sssd-kcm.

Thank you.

Comment 2 haidar 2020-08-21 15:45:05 UTC
Yes i do benchmarking tool using wrk

wrk -t12 -c400 -d5s http://localhost:3000/pins

Sorry I'm not using red hat right now, so i can't give more logs

Comment 3 jstephen 2020-08-21 17:37:27 UTC
Thanks for the response.  It will be difficult to troubleshoot without logs. If performance is critical then switching to KEYRING ccache might be the way to go.

Comment 4 Pavel Březina 2020-09-23 10:49:49 UTC
I'm not familiar with ab and the other tools but we have several kcm performance bug reports.

Can you please provide output of 'klist -A -C' after you reproduce this so we can see if it hits already known issue?

Comment 7 haidar 2020-10-16 08:14:59 UTC
Ok, Sorry for the delay. I will test it again

Comment 8 haidar 2020-10-17 05:42:30 UTC
After I check in server not my Laptop, 
Everythings just works fine


rpm -qa | grep postgres
postgresql12-12.4-1PGDG.rhel8.x86_64
postgresql12-libs-12.4-1PGDG.rhel8.x86_64
postgresql12-server-12.4-1PGDG.rhel8.x86_64

rpm -qa | grep sss
sssd-nfs-idmap-2.2.3-20.el8.x86_64
libsss_sudo-2.2.3-20.el8.x86_64
sssd-kcm-2.2.3-20.el8.x86_64
libsss_autofs-2.2.3-20.el8.x86_64
libsss_certmap-2.2.3-20.el8.x86_64
libsss_nss_idmap-2.2.3-20.el8.x86_64
libsss_idmap-2.2.3-20.el8.x86_64
sssd-common-2.2.3-20.el8.x86_64
sssd-client-2.2.3-20.el8.x86_64

And I run benchmark using wrk. Postgres run full load 100% CPU usage without sssd_kcm process

Thanks for updated

Comment 9 Alexey Tikhonov 2020-10-29 19:51:42 UTC
Most probably this is duplicate of bz 1876514

Please reopen in case of new/contradicting data.

*** This bug has been marked as a duplicate of bug 1876514 ***

Comment 10 Pavel Březina 2020-11-02 12:58:05 UTC
haidar, may I ask you why did you reopened this bugzilla?

Comment 11 haidar 2020-11-02 13:46:04 UTC
Hi pavel, Alexey Tikhonov ask me to reopen right ?

https://bugzilla.redhat.com/show_bug.cgi?id=1867899#c9

Comment 12 Alexey Tikhonov 2020-11-02 15:11:18 UTC
(In reply to haidar from comment #11)
> Hi pavel, Alexey Tikhonov ask me to reopen right ?
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1867899#c9

I asked to reopen only in case if you have reasons to think your issue is different.

*** This bug has been marked as a duplicate of bug 1876514 ***