[erlang-bugs] bug: R12B-4 global_group registration has a process leak causing occasional node restarts
Serge Aleynikov
saleyn@REDACTED
Tue Apr 14 01:51:27 CEST 2009
It appears that R12B-4 has a faulty implementation of global_group
management that results in a process leak eventually causing a node
restart when the default process_limit is reached.
I don't have R13-A installed, but since I haven't seen anything in
kernel release notes indicating changes in the global_groups, I assume
the same issue exists in the latest version.
Attached is a patch fixing the issue. Here are the steps reproducing
the problem:
$ cat test.config
[
{kernel, [{global_groups, [{marc, ['a@REDACTED', 'b@REDACTED']}]}]}
].
$ erl -sname a -config test.config
(a@REDACTED)1> global:register_name(test, self()).
yes
$ erl -sname b -config test.config
(b@REDACTED)1> length(processes()).
30
(b@REDACTED)2> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)3> length(processes()).
34
(b@REDACTED)4> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)5> length(processes()).
35
(b@REDACTED)6> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)7> length(processes()).
36
After applying the patch the same test holds:
$ erl -sname b -config test.config
(b@REDACTED)1> length(processes()).
30
(b@REDACTED)2> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)3> length(processes()).
33
(b@REDACTED)4> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)5> length(processes()).
33
(b@REDACTED)6> global_group:whereis_name({group, marc}, test).
<2334.40.0>
(b@REDACTED)7> length(processes()).
33
Regards,
Serge
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: global_group.erl.R12B-4.patch
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20090413/d69aa9af/attachment.ksh>
More information about the erlang-bugs
mailing list