[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
something found about the router's segfault
Hi,
I found an interesting thing about the router process dying:
It seems that the router only segfaults if the message file is
owned by root; if I chown the message file to non-root, the
router doesn't die (even if I run router as root). But I haven't
look at why this is so.
I'm attaching a piece of mail that will cause the router to
segfault, and some suboptimal patch that will make the router
not segfault when given the offending piece of mail. Perhaps
some of you might be able to spot what is wrong with the router.
Also, when the patch is applied, the router will report
[xxxxx] Malformed sender
[xxxxx] Malformed (missing) sender privilege data!
[xxxxx] Malformed sender
[xxxxx] Malformed (missing) sender privilege data!
and the mail will be deferred. Other mail seems to go through
fine. (Sorry about the false report of missing mail.)
(I had tried to change the cadr macro to check for a NULL
pointer, but it turns out that I can't do this, as these
macros must be lvalues ^^;)
--------- cut here ----------- 8< ------------------------------
--- ./include/listutils.h.dist Thu Feb 15 20:12:30 2001
+++ ./include/listutils.h Mon Nov 26 15:29:51 2001
@@ -101,6 +101,8 @@
#define grindef(T,L) (fprintf(stderr, T), s_grind(L,stderr), putc('\n', stderr))
+#define NIL ncons(NULL)
+
/*
* These macros make it easier to maintain the illusion of dealing with lists.
*/
@@ -130,8 +132,13 @@
#if defined(__GNUC__) && !defined(PROFILING) && defined(__OPTIMIZE__)
EXTINLINE conscell *copycell(conscell *X) {
- conscell *tmp = newcell();
- *tmp = *X;
+ conscell *tmp;
+ if (X) {
+ tmp = newcell();
+ *tmp = *X;
+ } else {
+ tmp = NIL;
+ }
if (STRING(tmp)) {
tmp->string = dupnstr(tmp->cstring,tmp->slen);
/* Copycell does *NOT* preserve other string flags,
@@ -207,7 +214,13 @@
#else /* Not optimizing; no inlines.. */
#define copycell(X) \
-({conscell *_tmp = newcell(); *_tmp = *(X); \
+({conscell *_tmp; \
+ if (X) { \
+ _tmp = newcell(); \
+ *_tmp = *(X); \
+ } else { \
+ _tmp = NIL; \
+ } \
if (STRING(_tmp)) { \
_tmp->string = dupnstr(_tmp->cstring,_tmp->slen); \
/* Copycell does *NOT* preserve other string flags, \
@@ -252,8 +265,6 @@
#endif
#endif /* .... not profiling .... */
-
-#define NIL ncons(NULL)
/* listutils.c */
#ifdef MALLOC_TRACE
--- ./libsh/listmalloc.c.dist Wed Dec 29 14:37:16 1999
+++ ./libsh/listmalloc.c Mon Nov 26 15:32:08 2001
@@ -533,8 +533,13 @@
conscell *copycell(X)
conscell *X;
{
- conscell *tmp = newcell();
- *tmp = *X;
+ conscell *tmp;
+ if (X) {
+ tmp = newcell();
+ *tmp = *X;
+ } else {
+ tmp = NIL;
+ }
if (STRING(tmp)) {
tmp->string = dupnstr(tmp->string, tmp->slen);
/* Copycell does *NOT* preserve other string flags, caller
--- ./router/rfc822.c.dist Tue Oct 23 16:41:17 2001
+++ ./router/rfc822.c Mon Nov 26 15:40:36 2001
@@ -2629,7 +2629,7 @@
if (STRING(info))
info = v_find(info->string);
- if (!info) return NULL;
+ if (!info || !car(info)) return NULL;
for (x = cadr(info); x != NULL; x = cddr(x)) {
if (!STRING(x))
--------- cut here ----------- 8< ------------------------------
--------- cut here ----------- 8< ------------------------------
external
rcvdfrom n13.groups.yahoo.com ([IPv6:::ffff:216.115.96.63]:18797 "HELO n13.groups.yahoo.com")
comment n13.groups.yahoo.com [IPv6:::ffff:216.115.96.63]:18797 "HELO n13.groups.yahoo.com" smtp-auth: <none> TLS-CIPHER: <none> TLS-PEER: <none>)
with SMTP
identinfo TIMEDOUT
from <sentto-2811607-901-1006766011-acli=cccgt.dyn.dhs.org@returns.groups.yahoo.com>
todsn NOTIFY=FAILURE,DELAY ORCPT=rfc822;acli@cccgt.dyn.dhs.org INRCPT=rfc822;acli@cccgt.dyn.dhs.org INFROM=rfc822;sentto-2811607-901-1006766011-acli+3Dcccgt.dyn.dhs.org@returns.groups.yahoo.com
to <acli@cccgt.dyn.dhs.org>
env-end
X-eGroups-Return: sentto-2811607-901-1006766011-acli=cccgt.dyn.dhs.org@returns.groups.yahoo.com
Received: from [10.1.4.55] by n13.groups.yahoo.com with NNFMP; 26 Nov 2001 09:07:08 -0000
X-Sender: terminator@nofear.co.za
X-Apparently-To: nmis_users@yahoogroups.com
Received: (EGP: mail-8_0_0_1); 26 Nov 2001 09:13:19 -0000
Received: (qmail 68335 invoked from network); 26 Nov 2001 09:13:19 -0000
Received: from unknown (216.115.97.171)
by m11.grp.snv.yahoo.com with QMQP; 26 Nov 2001 09:13:19 -0000
Received: from unknown (HELO n25.groups.yahoo.com) (216.115.96.75)
by mta3.grp.snv.yahoo.com with SMTP; 26 Nov 2001 09:13:18 -0000
X-eGroups-Return: terminator@nofear.co.za
Received: from [10.1.10.33] by n25.groups.yahoo.com with NNFMP; 26 Nov 2001 09:12:46 -0000
To: nmis_users@yahoogroups.com
Message-ID: <9tt13d+pi8l@eGroups.com>
In-Reply-To: <OLEJLGMIDHHBJDILBNOAKEACCCAA.keith@sinclair.org.au>
User-Agent: eGroups-EW/0.82
X-Mailer: eGroups Message Poster
X-Originating-IP: 209.212.110.35
From: terminator@nofear.co.za
X-Yahoo-Profile: termin8her
MIME-Version: 1.0
Mailing-List: list nmis_users@yahoogroups.com; contact nmis_users-owner@yahoogroups.com
Delivered-To: mailing list nmis_users@yahoogroups.com
Precedence: bulk
List-Unsubscribe: <mailto:nmis_users-unsubscribe@yahoogroups.com>
Date: Mon, 26 Nov 2001 09:13:17 -0000
Reply-To: nmis_users@yahoogroups.com
Subject: [nmis_users] Re: Reply to "Hello" RE seperate user auth
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Would be great. Nice to be able to track where these "approved"
patches are going prior to new release.
Regards,
Lynton
--- In nmis_users@y..., "Keith Sinclair" <keith@s...> wrote:
> I have been collecting peoples patches, I might add a new section to
the
> NMIS site with all the patches and then finally release in 2.1 when
I get a
> chance.
>=20
> How does that sound? I.e. http://www.sins.com.au/nmis/patches.html
(not
> live yet, and some of these are in the todo.html page)
>=20
>=20
> Regards
>=20
>=20
> Keith
>=20
> -----Original Message-----
> From: Andrey Kostin [mailto:ankost@o...]
> Sent: Friday, November 23, 2001 2:39 AM
> To: nmis_users@y...
> Subject: Re: [nmis_users] Re: Reply to "Hello" RE seperate user auth
>=20
> I've seen multi-thread only in to do section only, is this feature
already
> implemented? Info about this patch could be very useful ;)
> ---------------
> Andrey Kostin ankost@o... +7-095-956-4951 ANKOST-RIPN
> East Connection ISP, Moscow, Russia. http://www.east.ru
>=20
>=20
> ----- Original Message -----
> From: <terminator@n...>
> To: <nmis_users@y...>
> Sent: 23 =CE=CF=D1=C2=D2=D1 2001 =C7. 13:33
> Subject: [nmis_users] Re: Reply to "Hello" RE seperate user auth
>=20
>=20
> We monitor 222 nodes on a 400 Celeron with 256 Mb of RAM.
>=20
> If you plan on using the mult-thread patch without the waits on the
> SNMP gets you might want some more RAM (I have done a tiny add to
the
> multithread to pause befor spawning the next thread to try and save
on
> bandwidth).
>=20
> The distribution we used for this was Slakware 8 but I have done
tests
> on RedHat 7.x and it works fine.
>=20
> Regards,
>=20
> Lynton
>=20
> --- In nmis_users@y..., "Andrey Kostin" <ankost@o...> wrote:
> > IMHO this system would be very useful.
> > Another question is about performance and CPU load. Is there any
> experience
> > about minimum CPU and disk needed for example for 100-200 nodes?
> > ---------------
> > Andrey Kostin ankost@o... +7-095-956-4951 ANKOST-RIPN
> > East Connection ISP, Moscow, Russia. http://www.east.ru
> >
> > ----- Original Message -----
> > From: <terminator@n...>
> > To: <nmis_users@y...>
> > Sent: 23 IINAON 2001 C. 10:05
> > Subject: [nmis_users] Reply to "Hello" RE seperate user auth
> >
> >
> > > I have written a small web based admin system for NMIS whereby
> > > individual groups can be given individual logins and views.
> > >
> > > In our enviroment we needed to be able to have one group login
and
> > > only see their stats etc.
> > >
> > > It works by having a template for the nmiscgi.pl script and
> creates a
> > > user directory and scripts to extract the data only for that
> group.
> > >
> > > I have now been working on a file upload (a csv to be exact)
that
> you
> > > will be able to update your nodes by uploading the file and
having
> a
> > > web button to press and make the changes live.
> > >
> > > Since what I have done is all alpha type stuff I didn't really
> want to
> > > make a fool of myself and offer it to the users until I felt the
> code
> > > was clean enough.
> > >
> > > If anybody wants to have a look at what is there now I will make
a
> > > couple of small mods and send it on.
> > >
> > > Regards,
> > >
> > > Lynton
> > >
> > >
> > >
> > > To unsubscribe from this group, send an email to:
> > > nmis_users-unsubscribe@y...
> > >
> > >
> > >
> > > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> > >
> > >
>=20
>=20
>=20
> To unsubscribe from this group, send an email to:
> nmis_users-unsubscribe@y...
>=20
>=20
>=20
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>=20
>=20
>=20
>=20
>=20
> To unsubscribe from this group, send an email to:
> nmis_users-unsubscribe@y...
>=20
>=20
>=20
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/1_Y1qC/MkNDAA/ySSFAA/26EolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
nmis_users-unsubscribe@yahoogroups.com
=20
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/=20
--------- cut here ----------- 8< ------------------------------
Best regards,
--
Ambrose Li <acli@ada.dhs.org> http://trends.ca/~acli/
http://www.wykontario.org/ http://www.cccgt.org/
"What's going to happen in the future if we allow corporate profits
to prevail above all other concerns?" - Timothy Findley
Please also visit: http://www.afcvancouver.org/
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi