Julian,

On Thu, Aug 16, 2012 at 6:51 PM, Julian <[email protected]> wrote:
>
>
> One of the intriguing things I find is that the exception is listed as
> occuring in one of my own processes that is doing json decoding, however I
> have checked the json by saving it to a file and it does not contain the
> data shown inside the 'struct' in the exception. The only explanation I can
> come up with is that the badmatch is occurring within riakc_pb socket and
> was triggered by my call to riakc_pb_socket:search/6, and the process link
> is somehow influencing the crash report.
>

Links don't influence crash reports.  They create a dependency among
processes so that if one crashes the other knows.

That struct in your trace is a Riak Search result which has already been
decoded.  It is wrapped in a 2-tuple which you are passing to be decoded.
 This seems like a blatant error.  What I can't explain is why you are
seeing badmatch and not case_clause, but maybe mochijson code has changed.


> =CRASH REPORT==== 16-Aug-2012::21:44:52 ===
>   crasher:
>     initial call: xx_acl_query:init/1
>     pid: <0.159.0>
>     registered_name: []
>     exception exit: {{badmatch,
>                          {not_found,
>
> {<<"a65796222ea26bb7b355bf140dbd5b72e81efee1">>,
>                               <<"000018e5-accf-fff1-8123-1efee1">>},
>                              {struct,
>                                  [{p,[0]},
>                                   {<<"account_id">>,[<<"0000005427">>]},
>                                   {<<"account_type_id">>,[<<"3">>]},
>                                   {<<"id">>,[<<"6373">>]},
>                                   {<<"status">>,[<<"Deleted">>]},
>                                   {<<"type">>,[<<"account">>]},
>                                   {score,[1.0]}]}}},
>                      [{mochijson2,tokenize,2},
>                       {mochijson2,decode1,2},
>                       {mochijson2,json_decode,2},
>                       {lists,map,2},
>                       {lists,map,2},
>                       {xx_acl_tree,from_json,2},
>                       {xx_acl_query,load_instance_,2},
>                       {xx_acl_query,bootstrap_accounts,1}]}
>       in function  gen_server:init_it/6
>     ancestors: [xx_cache_sup,xx_acl_sup,<0.108.0>]
>     messages: []
>     links: [<0.132.0>]
>     dictionary: [<omitted>]
>     trap_exit: true
>     status: running
>     heap_size: 832040
>     stack_size: 24
>     reductions: 30690459
>   neighbours:
>
>
-Z
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to