You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a sync_spawn_command I notice in riak_core_vnode.erl:345 that the {stop, Reason, NewModState} case doesn't reply to the sender. Given that riak_core_vnode_master:148 issues a sync_spawn_command with a timeout of infinity, the caller will hang forever.
A similar thing happens when the vnode crashes during a handle_command. Any other command being handled at the time of the crash will hang forever. I think the vnode_master ought to trap_exits to catch vnode crashes and reply({vnode_error, _} to the sender.
The text was updated successfully, but these errors were encountered:
Basho-JIRA
changed the title
sync_spawn_command hangs for infinity if the vnode crashes or replies {stop, _, _}
sync_spawn_command hangs for infinity if the vnode crashes or replies {stop, _, _} [JIRA: RIAK-2370]
Feb 2, 2016
I've verified this can happen, it occurs only under a specific condition where the indexes overlap...
And the index vnode dies during a prior request before the response of a current request completes, presumably because the dying vnode has no list of callers awaiting a response to be contacted during it's termination process... the question is should this behavior be modified?
When sending a sync_spawn_command I notice in riak_core_vnode.erl:345 that the {stop, Reason, NewModState} case doesn't reply to the sender. Given that riak_core_vnode_master:148 issues a sync_spawn_command with a timeout of infinity, the caller will hang forever.
A similar thing happens when the vnode crashes during a handle_command. Any other command being handled at the time of the crash will hang forever. I think the vnode_master ought to trap_exits to catch vnode crashes and reply({vnode_error, _} to the sender.
To reproduce:
handle_command(ping, _Sender, State) ->
timer:sleep(5000),
exit(crashing_the_vnode),
{reply, ok, State};
ping() ->
riak_core_vnode_master:sync_spawn_command(Idx, ping, ).
1> spawn(fun() -> :ping() end).
2> :ping().
...
CRASH REPORT ...
...
The text was updated successfully, but these errors were encountered: