Subject: Re: paging all socket geniuses
From: rpw3@rpw3.org (Rob Warnock)
Date: Wed, 30 Jul 2008 06:14:53 -0500
Newsgroups: comp.lang.lisp
Message-ID: <h6udnUHT-vqw0A3VnZ2dnUVZ_uOdnZ2d@speakeasy.net>
Kenny  <kentilton@gmail.com> wrote:
+---------------
| D Herring wrote:
| > The address resolution may be borked.  In a command shell, type `ping 
| > s3.amazonaws.com` 
| 
| Ok. It says it will talk to s3-1.amazonaws.com and mentions an IP 
| address. Then times out. The bad news is that it does this on the 
| machine that /can/ get to S3 as well (and I quickly dove in via the app 
| to confirm S3 is still up -- they have had issues lately. <g>)
+---------------

On most versions of Windows I've played with [I don't own any, so I don't
know how universal this is], the "ping" behaves as if you had given it
a "-o" option ["Exit successfully after receiving one reply packet"].
And maybe a "-c5" ["Stop after sending (and receiving) 5 packets"],
or some other small number. Which means that it'll only send a "few"
ICMP ECHO_REQUESTs (then stop sending), and either exit immediately on
the first ICMP ECHO_RESPONSE or else hang for some default timeout and
then exit.

+---------------
| So this is still interesting. HTH do the successful systems get
| past the timeout, and why cannot SMOKINJOE do the same?...
+---------------

Try writing a much smaller test case, say, opening a socket to
some simpler service such as <http://google.com/>, throw a "HEAD"
request at it (see below), and then read the response (which for
that request will just be a redirect, ~300 bytes total, ~520 if
you use "GET" instead of "HEAD"), e.g.:

    $ http-get -H http://google.com/ 
    HEAD / HTTP/1.0                         \    Written to socket and
    Host: google.com                         >-- also echo'd to terminal.
                                            /
    HTTP/1.0 301 Moved Permanently          \
    Location: http://www.google.com/         \
    Content-Type: text/html; charset=UTF-8    \
    Date: Wed, 30 Jul 2008 11:07:11 GMT        \  Read from socket and
    Expires: Fri, 29 Aug 2008 11:07:11 GMT      >---
    Cache-Control: public, max-age=2592000     /  printed on terminal.
    Server: gws                               /
    Content-Length: 219                      /
    Connection: Close                       /

    $ 

Then try that from each of your three machines. Hopefully it will
work on the first two and hang on the third [meaning the bug *isn't*
a Heisenbug!], and the problem will be simpler to debug.


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607