commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mladen Turk (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DAEMON-186) jsvc consumes 100% CPU when redirecting errfile (and not outfile) to syslog
Date Thu, 04 Nov 2010 15:42:45 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928241#action_12928241
] 

Mladen Turk commented on DAEMON-186:
------------------------------------

You have specified that the affected version is 1.0.1.
Since we don't make patches for old releases, can you verify if that's a case for newest release
(1.0.4)



> jsvc consumes 100% CPU when redirecting errfile (and not outfile) to syslog
> ---------------------------------------------------------------------------
>
>                 Key: DAEMON-186
>                 URL: https://issues.apache.org/jira/browse/DAEMON-186
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Jsvc
>    Affects Versions: 1.0.1
>         Environment: Ubuntu
>            Reporter: Ana Solano Ros
>            Priority: Minor
>
> When you run jsvc redirecting -errfile to syslog but not -outfile to syslog the jsvc
process in charge of the redirection to syslog daemon consumes 100% CPU.
> The problem dissapears when redirecting both (-errfile and -outfile) to syslog.
> The problem appears when only one is redirected to syslog and the other parameter is
not specified or redirected to a file.
> The problem in the process appears to be the following:
> - jsvc  tries to open 2 file descriptors, one for the standard output and one for the
error output, and listen to both file descriptors
> - when it receives a message from one of both descriptors it sends the message to syslog
daemon.
> - In the case that only -errfile is specified (and not -outfile), when jsvc tries to
open the stardard output file descriptor it fails and the file descriptor points to "0" (default
value, /dev/null).
> - The jsvc listen to both descriptors, the error output (that was correctly opened) and
the 0 file descriptor, and jsvc is receiving data continously from this "broken" file descriptor.
So it enters in a loop that consumes 100% of CPU.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message