You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a system which forks children and we found out that sometimes log4perl messages are interleaved (especially for long messages) so we added the "Synchronized" Appenders the the logfiles and created a different semaphore (4 char long .key) for each and every appender file based logger.
At first tests it looked perfectly ok, but once we put the code on our QA testing system it started to fail miserable, we had strange lockups all over the place and as I have not really found out how that semaphores stuff is working I also feel unable to fix this issue. But I think it seems somehow the locks don't get released but I don't even know how to trace this.
BTW: We are using Log4perl 1.46 provided by centos7.
The text was updated successfully, but these errors were encountered:
ok, we found out what's the problem. If any log4perl module outputs something to stderr/stdout and you're using the recipe to catch all output from stderr & stdout and redirect to log4perl you run into a semaphore deadlock as you're entering the 'log' subroutine again in a recursion and it waits indefinitly.
For the moment I have monkey patched the 'log' method of the Appender to run a counter and only lock/umlock the semaphore if counter == 0, also error handling is not done properly here, if the log method dies you're also left with a locked semaphore and system is in deadlock mode.
I had the same issue. The semaphore errors were showing up in the Centos 7 syslogs and my software stopped processing all together. Had to fall back to the following configuration:
Hi,
We have a system which forks children and we found out that sometimes log4perl messages are interleaved (especially for long messages) so we added the "Synchronized" Appenders the the logfiles and created a different semaphore (4 char long .key) for each and every appender file based logger.
At first tests it looked perfectly ok, but once we put the code on our QA testing system it started to fail miserable, we had strange lockups all over the place and as I have not really found out how that semaphores stuff is working I also feel unable to fix this issue. But I think it seems somehow the locks don't get released but I don't even know how to trace this.
BTW: We are using Log4perl 1.46 provided by centos7.
The text was updated successfully, but these errors were encountered: