Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix process crash for unsupported protocol #50

Closed
wants to merge 1 commit into from

2 participants

@sthadka

Fix for the process crash:

CRASH REPORT Process <0.18299.93> with 0 neighbours exited with reason: bad argument in call to erlang:node({error,not_supported}) in elli_request:is_ref_alive/1 line 144 in gen_server:terminate/6 line 747
@knutin
Owner

I would be really curious to know how the input got to be {error, not_supported}. As the input to this function should only come from the #req.pid, maybe the source is messed up. It would be best to fix the root of the problem.

@sthadka

It turns out that we had a client trying to connect with HTTP 1.0, the case for which was not handled by us. The fix will no longer hit this corner of elli anymore.

The patch might still be useful for applications does not explicitly check the protocol version before passing on the request to elli.

@knutin knutin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 29, 2012
  1. @sthadka
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/elli_request.erl
View
6 src/elli_request.erl
@@ -192,8 +192,10 @@ send_chunk(Ref, Data, Timeout) ->
{error, timeout}
end.
-is_ref_alive(Ref) ->
+is_ref_alive(Ref) when is_pid(Ref) ->
case node(Ref) =:= node() of
true -> is_process_alive(Ref);
false -> rpc:call(node(Ref), erlang, is_process_alive, [Ref])
- end.
+ end;
+is_ref_alive(_Ref) ->
+ false.
Something went wrong with that request. Please try again.