tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Gavin Kreuiter <gavin () transactive ! usko ! com>
To: tru64-unix-managers
Subject: lsof and TCP can't read inpcb
Date: Tue, 27 Mar 2001 16:46:45 +0000	[thread overview]
Message-ID: <98571187202654.tru64-unix-managers.marc@archive.invalid> (raw)

Hi all

I found a similar question, but no summary.

While a local process is active, netstat and lsof show the info as follows
(names changed to protect the innocent):

$ netstat -aAn
 d619600   tcp        0      0  192.0.0.111.4930 192.0.0.222.6001
ESTABLISHED

$ lsof
COMMAND     PID     USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
switch     1208 swtchtst    3u  inet 0x0d619600      0t0  TCP
192.0.0.111:4930->192.0.0.222:6001 (ESTABLISHED)

This is during the connect.  Then, after attempting to write to the socket,
the local process traps on a SIGPIPE because the ... well, that is what I
want to know.

netstat shows no info, lsof returns:

COMMAND     PID     USER   FD   TYPE     DEVICE SIZE/OFF NODE NAME
switch     1208 swtchtst    3u  inet                  0t0    TCP can't read
inpcb at 0x00000000

My question is this: what has happened to the socket?  Obviously, the local
process has not closed the socket, because lsof still shows an open fd.
Does this mean that the remote system has (a) executed a shutdown(2) on the
socket, (b) closed the socket, (c) ... something else?

The reason I am confused is that I thought if the socket is closed from the
remote end, netstat should show a TIME_WAIT, CLOSE_WAIT or FIN_WAIT_2, not
just disappear.

TIA
Gavin

                 reply	other threads:[~2001-03-27 16:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox