public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* shutdown( socket, SHUT_WR ) - unexpected behaviour
@ 2004-05-01 22:07 Jacek Trzmiel
  2004-05-03 11:44 ` Corinna Vinschen
  0 siblings, 1 reply; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-01 22:07 UTC (permalink / raw)
  To: cygwin


Hi,

$ cygcheck -cd cygwin       
Cygwin Package Information
Package              Version        
cygwin               1.5.9-1        

I found some unexpected behaviour of shutdown call.  Here is example
program to reproduce problem.  It is supposed to send simple http
request to example.org, close writing part of socket, and then wait for
and print reply:

--- ShutdownTest.cpp ------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
#include <assert.h>


const char *HOST    = "example.org";
const int   PORT    = 80;
const char *MESSAGE = "GET / HTTP/1.0\r\n\r\n";


void sendall( int sd, const char *data, int datalen )
{
    assert( data );
    assert( datalen >= 0 );
    while(datalen>0) {
        int sent = send(sd, data, datalen, 0);
        if( sent == -1) {
            perror("send");
            exit(1);
        }
        data += sent;
        datalen -= sent;
        assert( datalen>=0 );
    }
}


void recvandprintall( int sd )
{
    const int bufferlen = 65536;
    char buffer[bufferlen];

    while(true) {
        int got = recv(sd, buffer, bufferlen, 0);
        if(got == -1) {
            perror("recv");
            exit(1);
        }
        if(got==0) {
            break;
        }
        for( int i=0; i<got; ++i)
        {
            printf( "%c", buffer[i] );
        }
    }
}


void test()
{
    /* go find out about the desired host machine */
    struct hostent *he = gethostbyname(HOST);
    if (he == 0) {
        perror("gethostbyname");
        exit(1);
    }
    assert( he->h_addrtype == AF_INET );
    assert( he->h_addr_list[0] );

    /* fill in the socket structure with host information */
    struct sockaddr_in pin;
    memset( &pin, 0, sizeof(pin) );
    pin.sin_family = AF_INET;
    pin.sin_addr.s_addr = ((struct in_addr *)(he->h_addr))->s_addr;
    pin.sin_port = htons(PORT);

    /* grab an Internet domain socket */
    int sd;
    if ((sd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
        perror("socket");
        exit(1);
    }

    /* connect to PORT on HOST */
    if (connect(sd,(struct sockaddr *)  &pin, sizeof(pin)) == -1) {
        perror("connect");
        exit(1);
    }

    /* send a message to the server PORT on machine HOST */
    sendall( sd, MESSAGE, strlen(MESSAGE) );

    /* shutdown writing part of socket */
    shutdown( sd, SHUT_WR );

    /* wait for data to come back from the server and print it */
    recvandprintall( sd );

    close(sd);
}


int main()
{
    test();
    return 0;
}
--- ShutdownTest.cpp ------------------------------------------------

If you compile and run it this way:
$ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe

it doesn't print anything.   Commenting out shutdown call or adding some
wait before it does make program work as expected:

$ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
HTTP/1.1 200 OK
Date: Sat, 01 May 2004 23:28:20 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
[...]



1. I suppose that shutdown(sd,SHUT_WR) does not force unflushed buffers
out (i.e. discards them).  Am I right?


2. Is this bug or feature?  Manual page isn't helpful:
$ man 2 shutdown
No entry for shutdown in section 2 of the manual
$ man shutdown
No manual entry for shutdown


3. If it's a feature, then how can I manually flush buffers out before
calling shutdown?


I've googled for this problem, but haven't found any relevant
information.


Best regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-01 22:07 shutdown( socket, SHUT_WR ) - unexpected behaviour Jacek Trzmiel
@ 2004-05-03 11:44 ` Corinna Vinschen
  2004-05-04  2:19   ` Jacek Trzmiel
  0 siblings, 1 reply; 11+ messages in thread
From: Corinna Vinschen @ 2004-05-03 11:44 UTC (permalink / raw)
  To: cygwin

On May  2 00:07, Jacek Trzmiel wrote:
> 
> Hi,
> 
> $ cygcheck -cd cygwin       
> Cygwin Package Information
> Package              Version        
> cygwin               1.5.9-1        
> 
> I found some unexpected behaviour of shutdown call.  Here is example
> program to reproduce problem.  It is supposed to send simple http
> request to example.org, close writing part of socket, and then wait for
> and print reply:
> 
> --- ShutdownTest.cpp ------------------------------------------------
> [...]
> --- ShutdownTest.cpp ------------------------------------------------
> 
> If you compile and run it this way:
> $ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
> 
> it doesn't print anything.   Commenting out shutdown call or adding some
> wait before it does make program work as expected:
> 
> $ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
> HTTP/1.1 200 OK
> Date: Sat, 01 May 2004 23:28:20 GMT
> Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
> Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
> [...]

I've tried your application and I'm not able to reproduce your problem.
The shutdown call does not influence sending the buffered data apparently.

I've tested with Cygwin 1.5.9 and with a recent snapshot on XP SP1.
What's your system?

> 1. I suppose that shutdown(sd,SHUT_WR) does not force unflushed buffers
> out (i.e. discards them).  Am I right?

It doesn't flush, but it also doesn't stop the data already buffered 
from being sent.  It's only purpose is to disallow further send calls on
the socket.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin@cygwin.com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-03 11:44 ` Corinna Vinschen
@ 2004-05-04  2:19   ` Jacek Trzmiel
  2004-05-04  2:55     ` Larry Hall
  2004-05-04 12:37     ` Hannu E K Nevalainen
  0 siblings, 2 replies; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-04  2:19 UTC (permalink / raw)
  To: cygwin


> I've tried your application and I'm not able to reproduce your problem.
> The shutdown call does not influence sending the buffered data apparently.

Thanks for info.

> I've tested with Cygwin 1.5.9 and with a recent snapshot on XP SP1.
> What's your system?

Cygwin 1.5.9, Win2kSP2.  I made additional test using winsock directly
and got the same buggy result.  So it doesn't look like bug in cygwin,
but rather in windows or some 3rd party app that is messing with the
sockets (e.g. NIS).  I found similar bugreport in MS KB298871, but it's
marked as WinCE only:

http://support.microsoft.com/default.aspx?scid=kb;en-us;298871

"If an application calls shutdown() to disable only sending from the
socket, later attempts to read data sent to that socket will result in
only portions of the data being received."


Can somebody with Win2k box compile and run prog from my previous mail?
I would like to know if it behaves incorrectly only on my system, or on
Win2k in general:

http://cygwin.com/ml/cygwin/2004-05/msg00013.html

$ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
No output will mean that shutdown bug is present.


> > 1. I suppose that shutdown(sd,SHUT_WR) does not force unflushed buffers
> > out (i.e. discards them).  Am I right?
> 
> It doesn't flush, but it also doesn't stop the data already buffered
> from being sent.  It's only purpose is to disallow further send calls on
> the socket.

Yes, it works this way in practice (to have other reference, I've just
tested in on FreeBSD).  I was unsure only because unix documentation I
found was silent about this.  The only place I found now that declares
it clearly is MSDN:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/shutdown_2.asp

"If the how parameter is SD_SEND, subsequent calls to the send function
are disallowed. For TCP sockets, a FIN will be sent after all data is
sent and acknowledged by the receiver."

Regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04  2:19   ` Jacek Trzmiel
@ 2004-05-04  2:55     ` Larry Hall
  2004-05-04  9:27       ` Dave Korn
  2004-05-04 12:37     ` Hannu E K Nevalainen
  1 sibling, 1 reply; 11+ messages in thread
From: Larry Hall @ 2004-05-04  2:55 UTC (permalink / raw)
  To: Jacek Trzmiel, cygwin

At 10:19 PM 5/3/2004, you wrote:

>> I've tried your application and I'm not able to reproduce your problem.
>> The shutdown call does not influence sending the buffered data apparently.
>
>Thanks for info.
>
>> I've tested with Cygwin 1.5.9 and with a recent snapshot on XP SP1.
>> What's your system?
>
>Cygwin 1.5.9, Win2kSP2.  I made additional test using winsock directly
>and got the same buggy result.  So it doesn't look like bug in cygwin,
>but rather in windows or some 3rd party app that is messing with the
>sockets (e.g. NIS).  I found similar bugreport in MS KB298871, but it's
>marked as WinCE only:
>
>http://support.microsoft.com/default.aspx?scid=kb;en-us;298871
>
>"If an application calls shutdown() to disable only sending from the
>socket, later attempts to read data sent to that socket will result in
>only portions of the data being received."
>
>
>Can somebody with Win2k box compile and run prog from my previous mail?
>I would like to know if it behaves incorrectly only on my system, or on
>Win2k in general:


I don't know if this answers the question or not but it works fine for
me on W2K SP3 (Cygwin 1.5.9 yada, yada)...



--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04  2:55     ` Larry Hall
@ 2004-05-04  9:27       ` Dave Korn
  2004-05-04 10:00         ` Keith Moore
  2004-05-05  0:35         ` shutdown( socket, SHUT_WR ) - unexpected behaviour Jacek Trzmiel
  0 siblings, 2 replies; 11+ messages in thread
From: Dave Korn @ 2004-05-04  9:27 UTC (permalink / raw)
  To: 'Cygwin List'

> -----Original Message-----
> From: cygwin-owner On Behalf Of Larry Hall
> Sent: 04 May 2004 03:51

> At 10:19 PM 5/3/2004, you wrote:
> 

> >Can somebody with Win2k box compile and run prog from my 
> previous mail?
> >I would like to know if it behaves incorrectly only on my 
> system, or on
> >Win2k in general:
> 
> 
> I don't know if this answers the question or not but it works fine for
> me on W2K SP3 (Cygwin 1.5.9 yada, yada)...
> 


WFM too on WXPproSP1, cyg-1.5.7.  I wonder if your server is somehow
responsible.  What happens if you add a connection header, like this:

const char *MESSAGE = "GET / HTTP/1.0\r\nConnection: keep-alive\r\n\r\n";

Just kind of wondering if the apache is prematurely dropping the line when
it sees the FIN.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04  9:27       ` Dave Korn
@ 2004-05-04 10:00         ` Keith Moore
  2004-05-05  0:40           ` Jacek Trzmiel
  2004-05-05  2:05           ` shutdown( socket, SHUT_WR ) - unexpected behaviour - RESOLVED Jacek Trzmiel
  2004-05-05  0:35         ` shutdown( socket, SHUT_WR ) - unexpected behaviour Jacek Trzmiel
  1 sibling, 2 replies; 11+ messages in thread
From: Keith Moore @ 2004-05-04 10:00 UTC (permalink / raw)
  To: 'Cygwin List'

Dave Korn wrote:

> Just kind of wondering if the apache is prematurely dropping the line when
> it sees the FIN.

Possible, but I suspect it's a problem on Jacek's machine.

Jacek: Win2K SP2 is pretty ancient. Is it possible to try this on a 
later SP? (SP4 is the latest, and there have been numerous hotfixes 
since it was released.)

If upgrading is not feasible, would it be possible for you to capture 
the actual on-the-wire network traffic? That would absolutely pinpoint 
the guilty culprit.


KM


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04  2:19   ` Jacek Trzmiel
  2004-05-04  2:55     ` Larry Hall
@ 2004-05-04 12:37     ` Hannu E K Nevalainen
  2004-05-05  0:42       ` Jacek Trzmiel
  1 sibling, 1 reply; 11+ messages in thread
From: Hannu E K Nevalainen @ 2004-05-04 12:37 UTC (permalink / raw)
  To: ML CygWIN

> From: Jacek Trzmiel
> Sent: Tuesday, May 04, 2004 4:19 AM


> Can somebody with Win2k box compile and run prog from my previous mail?
> I would like to know if it behaves incorrectly only on my system, or on
> Win2k in general:
>
> http://cygwin.com/ml/cygwin/2004-05/msg00013.html
>
> $ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
> No output will mean that shutdown bug is present.

$ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
HTTP/1.1 200 OK
Date: Tue, 04 May 2004 14:02:39 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
ETag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Content-Length: 438
Connection: close
Content-Type: text/html

<HTML>
<HEAD>
  <TITLE>Example Web Page</TITLE>
</HEAD>
<body>
<p>You have reached this web page by typing &quot;example.com&quot;,
&quot;example.net&quot;,
  or &quot;example.org&quot; into your web browser.</p>
<p>These domain names are reserved for use in documentation and are not
available
  for registration. See <a
href="http://www.rfc-editor.org/rfc/rfc2606.txt">RFC
  2606</a>, Section 3.</p>
</BODY>
</HTML>

$ uname -a
CYGWIN_NT-5.0 P450 1.5.10s(0.114/4/2) 20040420 11:21:06 i686 unknown unknown
Cygwin

That is: 1.5.9-1, recently updated but still with the 20040420 snapshot dll.
Running on Win 2K advanced server, SP4 plus updates.


/Hannu E K Nevalainen, B.Sc. EE - 59+16.37'N, 17+12.60'E

** on a mailing list; please keep replies on that particular list **

-- printf("LocalTime: UTC+%02d\n",(DST)? 2:1); --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04  9:27       ` Dave Korn
  2004-05-04 10:00         ` Keith Moore
@ 2004-05-05  0:35         ` Jacek Trzmiel
  1 sibling, 0 replies; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-05  0:35 UTC (permalink / raw)
  To: 'Cygwin List'


Hi Dave,

> Just kind of wondering if the apache is prematurely dropping the line when
> it sees the FIN.

No it doesn't.  Here is dump when connecting to example.org:

> 01:14:34.237976 win2k.3042 > example.org.80: S 3273603871:3273603871(0) win 16384 <mss 1460,nop,nop,sackOK> (DF)
> 01:14:34.423719 example.org.80 > win2k.3042: S 3414317864:3414317864(0) ack 3273603872 win 5840 <mss 1460,nop,nop,sackOK> (DF)
> 01:14:34.423843 win2k.3042 > example.org.80: . ack 1 win 17520 (DF)
> 01:14:34.423935 win2k.3042 > example.org.80: P 1:19(18) ack 1 win 17520 (DF)
> 01:14:34.424017 win2k.3042 > example.org.80: F 19:19(0) ack 1 win 17520 (DF)
> 01:14:34.612657 example.org.80 > win2k.3042: . ack 19 win 5840 (DF)
> 01:14:34.613410 example.org.80 > win2k.3042: F 703:703(0) ack 19 win 5840 (DF)
> 01:14:34.613539 win2k.3042 > example.org.80: . ack 1 win 17520 <nop,nop,sack sack 1 {703:704} > (DF)
> 01:14:34.616794 example.org.80 > win2k.3042: P 1:703(702) ack 19 win 5840 (DF)
> 01:14:34.617027 win2k.3042 > example.org.80: R 3273603891:3273603891(0) win 0 (DF)
> 01:14:34.617331 example.org.80 > win2k.3042: . ack 20 win 5840 (DF)
> 01:14:34.617435 win2k.3042 > example.org.80: R 3273603891:3273603891(0) win 0

Hmm, FIN is sent before actual data, but this should be handled by TCP
stack witout problems (sequence numbers are ok).

And here is one when connecting to google.com:

> 01:19:00.639216 win2k.3064 > google.com.80: S 4253018133:4253018133(0) win 16384 <mss 1460,nop,nop,sackOK> (DF)
> 01:19:00.748937 google.com.80 > win2k.3064: S 1190391422:1190391422(0) ack 4253018134 win 8190 <mss 1460>
> 01:19:00.749137 win2k.3064 > google.com.80: . ack 1 win 17520 (DF)
> 01:19:00.749239 win2k.3064 > google.com.80: P 1:19(18) ack 1 win 17520 (DF)
> 01:19:00.749324 win2k.3064 > google.com.80: F 19:19(0) ack 1 win 17520 (DF)
> 01:19:00.868893 google.com.80 > win2k.3064: P 1:592(591) ack 20 win 31460
> 01:19:00.869221 win2k.3064 > google.com.80: R 4253018153:4253018153(0) win 0 (DF)

In both cases http reply is sent by server, but client answers with RST
instead of ACK.


For reference here are dumps generated by running the same code on
FreeBSD box:

> 01:23:47.548080 bsd.49159 > example.org.80: S 2808270330:2808270330(0) win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 383076 0> (DF)
> 01:23:47.739494 example.org.80 > bsd.49159: S 3999683607:3999683607(0) ack 2808270331 win 5792 <mss 1460,nop,nop,timestamp 11166371 383076,nop,wscale 0> (DF)
> 01:23:47.739559 bsd.49159 > example.org.80: . ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.739631 bsd.49159 > example.org.80: P 1:19(18) ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.739647 bsd.49159 > example.org.80: F 19:19(0) ack 1 win 33304 <nop,nop,timestamp 383095 11166371> (DF)
> 01:23:47.926501 example.org.80 > bsd.49159: . ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.927939 example.org.80 > bsd.49159: F 703:703(0) ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.927980 bsd.49159 > example.org.80: F 19:19(0) ack 1 win 33304 <nop,nop,timestamp 383114 11166468> (DF)
> 01:23:47.931289 example.org.80 > bsd.49159: P 1:703(702) ack 19 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:47.931318 bsd.49159 > example.org.80: F 19:19(0) ack 704 win 32953 <nop,nop,timestamp 383114 11166468> (DF)
> 01:23:47.934490 example.org.80 > bsd.49159: . ack 20 win 5792 <nop,nop,timestamp 11166468 383095> (DF)
> 01:23:48.122954 example.org.80 > bsd.49159: . ack 20 win 5792 <nop,nop,timestamp 11166569 383114> (DF)


> 01:25:41.588049 bsd.49161 > google.com.80: S 2950247753:2950247753(0) win 65535 <mss 1460,nop,wscale 1,nop,nop,timestamp 562478 0> (DF)
> 01:25:41.725996 google.com.80 > bsd.49161: S 1587602094:1587602094(0) ack 2950247754 win 8190 <mss 1460>
> 01:25:41.726052 bsd.49161 > google.com.80: . ack 1 win 65535 (DF)
> 01:25:41.726122 bsd.49161 > google.com.80: P 1:19(18) ack 1 win 65535 (DF)
> 01:25:41.726144 bsd.49161 > google.com.80: F 19:19(0) ack 1 win 65535 (DF)
> 01:25:41.847393 google.com.80 > bsd.49161: P 1:592(591) ack 20 win 31460
> 01:25:41.941043 bsd.49161 > google.com.80: . ack 592 win 65535 (DF)
> 01:25:42.054825 google.com.80 > bsd.49161: F 592:592(0) ack 20 win 31460
> 01:25:42.054863 bsd.49161 > google.com.80: . ack 593 win 65534 (DF)

Regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04 10:00         ` Keith Moore
@ 2004-05-05  0:40           ` Jacek Trzmiel
  2004-05-05  2:05           ` shutdown( socket, SHUT_WR ) - unexpected behaviour - RESOLVED Jacek Trzmiel
  1 sibling, 0 replies; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-05  0:40 UTC (permalink / raw)
  To: 'Cygwin List'


Hi,

> > Just kind of wondering if the apache is prematurely dropping the line when
> > it sees the FIN.
> 
> Possible, but I suspect it's a problem on Jacek's machine.

Yep, that's most likely.


> Jacek: Win2K SP2 is pretty ancient. Is it possible to try this on a
> later SP? (SP4 is the latest, and there have been numerous hotfixes
> since it was released.)

I'll try with SP4 later today.


> If upgrading is not feasible, would it be possible for you to capture
> the actual on-the-wire network traffic? That would absolutely pinpoint
> the guilty culprit.

In my other mail: http://cygwin.com/ml/cygwin/2004-05/msg00125.html


Best regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour
  2004-05-04 12:37     ` Hannu E K Nevalainen
@ 2004-05-05  0:42       ` Jacek Trzmiel
  0 siblings, 0 replies; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-05  0:42 UTC (permalink / raw)
  Cc: ML CygWIN


Hannu E K Nevalainen wrote:
> $ g++ ShutdownTest.cpp -o ShutdownTest && ./ShutdownTest.exe
> HTTP/1.1 200 OK
> Date: Tue, 04 May 2004 14:02:39 GMT
> Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux)
> Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
[...]
> 
> $ uname -a
> CYGWIN_NT-5.0 P450 1.5.10s(0.114/4/2) 20040420 11:21:06 i686 unknown unknown
> Cygwin
> 
> That is: 1.5.9-1, recently updated but still with the 20040420 snapshot dll.
> Running on Win 2K advanced server, SP4 plus updates.

Thanks for help.

Best regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: shutdown( socket, SHUT_WR ) - unexpected behaviour - RESOLVED
  2004-05-04 10:00         ` Keith Moore
  2004-05-05  0:40           ` Jacek Trzmiel
@ 2004-05-05  2:05           ` Jacek Trzmiel
  1 sibling, 0 replies; 11+ messages in thread
From: Jacek Trzmiel @ 2004-05-05  2:05 UTC (permalink / raw)
  To: 'Cygwin List'


> Possible, but I suspect it's a problem on Jacek's machine.
> 
> Jacek: Win2K SP2 is pretty ancient. Is it possible to try this on a
> later SP? (SP4 is the latest, and there have been numerous hotfixes
> since it was released.)

I've installed SP4 (had most of hotfixes already) but it didn't fix
problem.

However I found source of bug.  Norton Internet Security was messing
with sockets.  Removing NIS related entries in
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\ and rebooting did
solve problem.  So, bye bye NIS, will have to tighten ifpw instead.

Thanks all for help.

Best regards,
Jacek.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-05-05  2:05 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-01 22:07 shutdown( socket, SHUT_WR ) - unexpected behaviour Jacek Trzmiel
2004-05-03 11:44 ` Corinna Vinschen
2004-05-04  2:19   ` Jacek Trzmiel
2004-05-04  2:55     ` Larry Hall
2004-05-04  9:27       ` Dave Korn
2004-05-04 10:00         ` Keith Moore
2004-05-05  0:40           ` Jacek Trzmiel
2004-05-05  2:05           ` shutdown( socket, SHUT_WR ) - unexpected behaviour - RESOLVED Jacek Trzmiel
2004-05-05  0:35         ` shutdown( socket, SHUT_WR ) - unexpected behaviour Jacek Trzmiel
2004-05-04 12:37     ` Hannu E K Nevalainen
2004-05-05  0:42       ` Jacek Trzmiel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).