Browse Source

Fix function clause matching gproc_dist:mk_broadcast_insert_vals

I met the following crash
```
14:28:56.141 [error] gproc_dist:747 CRASH REPORT Process gproc_dist with 1 neighbours crashed with reason: no function clause matching gproc_dist:'-mk_broadcast
_insert_vals/1-fun-0-'({{{p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747
14:28:56.141 [error] gproc_dist:747 Supervisor gproc_sup had child gproc_dist started with gproc_dist:start_link(all) at <0.1215.0> exit with reason no function clause matching gproc_dis
t:'-mk_broadcast_insert_vals/1-fun-0-'({{{p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747 in context child_terminated
14:28:56.142 [error] gproc_dist:747 CRASH REPORT Process gproc_dist with 1 neighbours crashed with reason: no function clause matching gproc_dist:'-mk_broadcast_insert_vals/1-fun-0-'({{{
p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747
14:28:56.143 [error] gproc_dist:747 Supervisor gproc_sup had child gproc_dist started with gproc_dist:start_link(all) at <0.2128.0> exit with reason no function clause matching gproc_dis
t:'-mk_broadcast_insert_vals/1-fun-0-'({{{p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747 in context child_terminated
14:28:56.158 [error] gproc_dist:747 CRASH REPORT Process gproc_dist with 1 neighbours crashed with reason: no function clause matching gproc_dist:'-mk_broadcast_insert_vals/1-fun-0-'({{{
p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747
14:28:56.159 [error] gproc_dist:747 Supervisor gproc_sup had child gproc_dist started with gproc_dist:start_link(all) at <0.2130.0> exit with reason no function clause matching gproc_dis
t:'-mk_broadcast_insert_vals/1-fun-0-'({{{p,g,{nodename,3}},<0.1206.0>},<0.1206.0>,'cancer3@192.168.2.120'}) line 747 in context child_terminated

......

14:28:56.472 [error] Undefined:Undefined Supervisor gproc_sup had child gproc_dist started with gproc_dist:start_link(all) at <0.2156.0> exit with reason reached_max_restart_intensity in context shutdown
14:28:56.473 [info] Undefined:Undefined Application gproc exited with reason: shutdown
```
chenduo 5 years ago
parent
commit
3c17a604b9
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/gproc_dist.erl

+ 2 - 2
src/gproc_dist.erl

@@ -985,9 +985,9 @@ surrendered_1(Globs) ->
                   [Obj|Acc]
           end, [], Globs),
     ?event({'Ldr_local_globs', Ldr_local_globs}),
-    case [{K,P,V} || {K,P,V} <- My_local_globs,
+    case [{K,P,V} || {{K,_}=R,P,V} <- My_local_globs,
 		     is_pid(P) andalso
-			 not(lists:keymember(K, 1, Ldr_local_globs))] of
+			 not(lists:keymember(R, 1, Ldr_local_globs))] of
         [] ->
             %% phew! We have the same picture
             ok;