Hi Anthony and Sverker, as I mentioned in a previous email, using Anthony's test case a few weeks ago I bisected between R14B04 and HEAD and found commit dc5f7190 to be the first commit where the test case fails.<div><br>
</div><div>--steve<br><br><div class="gmail_quote">On Wed, Jan 2, 2013 at 12:28 PM, Anthony Molinaro <span dir="ltr"><<a href="mailto:anthonym@alumni.caltech.edu" target="_blank">anthonym@alumni.caltech.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
  The holidays went and interrupted everything, so I'm sorry about the<br>
late response.<br>
It's unclear if the commit dc5f7190 did it or not, but sometime between<br>
R14B04 and R15B02 the behavior did change.  I've not isolated it outside<br>
of mochiweb, but I don't think its a mochiweb problem.<br>
<br>
Here's the pull request which contains the short program I used to<br>
reproduce with mochiweb (and work around the new behavior)<br>
<br>
<a href="https://github.com/mochi/mochiweb/pull/91" target="_blank">https://github.com/mochi/mochiweb/pull/91</a><br>
<br>
I'll see if I can't isolate it to just OTP sometime in the next<br>
couple of days.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Anthony<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Dec 17, 2012 at 04:10:55PM +0100, Sverker Eriksson wrote:<br>
> Have I understood it correctly so far if I say that my commit<br>
> dc5f7190 seems to cause a<br>
><br>
> {tcp_error,Port,emsgsize}<br>
><br>
> while earlier versions caused a<br>
><br>
> {http,Port,{http_error,"..."}}<br>
><br>
><br>
> for the same scenario with some sort of very long http lines?<br>
><br>
> /Sverker, Erlang/OTP<br>
><br>
> Anthony Molinaro wrote:<br>
> >On Fri, Dec 14, 2012 at 11:32:11AM -0500, Steve Vinoski wrote:<br>
> >>Hi Anthony, based on your example, it looks like a follow-up commit that<br>
> >>modified some of the changes introduced by my patch introduced the issue<br>
> >>you're seeing: commit dc5f7190. You might want to report it over on<br>
> >>erlang-bugs.<br>
> ><br>
> >Nice catch, I guess that it's actually not enough to return error<br>
> >for backward compatibility ;)<br>
> ><br>
> >I think the main thing I'm still not sure of is if the decode_packet changes<br>
> >are actually the cause.  I was able to call decode_packet with long headers<br>
> >and not actually see an issue.<br>
> ><br>
> >This<br>
> ><br>
> >erlang:decode_packet ( httph,<br>
> >                       list_to_binary ([ "X-Random: ",<br>
> >                                         [$a || _ <- lists:seq(1,10000)],<br>
> >                                         "\r\n\r\n"<br>
> >                                       ]),<br>
> >                       []).<br>
> ><br>
> >Returns the same thing in both R14B04 and R15B02.  And as far as I am able<br>
> >to tell that is the only call made to decode_packet in mochiweb.<br>
> ><br>
> >I think the actual error is around recvbuf sizing (mochiweb uses 8192 as<br>
> >the default, so 10000 is definitely larger than that, however, the standard<br>
> >libraries must be doing something different as now it returns emsgsize<br>
> >where it did no in the past).  I really wish there was a way to search<br>
> >commits on github as then I could search for recvbuf or something like<br>
> >that to see what might have changed.<br>
> ><br>
> >Before I go over to bugs I'll probably try to detangle mochiweb enough<br>
> >to create a small reproducible test case.<br>
> ><br>
> >I also have a pull request into mochiweb which prevents the crash but<br>
> >has the annoying behavior at the moment that it returns an error to the<br>
> >client about disconnecting version the 400 error it returned before.<br>
> ><br>
> ><a href="https://github.com/mochi/mochiweb/pull/91" target="_blank">https://github.com/mochi/mochiweb/pull/91</a><br>
> ><br>
> >But since the standard library seems to be the one closing the socket<br>
> >there's not much that can be done other than the fix I put in place.<br>
> ><br>
> >Thanks for your help Steve,<br>
> ><br>
> >-Anthony<br>
> ><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br>
</div></div><div class="im HOEnZb">--<br>
------------------------------------------------------------------------<br>
Anthony Molinaro                           <<a href="mailto:anthonym@alumni.caltech.edu">anthonym@alumni.caltech.edu</a>><br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br></div>