Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 59198 invoked from network); 18 Jan 2011 09:01:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2011 09:01:11 -0000 Received: (qmail 86550 invoked by uid 500); 18 Jan 2011 09:01:11 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 86454 invoked by uid 500); 18 Jan 2011 09:01:09 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 86446 invoked by uid 99); 18 Jan 2011 09:01:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 09:01:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 09:01:06 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0I90jRP003361 for ; Tue, 18 Jan 2011 09:00:45 GMT Message-ID: <14282231.31571295341245004.JavaMail.jira@thor> Date: Tue, 18 Jan 2011 04:00:45 -0500 (EST) From: "Mladen Turk (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (DAEMON-186) jsvc consumes 100% CPU when redirecting errfile (and not outfile) to syslog In-Reply-To: <24615952.8671288880141499.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DAEMON-186?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mladen Turk updated DAEMON-186: ------------------------------- Affects Version/s: 1.0.5 > 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, 1.0.2, 1.0.4, 1.0.5 > Environment: Ubuntu > Reporter: Ana Solano Ros > Assignee: Mladen Turk > 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.