[syslog-ng]syslog-ng dying randomly?

Balazs Scheidler bazsi@balabit.hu
Wed, 15 May 2002 10:20:45 +0200


On Wed, May 15, 2002 at 10:17:32AM +0200, Balazs Scheidler wrote:
> On Tue, May 14, 2002 at 08:40:23PM -0700, Jim Gifford wrote:
> > I have noticed this also with the version 1.5.17. I just thought it was my
> > setup.
> 
> hmm. then there must be another bad unref somewhere. Please apply the patch
> below, it hopefully catches the issue (it is NOT a fix, just an aid to catch
> the bug):

sorry to repeat myself, but this patch adds even more sanity checking:

Index: xalloc.c
===================================================================
RCS file: /var/cvs/libol/src/xalloc.c,v
retrieving revision 1.8
diff -u -r1.8 xalloc.c
--- xalloc.c	4 Feb 2000 19:02:04 -0000	1.8
+++ xalloc.c	15 May 2002 08:20:02 -0000
@@ -225,6 +225,8 @@
 #if 0
 	debug("ol_string_free: freeing %xi.\n", (void *) s);
 #endif
+	assert(((unsigned int) s->use_cnt) < 10);
+	assert(s->use_cnt);
 	if (--s->use_cnt == 0) {
 #ifdef DEBUG_ALLOC
 		if (s->header.magic != -1717)


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1