On Mon, Sep 24, 2012 at 11:37 PM, Jimb Esser <[email protected]> wrote:
> I tried tcpdump, and it starts saving off packets (writes a few dump files,
> a couple 10s of MBs), but them seems to stall out - nothing more gets
> written though my app is clearly still receiving data.  By the time it gets
> the bad data, it's inevitably stopped by then, and searching through the
> dumps does not contain the bad data.
>
> I added some logging to http_parser.c, however, simply dumping out the raw
> data that it is parsing, and it looks like the data is bad before it gets in
> there.  Specifically, in one case I'm looking at (raw data, though all text
> at [1]) it looks like the tail of the buffer has 4377 bytes that begins what
> should be a 8192 byte chunk, and then a duplicated copy of the last ~4708
> bytes or so, followed by "0\r\n\r\n".  Sadly, now that I'm familiar with the
> http_parser code, this really points to a problem somewhere higher up... -_-
> I'll do some poking around with tcpdump to see if I can get it or something
> else to dump more reliably, it would be good to have absolute confirmation
> that the data was fine coming in at the TCP level, although the fact that
> node 0.6 has no problems makes me pretty certain the input is fine.
>
> On other fronts, I did more tests searching through node's git history, and
> found that before a specific revision [2], this seems to happen much less
> frequently (happened once in 6 runs, as opposed to almost every run), but
> I'm pretty convinced there's nothing wrong with this change (I added some
> logging to both before and after and found nothing behaving differently,
> though the frequency changed when adding logging, so it may just indicate
> it's a delicate timing issue - although it does happen reliably both on my
> work machine, home machine, and AWS instances - all on pretty drastically
> different hardware, and similarly never seems to happen on node 0.6.21 on
> any of those machines (although if it was only happening 1 in 6 times
> before, it could be I would have never seen it in my tests)).
>
> [1]  http://thesilentb.com/files/bad_http_stream.txt
> [2]  https://github.com/joyent/node/commit/70033bd

Can you post the patch you used for logging? I don't see anything
obviously wrong in the dump itself.

It's kind of odd that tcpdump hangs, I've never had issues with it
myself, even on maxed out Gbit interfaces.

On a completely unrelated note:

  {"S":"[6.24719116,-3.552713678800501e-15,2.252045820000001]"}

Clamp your floats, man! :-)

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to