Thread View: news.software.nntp
3 messages
3 total messages
Started by John Sletten
Tue, 02 Apr 1996 00:00
control messages hang ctlinnd
Author: John Sletten
Date: Tue, 02 Apr 1996 00:00
Date: Tue, 02 Apr 1996 00:00
19 lines
1021 bytes
1021 bytes
Hello My control.ctl file allows newgroup messages from certain sources to be performed automatically. These newgroup messages frequently result in ctlinnd hanging. A ps -ef will often show as many as 8 instances of ctlinnd newgroup processes, each process being many days old. I end up having to kill all these processes and create the groups manually. Is this a known problem ? Should ctlinnd newgroup only be run manually ? I would be grateful for any advice. John Sletten Oslo, Norway
Re: control messages hang ctlinnd
Author: Heiko W.Rupp
Date: Tue, 02 Apr 1996 00:00
Date: Tue, 02 Apr 1996 00:00
13 lines
1017 bytes
1017 bytes
In <4jqptl$naa@nic.ftns.no>, John Sletten wrote: :|These newgroup messages frequently result in ctlinnd hanging. A ps -ef :|will often show as many as 8 instances of ctlinnd newgroup processes, As always: What OS? Look at the FAQ - there are some tips about Unix domain sockets, that are used by ctlinnd. -- Heiko W.Rupp Gerwigstr.5 D-76131 Karlsruhe +49 721 9661524 In a Swiss mountain inn: Special today -- no ice cream.
Re: control messages hang ctlinnd
Author: Mike Bird
Date: Wed, 03 Apr 1996 00:00
Date: Wed, 03 Apr 1996 00:00
112 lines
3701 bytes
3701 bytes
John, try this patch ...
--Mike
===========================
Patch to prevent ctlinnd/expire etc messages being joined together
(and lost):
--- ../inn1.4unoff4/lib/inndcomm.c Thu Mar 18 13:04:36 1993
+++ lib/inndcomm.c Thu Mar 14 15:01:03 1996
@@ -169,7 +169,18 @@
/*
** Send an arbitrary command to the server.
+** Note that for those systems without Unix Domain Sockets,
+** the command format is different. There is a two byte
+** length code on the front of the message. This is a
+** direct mapped integer. Note that sending and receiving
+** architectures *must* be the same as we are on the same
+** machine.
*/
+#if defined(DO_HAVE_UNIX_DOMAIN)
+#define BUFF_OFFSET 0
+#else
+#define BUFF_OFFSET sizeof(ICC_MSGLENTYPE)
+#endif
int
ICCcommand(cmd, argv, replyp)
char cmd;
@@ -203,7 +214,7 @@
bufsiz += 1 + strlen(p);
if (bufsiz < MIN_BUFFER_SIZE)
bufsiz = MIN_BUFFER_SIZE;
- buff = malloc((unsigned int)bufsiz);
+ buff = malloc((unsigned int)bufsiz + BUFF_OFFSET);
if (buff == NULL) {
ICCfailure = "malloc";
return -1;
@@ -211,6 +222,8 @@
if (replyp)
*replyp = NULL;
+ buff += BUFF_OFFSET; /* Advance to leave space for length
*/
+
/* Format the message. */
(void)sprintf(buff, "%s%c%c", ICCsockname, SC_SEP, cmd);
for (p = buff + strlen(buff), i = 0; (q = argv[i]) != NULL; i++)
{
@@ -221,6 +234,10 @@
/* Send message. */
ICCfailure = NULL;
len = p - buff;
+
+ buff -= BUFF_OFFSET; /* Not strictly required - could be
inside
+ * #else clause below */
+
#if defined(DO_HAVE_UNIX_DOMAIN)
if (sendto(ICCfd, buff, len, 0,
(struct sockaddr *)&ICCserv, AF_UNIX_SOCKSIZE(ICCserv)) <
0) {
@@ -234,6 +251,8 @@
ICCfailure = "open";
return -1;
}
+ *(ICC_MSGLENTYPE *) buff = len;
+ len += BUFF_OFFSET;
if (write(fd, buff, len) != len) {
i = errno;
DISPOSE(buff);
--- ../inn1.4unoff4/innd/cc.c Thu Mar 18 13:04:22 1993
+++ innd/cc.c Thu Mar 14 15:00:21 1996
@@ -1314,6 +1314,7 @@
struct sockaddr_un client;
#else
int written;
+ ICC_MSGLENTYPE bufflen;
#endif /* defined(DO_HAVE_UNIX_DOMAIN) */
int i;
char buff[BUFSIZ + 2];
@@ -1329,7 +1330,21 @@
}
/* Get the message. */
+#if !defined(DO_HAVE_UNIX_DOMAIN)
+ i = RECVorREAD(CCchan->fd, (char *) &bufflen, sizeof(bufflen));
+ if (i != sizeof(bufflen)
+ || bufflen < 1 || bufflen >= (sizeof buff - 1)) {
+ syslog(L_ERROR, "%s cant recv CCreader length %m", LogName);
+ return;
+ }
+ i = RECVorREAD(CCchan->fd, buff, bufflen);
+ if (i > 0 && i != bufflen) {
+ syslog(L_ERROR, "%s cant recv CCreader data %m", LogName);
+ return;
+ }
+#else
i = RECVorREAD(CCchan->fd, buff, sizeof buff - 1);
+#endif
if (i < 0) {
syslog(L_ERROR, "%s cant recv CCreader %m", LogName);
return;
----------------------------------------------------------
Mike Bird Tel: 209-742-5000 FAX: 209-966-3177
President POP: 209-742-5333 NOC: 209-742-9979
Iron Mtn Systems http://www.ims.mariposa.ca.us/
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