(RADIATOR) RHES 3 & Net::Daemon problem and LogSQL.pm fix

Jacob Leaver jleaver at reachone.com
Tue Nov 11 16:52:28 CST 2003


Mike,

RHES 3 is a new release, free upgrade from the version that you are running,
as long as you are RHN subscribed.
uname -a
Linux ns1.reachone.com 2.4.21-4.ELsmp #1 SMP Fri Oct 3 17:52:56 EDT 2003
i686 i686 i386 GNU/Linux

I suspect that the culprit is the new threading library that RedHat
integrated with RedHat 9, where, incidently, Net::Daemon is also failing the
forkm tests.

> I have compiled and tested Net::Daemon fine on RH ES with this version:

>If Radiator is dying without leaving a message in the Radiator log file,
you
>might see an error message produced on stdout. Try running it by hand from
a
>shell.

Running as a forground process, the process stays running indefinately.

>
> On another note, I can't remember if I mentioned this before or not, but
> LogSQL seems to have some non-functional code in it: around about line 54
> of LogSQL.pm, it reads:
>     # Catch recursion
>    return if $in_log++;
>
> which I think should always evaluate as true.   It seems to work better
> reading something more like: # Catch recursion
>    return if $in_log > 1;
>     $in_log++;
> which I believe will prevent the recursion that is mentioned in the
> comment.

>The intention of this code is to let the body of the function execute at
most
>once, even if it recurses afterwards (ie even if the logging internals
>produce a new log message). I believe the code as delivered works correctly
>on all platforms, but if you know of a platform where that is not true (and
>the code either fails to execute at all or fails to detect recursion, then
we
>would like to see the Trace 4 log file, please).

I am only a simple hacker, but isn't the statement
 return if $in_log++;
always true?  I ran some test code, and it seemed that way to me.

And wouldn't that cause a failure to log without actually showing up in the
tracelog?

Jacob Leaver
ReachONE Internet


===
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list