[erlang-questions] Any tcp related changes in R15B* that might cause this?

Anthony Molinaro anthonym@REDACTED
Fri Dec 14 22:11:17 CET 2012

On Fri, Dec 14, 2012 at 11:32:11AM -0500, Steve Vinoski wrote:
> Hi Anthony, based on your example, it looks like a follow-up commit that
> modified some of the changes introduced by my patch introduced the issue
> you're seeing: commit dc5f7190. You might want to report it over on
> erlang-bugs.

Nice catch, I guess that it's actually not enough to return error
for backward compatibility ;)

I think the main thing I'm still not sure of is if the decode_packet changes
are actually the cause.  I was able to call decode_packet with long headers
and not actually see an issue.


erlang:decode_packet ( httph,
                       list_to_binary ([ "X-Random: ",
                                         [$a || _ <- lists:seq(1,10000)],

Returns the same thing in both R14B04 and R15B02.  And as far as I am able
to tell that is the only call made to decode_packet in mochiweb.

I think the actual error is around recvbuf sizing (mochiweb uses 8192 as
the default, so 10000 is definitely larger than that, however, the standard
libraries must be doing something different as now it returns emsgsize
where it did no in the past).  I really wish there was a way to search
commits on github as then I could search for recvbuf or something like
that to see what might have changed.

Before I go over to bugs I'll probably try to detangle mochiweb enough
to create a small reproducible test case.

I also have a pull request into mochiweb which prevents the crash but
has the annoying behavior at the moment that it returns an error to the
client about disconnecting version the 400 error it returned before.


But since the standard library seems to be the one closing the socket
there's not much that can be done other than the fix I put in place.

Thanks for your help Steve,


Anthony Molinaro                           <anthonym@REDACTED>

More information about the erlang-questions mailing list