Date: Wed, 6 Oct 2004 08:50:25 GMT From: Chris Gabe <chris@borderware.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/72366: syslog overflow fix Message-ID: <200410060850.i968oPo6024698@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/72366; it has been noted by GNATS.
From: Chris Gabe <chris@borderware.com>
To: freebsd-gnats-submit@FreeBSD.org,
Chris Gabe <chris@borderware.com>
Cc:
Subject: Re: bin/72366: syslog overflow fix
Date: Wed, 6 Oct 2004 04:46:29 -0400
In my original description of how to reproduce, I didn't mention that
the syslog lines should include a loop counter to avoid the telescoping
of repeated lines. Here is a test program:
#include <sys/syslog.h>
main(argc, argv)
int argc;
char **argv;
{
char *name;
int i, maxi;
maxi = atoi(argv[1]);
name = (char *)strdup(argv[2]);
for (i=0; i<maxi; i++) {
syslog(LOG_INFO,"%s %d",name,i);
}
}
Invoke something like
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa &
test 1000 bbbbbbbbbbbbbbbbbbbbbbb
killall test
grep bbbbb /var/log/message | wc
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410060850.i968oPo6024698>
