I ran into a nasty issue yesterday at Savannah, while trying to
recreate the users public keys.
I got overwhelmed with numerous sv_users processes. Here's what I
think is the cause:
>From Groups.pm:
my $pid = open (GPG, "|-");
if ($pid) { # parent
print GPG $key;
close (GPG);
return $?;
} else { # child
exec (@gpg_args) || return 1;
}
If exec fails, what happens? We have two processes, the father that
will return after reading nothing on GPG, _and_ the son that will
'return 1' after failing to exec. Back in sv_users, they will both
update the remaining keys. Repeat for at least 15 users and you get a
fork bomb :/
(I'm not talking about security, just misconfiguration)
For reference, it may also be of interest that if two "children" try
to access MySQL, you can get a "MySQL server has gone away" error.
You should be able to reproduce the error by tweaking:
perl -MSavane -e 'print GetGroupName("101") . "\n"; open(FORK, "|-") || sleep
1; print GetGroupName("102") . "\n";'
If you already got this kind of errors, that's a path
to investigate.
About the issue, I suggest we change "return 1" into a die
statement. If I'm right, this is an important point to keep in mind
when programming :)
--
Sylvain
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev