problem experienced with ra client: unequal results
Peter Van Epp
vanepp at sfu.ca
Tue Jul 3 22:45:34 EDT 2007
On Wed, Jul 04, 2007 at 01:29:34AM +0000, real.melancon at videotron.ca wrote:
> Hello List,
>
> I use latest argus daemon as well as latest ra* clients.
>
<snip>
There look to be some bugs at the moment (and its not clear if they
are in argus or clients or both). There are some memory corruption problems
in argus (the latest code on the server has made them much better, but there
still seem to be some). This is the debug output from an ra client reading
from a remote sensor (with the addition of a debug statement to get errno
on the fault which indicates 2 "no such file" presumably meaning the socket
has closed for some reason):
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read 1460 bytes
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read 1460 bytes
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read 1460 bytes
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read 1460 bytes
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read 0 bytes
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) read returned 0
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusReadStreamSocket (0x1804000) errno 2
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusCloseInput(0x1804000) closing
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusWriteConnection: write(4, 0x7e994, 6)
ra3[18741.a000ed88]: 07-07-03 19:01:14 ArgusWriteConnection(0x1804000, 0x7e994, 6) returning 6
While this should mean that ra has exited, it doesn't ra still exists
it just isn't doing anything:
ps auxwwww | grep ra3
vanepp 18741 0.0 -0.1 31128 1716 p1- S 6:22PM 0:47.47 /usr/local/bin/ra3 -S 192.75.244.191:560 -n -D4 -w /var/log/argus/com_argus
Here is the addition to rc.45 common/argus_client.c that generated the
above errno value (with the hope that it tells Carter something :-)):
line 1665:
} else {
#ifdef ARGUSDEBUG
ArgusDebug (3, "ArgusReadStreamSocket (0x%x) read returned %d\n", input, cnt);
#endif
if ((cnt < 0) && ((errno == EAGAIN) || (errno == EINTR)))
retn = 0;
else {
#ifdef ARGUSDEBUG
ArgusDebug (3, "ArgusReadStreamSocket (0x%x) errno %d\n", input, errno);
#endif
retn = 1;
}
}
As a side issue here is a patch that corrects the routine name in some
of the sasl code from ArgusReadStreamSocket to ArgusReadSaslStreamSocket where
it actually is (although that isn't an issue here as sasl isn't on :-)).
Peter Van Epp / Operations and Technical Support
Simon Fraser University, Burnaby, B.C. Canada
*** common/argus_client.c.orig Tue Jul 3 13:11:28 2007
--- common/argus_client.c Tue Jul 3 13:14:05 2007
***************
*** 190,196 ****
if (input->ArgusReadSocketCnt >= length)
rec = (struct ArgusRecord *) ArgusConvertRecord (input, (char *)input->ArgusReadPtr);
} else {
! ArgusLog (LOG_ALERT, "ArgusReadStreamSocket (0x%x) record length is zero");
if (ArgusParser->Sflag) {
ArgusWriteConnection (parser, input, (u_char *)"DONE: ", strlen("DONE: "));
}
--- 190,196 ----
if (input->ArgusReadSocketCnt >= length)
rec = (struct ArgusRecord *) ArgusConvertRecord (input, (char *)input->ArgusReadPtr);
} else {
! ArgusLog (LOG_ALERT, "ArgusReadSaslStreamSocket (0x%x) record length is zero");
if (ArgusParser->Sflag) {
ArgusWriteConnection (parser, input, (u_char *)"DONE: ", strlen("DONE: "));
}
***************
*** 206,212 ****
if (input->ArgusReadSocketCnt >= length)
rec = (struct ArgusRecord *) input->ArgusReadPtr;
} else {
! ArgusLog (LOG_ALERT, "ArgusReadStreamSocket (0x%x) record length is zero");
if (ArgusParser->Sflag) {
ArgusWriteConnection (parser, input, (u_char *)"DONE: ", strlen("DONE: "));
}
--- 206,212 ----
if (input->ArgusReadSocketCnt >= length)
rec = (struct ArgusRecord *) input->ArgusReadPtr;
} else {
! ArgusLog (LOG_ALERT, "ArgusReadSaslStreamSocket (0x%x) record length is zero");
if (ArgusParser->Sflag) {
ArgusWriteConnection (parser, input, (u_char *)"DONE: ", strlen("DONE: "));
}
More information about the argus
mailing list