Mailing List Archive

rsyslog 1.20.1 released
Hi all,

I have just released rsyslog 1.20.1. It primarily contains bug fixes: a
memory leak in regard to PostgreSQL date formatting and a potential race
condition within repeated message processing have been fixed. Also,
there are new runtime options to harden ACL processing when DNS is not
ready while rsyslogd start up. There are also some minor changes and
clean-ups. Version 1.20.1 is recommended to anyone using previous
releases. Users of PostgreSQL are urged to update to this version.

Download:
http://www.rsyslog.com/Downloads-req-getit-lid-66.phtml

Changelog:
http://www.rsyslog.com/Article147.phtml

You may want to watch my blog for upcoming developments:
http://rgerhards.blogspot.com. There was recently a lot of activity and
more is expected.

As always, feedback is appreciated.
Rainer Gerhards
rsyslog 1.20.1 released [ In reply to ]
2007/12/12, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> Hi all,
>
> I have just released rsyslog 1.20.1. It primarily contains bug fixes: a

1.20.1 unfortunately fails to compile (unless you use --enable-debug):
gcc -g -O2 -W -Wall -Wformat-security -Wshadow -Wcast-align
-Wpointer-arith -Wmissing-format-attribute -g -o rsyslogd
rsyslogd-syslogd.o rsyslogd-pidfile.o rsyslogd-template.o
rsyslogd-outchannel.o rsyslogd-stringbuf.o rsyslogd-srUtils.o
rsyslogd-parse.o rsyslogd-sync.o rsyslogd-net.o rsyslogd-msg.o
rsyslogd-expr.o rsyslogd-omshell.o rsyslogd-omusrmsg.o
rsyslogd-omfwd.o rsyslogd-tcpsyslog.o rsyslogd-omfile.o
rsyslogd-omdiscard.o rsyslogd-modules.o rsyslogd-objomsr.o
rsyslogd-cfsysline.o rsyslogd-linkedlist.o rsyslogd-iminternal.o
rsyslogd-action.o rsyslogd-gss-misc.o -Wl,--export-dynamic -lz
-lpthread -ldl -lrt
rsyslogd-syslogd.o: In function `domarkActions':
/home/michael/cvs/rsyslog/build/../syslogd.c:3431: undefined reference
to `lockObj'
/home/michael/cvs/rsyslog/build/../syslogd.c:3439: undefined reference
to `unlockObj'
rsyslogd-syslogd.o: In function `callAction':
/home/michael/cvs/rsyslog/build/../syslogd.c:2442: undefined reference
to `lockObj'
/home/michael/cvs/rsyslog/build/../syslogd.c:2508: undefined reference
to `unlockObj'
/home/michael/cvs/rsyslog/build/../syslogd.c:2508: undefined reference
to `unlockObj'
collect2: ld returned 1 exit status
make[2]: *** [rsyslogd] Fehler 1
make[2]: Leaving directory `/home/michael/cvs/rsyslog/build'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/michael/cvs/rsyslog/build'
make: *** [all] Fehler 2


sync.h declares lockObj/unlockObj, but sync.c only has these symbols
if compiled without NDEBUG.

Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
rsyslog 1.20.1 released [ In reply to ]
On Wed, Dec 12, 2007 at 07:11:55PM +0100, Michael Biebl wrote:
> 2007/12/12, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> > Hi all,
> >
> > I have just released rsyslog 1.20.1. It primarily contains bug fixes: a
>
> sync.h declares lockObj/unlockObj, but sync.c only has these symbols
> if compiled without NDEBUG.

Try including config.h in sync.h
rsyslog 1.20.1 released [ In reply to ]
2007/12/12, Andrew Pantyukhin <infofarmer at freebsd.org>:
> On Wed, Dec 12, 2007 at 07:11:55PM +0100, Michael Biebl wrote:
> > 2007/12/12, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> > > Hi all,
> > >
> > > I have just released rsyslog 1.20.1. It primarily contains bug fixes: a
> >
> > sync.h declares lockObj/unlockObj, but sync.c only has these symbols
> > if compiled without NDEBUG.
>
> Try including config.h in sync.h
>

No difference.

The other header files (using NDEBUG) don't include config.h either btw.
The rely on the c file, which includes them, to include config.h.

Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
rsyslog 1.20.1 released [ In reply to ]
2007/12/12, Michael Biebl <mbiebl at gmail.com>:
> 2007/12/12, Andrew Pantyukhin <infofarmer at freebsd.org>:
> > On Wed, Dec 12, 2007 at 07:11:55PM +0100, Michael Biebl wrote:
> > > 2007/12/12, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> > > > Hi all,
> > > >
> > > > I have just released rsyslog 1.20.1. It primarily contains bug fixes: a
> > >
> > > sync.h declares lockObj/unlockObj, but sync.c only has these symbols
> > > if compiled without NDEBUG.
> >
> > Try including config.h in sync.h
> >
>

Found the culprit. Patch is attached.
Imho calling the define NDEBUG makes the code unnecessarily hard to
read (#ifndef NDEBUG ..). I had to stare at the code for a while until
I noticed that it was negated one time to often.

Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
rsyslog 1.20.1 released [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

"Michael Biebl" <mbiebl at gmail.com> wrote on Wed, 12 Dec 2007 20:18:38
+0100:

> Found the culprit. Patch is attached.

Mailman ate it again. Try attaching it with mimetype text/plain, seems
to work then.

Regards,
sur5r
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHYDgQ1YAhDic+adYRAtxQAKCspmrE+HfH12YVBzJcIBQ/GqNKXACfdSl3
NkY9aWuB+ftzvx2t4MtKPHw=
=BODR
-----END PGP SIGNATURE-----
rsyslog 1.20.1 released [ In reply to ]
Hold for a moment, the actual patch is a bit different . more soon.

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Jakob Haufe
> Sent: Wednesday, December 12, 2007 8:36 PM
> To: rsyslog at lists.adiscon.com
> Subject: Re: [rsyslog] rsyslog 1.20.1 released
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> "Michael Biebl" <mbiebl at gmail.com> wrote on Wed, 12 Dec 2007 20:18:38
> +0100:
>
> > Found the culprit. Patch is attached.
>
> Mailman ate it again. Try attaching it with mimetype text/plain, seems
> to work then.
>
> Regards,
> sur5r
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFHYDgQ1YAhDic+adYRAtxQAKCspmrE+HfH12YVBzJcIBQ/GqNKXACfdSl3
> NkY9aWuB+ftzvx2t4MtKPHw=
> =BODR
> -----END PGP SIGNATURE-----
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
rsyslog 1.20.1 released [ In reply to ]
Re-released, info follows soon...

> -----Original Message-----
> From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> bounces at lists.adiscon.com] On Behalf Of Rainer Gerhards
> Sent: Wednesday, December 12, 2007 9:04 PM
> To: rsyslog-users
> Subject: Re: [rsyslog] rsyslog 1.20.1 released
>
> Hold for a moment, the actual patch is a bit different . more soon.
>
> > -----Original Message-----
> > From: rsyslog-bounces at lists.adiscon.com [mailto:rsyslog-
> > bounces at lists.adiscon.com] On Behalf Of Jakob Haufe
> > Sent: Wednesday, December 12, 2007 8:36 PM
> > To: rsyslog at lists.adiscon.com
> > Subject: Re: [rsyslog] rsyslog 1.20.1 released
> >
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > "Michael Biebl" <mbiebl at gmail.com> wrote on Wed, 12 Dec 2007
20:18:38
> > +0100:
> >
> > > Found the culprit. Patch is attached.
> >
> > Mailman ate it again. Try attaching it with mimetype text/plain,
> seems
> > to work then.
> >
> > Regards,
> > sur5r
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.6 (GNU/Linux)
> >
> > iD8DBQFHYDgQ1YAhDic+adYRAtxQAKCspmrE+HfH12YVBzJcIBQ/GqNKXACfdSl3
> > NkY9aWuB+ftzvx2t4MtKPHw=
> > =BODR
> > -----END PGP SIGNATURE-----
> > _______________________________________________
> > rsyslog mailing list
> > http://lists.adiscon.net/mailman/listinfo/rsyslog
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
rsyslog 1.20.1 released [ In reply to ]
2007/12/12, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> Hold for a moment, the actual patch is a bit different . more soon.

Yeah, got it the wrong way around. Didn't read the comment in sync.h
carefully enough.
Thanks for you sharp eye!

As I said, imho it's easier to read and grasp if the define is called DEBUG.

Cheers,
Michael

--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
rsyslog 1.20.1 released [ In reply to ]
Hi all,

Man, when did I really screw up the last time? And I thought I had run
all test...

Anyhow, thanks all for helping to solve this issue.

Michael got it right, it is the NDEBUG. But is not the .c file but the
header file that was wrong. The idea is that we have functions only in
debugging mode, because functions make it easier to debug. But they are
slower than macro expansions. So in release mode, the functions are
replace with the mutex calls directly (which, I think, a macros, too).
If I recall it correctly, I screwed up after I created that
optimization.

> > Found the culprit. Patch is attached.
> > Imho calling the define NDEBUG makes the code unnecessarily hard to
> > read (#ifndef NDEBUG ..). I had to stare at the code for a
> while until
> > I noticed that it was negated one time to often.

The NDEBUG is an assert() inheritance. Assert() uses it to indicate a
release build. I've build on the same tool to avoid introducing another
one. But obviously, it has its drawbacks, too. I think I'll solve that
by adding a comment.

I hope this clarifies. Drop me a note if I got it wrong again or you
have a question ;)

The tarball that is now in the repository should solve the issue.

Rainer