Skip to content

Leak of PB Socket proccess from pbc_pool_master #985

@shino

Description

@shino

Connection pool management uses two layer of poolboy pools.

In default settings, the relation of pool and thier size are as follows:

request_pool (128) -------+
                          |
                          +----> pbc_pool_master (133)
                          |
bucket_list_pool (5) -----+

UPDATE As descripbed in the comment below #985 (comment), this steps may not be essential.

Steps to reproduce (or emulate) the leak at pbc_pool_master.

(rcs-dev1@127.0.0.1)1> [{P, poolboy:status(P)} || P <- [request_pool, bucket_list_pool, pbc_pool_master]].
[{request_pool,{ready,128,0,0}},
 {bucket_list_pool,{ready,5,0,0}},
 {pbc_pool_master,{ready,133,0,0}}]
(rcs-dev1@127.0.0.1)2> f(), spawn(fun() ->
     {ok, RcPid} = riak_cs_riak_client:start_link([]),
     riak_cs_riak_client:manifest_pbc(RcPid),
     spawn_link(fun() -> exit(dummY)
  end) end).
<0.504.0>
(rcs-dev1@127.0.0.1)3> [{P, poolboy:status(P)} || P <- [request_pool, bucket_list_pool, pbc_pool_master]].
[{request_pool,{ready,128,0,0}},
 {bucket_list_pool,{ready,5,0,0}},
 {pbc_pool_master,{ready,132,0,1}}]   %% <==== LEAK!!

The process which calls riak_cs_riak_client:start_link/1 emulates riak_cs_gc_d. The one which callsexit(dummY)` emulates other GC
related process, for example riak_cs_put_fsm or riak_cs_delete_server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions