Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix process crash for unsupported protocol #50

Closed
wants to merge 1 commit into from

2 participants

Sukumar Yethadka Knut Nesheim
Sukumar Yethadka

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
Knut Nesheim
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.

Sukumar Yethadka

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.

Knut Nesheim knutin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Nov 29, 2012
Sukumar Yethadka sthadka Fix process crash for unsupported protocol d2ae6a1
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 src/elli_request.erl
6 src/elli_request.erl
@@ -192,8 +192,10 @@ send_chunk(Ref, Data, Timeout) ->
192 192 {error, timeout}
193 193 end.
194 194
195   -is_ref_alive(Ref) ->
  195 +is_ref_alive(Ref) when is_pid(Ref) ->
196 196 case node(Ref) =:= node() of
197 197 true -> is_process_alive(Ref);
198 198 false -> rpc:call(node(Ref), erlang, is_process_alive, [Ref])
199   - end.
  199 + end;
  200 +is_ref_alive(_Ref) ->
  201 + false.

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.