🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Ishikawa,Chiaki,remove No Spam f... Mon, 17 Jan 2000 00:00
sparc11:0 cxnsleep can't read response : Error 0
#43432
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Mon, 17 Jan 2000 00:00
48 lines
2608 bytes
Hi,

I have installed inn-2.2.2 available from http://www.isc.org at the
end of December last year. We had used 1.5.1sec2 for quite some time
before.

After installing inn-2.2.2, we have had a few configuration quirks
since the configuration changed quite a bit from 1.5.1sec2 to 2.2.2,
but so far we have managed to run inn 2.2.2 successfully.
We have been receiving news articles from our ISP newsfeed host, and
our posts go outside. 

So far, so good.

However, there is one problem, which seems to be non-fatal, but still
annoying.

In the log file, we see lines like the following every 2.5 minutes or
so now.

Jan 16 20:37:37 sparc20 innfeed[24437]: sparc11:0 cxnsleep can't read response : Error 0

sparc11 is the gateway machine via which the newsfeed from us,
essentially the sporadic posts to Usent, go out.  

As I mentioned, the postings from local site do go outside and so I
don't think there is a serious problem. However, above message makes
me nervous. Problem is that Error value is 0 and it looks to me that
the warning should not be
reported at all(!?).

under inn-2.2.2/innfeed:
msgs.h:#define RESPONSE_READ_FAILED    "%s:%d cxnsleep can't read response : %m"

connection.c:1511:      syslog (LOG_ERR, RESPONSE_READ_FAILED, peerName, cxn->ident) ;
connection.c:1640:      syslog (LOG_ERR, RESPONSE_READ_FAILED, peerName, cxn->ident) ;

Does anyone know what the cause of the problem might be?

TIA
-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Re: sparc11:0 cxnsleep can't read response : Error 0
#43457
Author: Russ Allbery
Date: Mon, 17 Jan 2000 00:00
18 lines
1539 bytes
Ishikawa, Chiaki writes:

> BTW, I searched "inn cxnsleep" via www.google.com, www.deja.com,
> etc. and found at least one person with the same problem who posted a
> query last year. There was no follow-up. Also, I saw someone mention
> that "Error 0" can be safely ignored...

Assuming it's the same reason why INN occasionally gets readclose errors,
it's due to using O_NDELAY instead of O_NONBLOCK as the way to set the
socket non-blocking; that will cause read to occasionally return 0 even
when the connection hasn't been closed.  There are other various
possibilities.  I'm inclined to suspect something of that sort, but don't
have a good solution to fix it.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Re: sparc11:0 cxnsleep can't read response : Error 0
#43468
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Tue, 18 Jan 2000 00:00
38 lines
2491 bytes
>>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:

> Assuming it's the same reason why INN occasionally gets readclose errors,
> it's due to using O_NDELAY instead of O_NONBLOCK as the way to set the
> socket non-blocking; that will cause read to occasionally return 0 even
> when the connection hasn't been closed.  There are other various
> possibilities.  I'm inclined to suspect something of that sort, but don't
> have a good solution to fix it.

I checked the source and found the reference to
O_NDELAY in 
inn-2.2.2/lib/nonblocking.c:

>#if	!defined(FNDELAY)
>#define FNDELAY		O_NDELAY
>#endif	/* !defined(FNDELAY) */

Later in the same file, FNDELAY is later used in setting mode (3rd)
argument to fcntl.

It looks that the warning lines I see look
innocent, but the underlying cause is rather hairy and
as you suggest, very difficult to fix.
(My first thought was to check the error return value and stop the
warning message line if the error value is 0. This simply gets rid of
the lines instead of fixing the root cause of the problem.)


Again, I will let the system run and report any new findings on this.


-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Re: sparc11:0 cxnsleep can't read response : Error 0
#43484
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Tue, 18 Jan 2000 00:00
28 lines
1861 bytes
Thank you Kondou-san,

>} Jan 16 20:37:37 sparc20 innfeed[24437]: sparc11:0 cxnsleep can't read response : Error 0
>
>For some Unix boxes, this may happen when the
>peer is not unreachable.

The local server itself runs on SunOS 4.1.4.

I will recheck our innfeed.conf.

BTW, I searched "inn cxnsleep" via www.google.com, www.deja.com,
etc. and found at least one person with the same problem who posted
a query last year. There was no follow-up. Also, I saw someone mention
that "Error 0" can be safely ignored...

I will post any more finding after I tinker the local setup again.

Thanks.

-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Re: sparc11:0 cxnsleep can't read response : Error 0
#43485
Author: Katsuhiro Kondou
Date: Tue, 18 Jan 2000 00:00
11 lines
1381 bytes
In article <nya9o7qmj.fsf@sparc18.personal-media.co.jp>,
	"Ishikawa,Chiaki,remove No Spam from the address"<ishikawa@personal-media.co.jp.NoSpam> wrote;

} Jan 16 20:37:37 sparc20 innfeed[24437]: sparc11:0 cxnsleep can't read response : Error 0

For some Unix boxes, this may happen when the
peer is not unreachable.
-- 
Katsuhiro Kondou

Re: sparc11:0 cxnsleep can't read response : Error 0
#43511
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Wed, 19 Jan 2000 00:00
57 lines
3070 bytes
    > /*
    > **  Only use fcntl if O_NONBLOCK is available; O_NDELAY is *not* the same
    > **  thing historically.  The semantics of O_NDELAY are that if the read
    > **  would block, it returns 0 instead.  This is indistinguishable from an
    > **  end of file condition.  POSIX added O_NONBLOCK, which requires read to
    > **  return -1 and set errno to EAGAIN, which is what we want.
    > **

Right on!
I added a syslog line to connection.c (inn-2.2.2) to find out what was 
going on and the innfeed was thinking that it obtained EOF condtion
after all.

>Jan 19 22:22:40 sparc20 innfeed[14264]: sparc11:0 cxnsleep can't read response : Error 0
>Jan 19 22:22:40 sparc20 innfeed[14264]: line=1672, i was IoEOF

(Line is the source code line number.)

Following is where the message was output.
/*
 * called when a response has been read from the socket. This is
 * where the bulk of the processing starts.
 */
static void responseIsRead (EndPoint e, IoStatus i, Buffer *b, void *d)
{
	... variable declarations and many ASSERTs omitted ...

  VALIDATE_CONNECTION (cxn) ;

  bufferAddNullByte (b [0]) ;

  peerName = hostPeerName (cxn->myHost) ;

  if (i != IoDone)
    {                           /* uh oh. */
      errno = endPointErrno (e) ;
      syslog (LOG_ERR, RESPONSE_READ_FAILED, peerName, cxn->ident) ;
      syslog (LOG_ERR, "line=%d, i was %s", __LINE__, int2iostatus(i));       /*CI*/

      freeBufferArray (b) ;


====

I will see if if I can retrofit your code into 2.2.2,
(The inn runs on SunOS 4.1.4, and so I am not entirely sure
if the patch would work.)

Happy Hacking.
-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Re: sparc11:0 cxnsleep can't read response : Error 0
#43531
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Wed, 19 Jan 2000 00:00
63 lines
4725 bytes
     > I will see if if I can retrofit your code into 2.2.2,
     > (The inn runs on SunOS 4.1.4, and so I am not entirely sure
     > if the patch would work.)

My previous post was a little premature.

I retrofitted the new non-blocking code by hard-wiring the
new blocking code in the innfeed directory only and tested
the new innfeed. (I made sure that O_NONBLOCK is used.)
However, "cxnsleep can't read response"  still appeared.
But there seems to be no ill-effect (assuming that
this post indeed goes out.)
From the PID written to syslog message file, it seems innfeed is 
not dying constantly anyway. (the same pid is reported for innfeed
message.).

So the particular problem I see must be a SunOS 4.1.4 thing.
(Early SunOS issue?)

Since the local site is a leaf node and not generating much 
too traffic, this message from innfeed is the only disturbing
warning I see.
Innd itself doesn't seem to suffer from the use of non-optimum
IOCTL/FNCTL setting.

========================================
Example log:

	...
Jan 19 22:55:55 sparc20 innfeed[17719]: sparc11:0 connected
Jan 19 22:55:55 sparc20 innfeed[17719]: sparc11 remote MODE STREAM
Jan 19 22:55:55 sparc20 innfeed[17719]: sparc11 final seconds 31 spooled 0 on_close 0 sleeping 0
Jan 19 22:57:55 sparc20 innfeed[17719]: sparc11:0 cxnsleep can't read response : Error 0
Jan 19 22:57:55 sparc20 innfeed[17719]: line=1672, i was IoEOF
Jan 19 22:57:55 sparc20 innfeed[17719]: sparc11 final seconds 120 offered 0 accepted 0 refused 0 rejected 0 missing 0 spooled 0 on_close 0 unspooled 0 deferred 0 requeued 0 queue 0.0/200:100,0,0,0,0,0
Jan 19 22:58:25 sparc20 innfeed[17719]: sparc11:0 connected
Jan 19 22:58:25 sparc20 innfeed[17719]: sparc11 remote MODE STREAM
Jan 19 22:58:25 sparc20 innfeed[17719]: sparc11 final seconds 30 spooled 0 on_close 0 sleeping 0
Jan 19 22:59:06 sparc20 nnrpd[16107]: sparc18.personal-media.co.jp group news.software.nntp 3
Jan 19 23:00:19 sparc20 innd: ME time 600551 idle 579789(496) artwrite 12490(113) artlink 2(19) hiswrite 175(281) hissync 30(29) sitesend 3488(255) artctrl 0(0) artcncl 0(0) hishave 171(398) hisgrep 0(0) perl 214(117)
Jan 19 23:00:19 sparc20 innd: sparc11.personal-media.co.jp connected 15 streaming allowed
Jan 19 23:00:19 sparc20 innd: sparc11.personal-media.co.jp:15 NCmode "mode stream" received
Jan 19 23:00:25 sparc20 innfeed[17719]: sparc11:0 cxnsleep can't read response : Error 0
Jan 19 23:00:27 sparc20 innfeed[17719]: line=1672, i was IoEOF
Jan 19 23:00:29 sparc20 innfeed[17719]: sparc11 final seconds 122 offered 0 accepted 0 refused 0 rejected 0 missing 0 spooled 0 on_close 0 unspooled 0 deferred 0 requeued 0 queue 0.0/200:100,0,0,0,0,0
Jan 19 23:00:42 sparc20 innd: sparc11.personal-media.co.jp:15 closed seconds 23 accepted 65 refused 0 rejected 0
Jan 19 23:00:55 sparc20 innfeed[17719]: ME articles active 0 bytes 0
Jan 19 23:00:55 sparc20 innfeed[17719]: ME articles total 1 bytes 1072
Jan 19 23:00:57 sparc20 innfeed[17719]: sparc11:0 connected
Jan 19 23:00:57 sparc20 innfeed[17719]: sparc11 remote MODE STREAM
Jan 19 23:00:57 sparc20 innfeed[17719]: sparc11 final seconds 30 spooled 0 on_close 0 sleeping 0
========================================


Happy Hacking
-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Re: sparc11:0 cxnsleep can't read response : Error 0
#43541
Author: Ishikawa,Chiaki,remove No Spam f...
Date: Thu, 20 Jan 2000 00:00
21 lines
1842 bytes
Hi,

I have decided to simply ignore the warning for now.
(This must be an OS issue.)

It turns out that the script to generate the daily report simply
ignores these lines. (The warning lines were picked up by
my own log scanner.)
So, ignoring them should be safe for now.

Thanks again for the guidance.

Happy Hacking,
-- 
     Ishikawa, Chiaki        ishikawa@personal-media.co.jp.NoSpam  or         
 (family name, given name) Chiaki.Ishikawa@personal-media.co.jp.NoSpam
    Personal Media Corp.      ** Remove .NoSpam at the end before use **     
  Shinagawa, Tokyo, Japan 142-0051

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads