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

Sverker Eriksson <>
Mon Dec 17 16:10:55 CET 2012

Have I understood it correctly so far if I say that my commit dc5f7190 
seems to cause a


while earlier versions caused a


for the same scenario with some sort of very long http lines?

/Sverker, Erlang/OTP

Anthony Molinaro wrote:
> 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.
> This
> erlang:decode_packet ( httph,
>                        list_to_binary ([ "X-Random: ",
>                                          [$a || _ <- lists:seq(1,10000)],
>                                          "\r\n\r\n"
>                                        ]),
>                        []).
> 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.
> https://github.com/mochi/mochiweb/pull/91
> 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

More information about the erlang-questions mailing list