Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

PB socket error on bucket props

View case_catch.erl
1 2 3 4 5 6 7
decode_modfun(#rpbmodfun{module=Mod, function=Fun}=MF, _Prop) ->
case (catch {binary_to_existing_atom(Mod, latin1), binary_to_existing_atom(Fun, latin1)}) of
{'EXIT', {badarg, _}} ->
error_logger:warning_msg("Creating new atoms from protobuffs message! ~p", [MF]),
{binary_to_atom(Mod, latin1), binary_to_atom(Fun, latin1)};
{M,F} -> {M,F}
end.
View case_catch.erl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
Eshell V5.9.2 (abort with ^G)
1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087).
{ok,<0.33.0>}
2> riakc_pb_socket:p
ping/1 ping/2 put/2 put/3 put/4
2> riakc_pb_socket:ping(Pid).
pong
3> riakc_pb_socket:get_bucket(Pid, <<"bob">>).
 
=ERROR REPORT==== 27-Feb-2013::17:20:24 ===
** Generic server <0.33.0> terminating
** Last message in was {tcp,#Port<0.1167>,
[20|
<<10,133,1,8,3,16,0,24,0,50,34,10,14,114,105,97,
107,95,99,111,114,101,95,117,116,105,108,18,
16,99,104,97,115,104,95,115,116,100,95,107,
101,121,102,117,110,58,43,10,22,114,105,97,
107,95,107,118,95,119,109,95,108,105,110,107,
95,119,97,108,107,101,114,18,17,109,97,112,
114,101,100,117,99,101,95,108,105,110,107,102,
117,110,64,128,163,5,72,20,80,50,88,50,96,0,
104,253,255,255,255,15,112,253,255,255,255,15,
120,0,128,1,253,255,255,255,15,136,1,253,255,
255,255,15,144,1,0,152,1,1>>]}
** When Server state == {state,"127.0.0.1",8087,false,false,#Port<0.1167>,
{request,#Ref<0.0.0.43>,
{rpbgetbucketreq,<<"bob">>},
{<0.31.0>,#Ref<0.0.0.42>},
undefined,60000,#Ref<0.0.0.44>},
{[],[]},
1,[],infinity,100}
** Reason for termination ==
** {badarg,[{erlang,binary_to_existing_atom,[<<"riak_core_util">>,latin1],[]},
{riak_pb_codec,decode_modfun,2,
[{file,"src/riak_pb_codec.erl"},{line,358}]},
{riak_pb_codec,'-decode_bucket_props/1-lc$^1/1-1-',2,
[{file,"src/riak_pb_codec.erl"},{line,263}]},
{riak_pb_codec,decode_bucket_props,1,
[{file,"src/riak_pb_codec.erl"},{line,263}]},
{riakc_pb_socket,process_response,3,
[{file,"src/riakc_pb_socket.erl"},{line,1120}]},
{riakc_pb_socket,handle_info,2,
[{file,"src/riakc_pb_socket.erl"},{line,847}]},
{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,607}]},
{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
** exception exit: badarg
in function binary_to_existing_atom/2
called as binary_to_existing_atom(<<"riak_core_util">>,latin1)
in call from riak_pb_codec:decode_modfun/2 (src/riak_pb_codec.erl, line 358)
in call from riak_pb_codec:'-decode_bucket_props/1-lc$^1/1-1-'/2 (src/riak_pb_codec.erl, line 263)
in call from riak_pb_codec:decode_bucket_props/1 (src/riak_pb_codec.erl, line 263)
in call from riakc_pb_socket:process_response/3 (src/riakc_pb_socket.erl, line 1120)
in call from riakc_pb_socket:handle_info/2 (src/riakc_pb_socket.erl, line 847)
in call from gen_server:handle_msg/5 (gen_server.erl, line 607)
in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 227)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.