Bug 659136

Summary: SSSD shutdown sometimes hangs
Product: Red Hat Enterprise Linux 5 Reporter: Stephen Gallagher <sgallagh>
Component: sssdAssignee: Stephen Gallagher <sgallagh>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: low    
Version: 5.6CC: benl, dpal, grajaiya, jgalipea, jonathan, prc
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.2.1-39.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 659401 (view as bug list) Environment:
Last Closed: 2011-01-13 22:37:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 659401    

Description Stephen Gallagher 2010-12-02 00:29:37 UTC
Description of problem:
Shutting down the SSSD with "service sssd stop" or sending a SIGTERM signal will sometimes result in the SSSD hanging and never terminating.

Version-Release number of selected component (if applicable):
sssd-1.2.1-38.el5

How reproducible:
Inconsistent, as it's a race condition

Steps to Reproduce:
1. Write a script to restart SSSD 100 times in rapid succession
2. Run it.
  
Actual results:
Eventually, SSSD will hang trying to restart.

Expected results:
SSSD should quit and restart every time.


Additional info:
A patch for this is under review upstream right now.
This issue was discovered while testing the fix for BZ #638241

Repro script:

#/bin/bash

i=0

while [ $i -lt 100 ] ; do
       service sssd condrestart
       let i=$i+1
done

service sssd status
if [ $? -ne 0 ] ; then
       echo "FAILED: sssd is not running after 100 restarts"
else
       echo "PASSED: sssd is running after 100 restarts"
fi

exit 0

Comment 3 Gowrishankar Rajaiyan 2010-12-02 18:59:16 UTC
Script used to test:
#/bin/bash

i=0
while [ $i -lt 300 ] ; do
       service sssd condrestart
       let i=$i+1
done

service sssd status
if [ $? -ne 0 ] ; then
       echo "FAILED: sssd is not running after $i restarts"
else
       echo "PASSED: sssd is running after $i restarts"
fi
exit 0
#EOF

<snip>
Starting sssd: [  OK  ]
Stopping sssd: [  OK  ]
Starting sssd: [  OK  ]
sssd (pid  26092) is running...
PASSED: sssd is running after 300 restarts
</snip>

Version: sssd-1.2.1-39.el5

Comment 4 Jonathan Dieter 2011-01-05 10:50:24 UTC
I'm observing this in up-to-date F13.  Do you want me to open a separate bug report or will the fix be pushed to Fedora 13 automatically as well?

Comment 5 Stephen Gallagher 2011-01-05 12:22:38 UTC
Please open a bug against Fedora. It's fixed in F14, but I haven't backported the change to F13.

Comment 7 errata-xmlrpc 2011-01-13 22:37:36 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0044.html