I executed attached script as a root.
Thank your for sharing the script.
I reproduce the bug with it after some iterations :
# ./reproduce.sh Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] wrongs number of secondary groups in process 17288 : 0 instead of 5 (sleep 49ms) 1/20 failed Stopping sssd: [ OK ] Starting sssd: [ OK ] Stopping sssd: [ OK ] Starting sssd: [ OK ] wrongs number of secondary groups in process 17451 : 0 instead of 5 (sleep 56ms) 1/20 failed Stopping sssd: [ OK ] Starting sssd: [ OK ] wrongs number of secondary groups in process 17535 : 0 instead of 5 (sleep 60ms) wrongs number of secondary groups in process 17523 : 0 instead of 5 (sleep 60ms) wrongs number of secondary groups in process 17540 : 0 instead of 5 (sleep 61ms) wrongs number of secondary groups in process 17528 : 0 instead of 5 (sleep 63ms) wrongs number of secondary groups in process 17537 : 0 instead of 5 (sleep 64ms) 5/20 failed Stopping sssd: [ OK ] Starting sssd:
I've got the same behaviour if I remove the "sleep 9", it's just quicker to test =) I've also tested with another user, same behaviour.
Are you 100% sure that the user "user_many_groups" is not doing anything, or any users belonging to one of its 23 secondary groups ?
Jean-Baptiste