Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E005FE578 for ; Tue, 5 Feb 2013 16:15:06 +0000 (UTC) Received: (qmail 59362 invoked by uid 500); 5 Feb 2013 16:14:06 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 57674 invoked by uid 500); 5 Feb 2013 16:13:18 -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 55709 invoked by uid 99); 5 Feb 2013 16:12:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 16:12:02 +0000 Date: Tue, 5 Feb 2013 16:12:02 +0000 (UTC) From: "Mladen Turk (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DAEMON-276) commons-daemon.log blows up when stopping Windows service MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DAEMON-276?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1357= 1414#comment-13571414 ]=20 Mladen Turk commented on DAEMON-276: ------------------------------------ OK, It seems the reason for this is caused by concurrent write from multipl= e threads to log. I'll create a patch that guards the apxLogWrite with critical section. So far all my tests have show that this log bloat doesn't happen any more. I'll create 1.0.13-dev binaries for you guys to test that and have a speedy= release in case this solves the issue. Should be done in few hours =20 > commons-daemon.log blows up when stopping Windows service > --------------------------------------------------------- > > Key: DAEMON-276 > URL: https://issues.apache.org/jira/browse/DAEMON-276 > Project: Commons Daemon > Issue Type: Bug > Affects Versions: 1.0.12 > Environment: Tomcat 7.0.36 Release candidate, Oracle JRE 7u13 32-= bit, Windows 7 Home basic 64-bit > Reporter: Konstantin Kolinko > Assignee: Mladen Turk > Priority: Blocker > Attachments: logs_Win7_2.zip, logs_WinXP_3.zip > > > Encountered this when testing Tomcat 7.0.36 RC installed as a service. On= Windows 7, using JRE 7u13. > Steps to reproduce: > 1. Start Tomcat service > 2. Wait until all web applications start up > 3. Restart the service > 4. Windows says that the service cannot be started. > At this point the commons-daemon.2013-02-05.log file started to grow rapi= dly. In half a minute it grew up to several Gb. > This can be resolved by killing Tomcat7.exe via Task manager. > In the log file I see > [2013-02-05 03:44:38] [info] [11996] Commons Daemon procrun (1.0.12.0 32= -bit) started > [2013-02-05 03:44:38] [info] [11996] Running 'Tomcat7' Service... > [2013-02-05 03:44:38] [info] [11980] Starting service... > [2013-02-05 03:44:39] [info] [11980] Service started in 1357 ms. > [2013-02-05 03:45:48] [info] [12276] Stopping service... > [2013-02-05 03:45:49] [info] [12276] Service stopped. > [2013-02-05 03:45:49] [info] > The last line is followed by several Gb of nul character. In hex editor: > 00000001A0: 39 5D 20 5B 69 6E 66 6F =C2=A6 5D 20 20 00 00 00 00 00 9] [i= nfo] > 00000001B0: 00 00 00 00 00 00 00 00 =C2=A6 00 00 00 00 00 00 00 00 > 00000001C0: 00 00 00 00 00 00 00 00 =C2=A6 00 00 00 00 00 00 00 00 > I tried to reproduce this by stopping or by restarting the service, but t= his rapid growth of the log file did not occur. There is a different eviden= ce, though. > The log file below was produced by the following actions: > 1. Start > 2. Stop > 3. Start > 4. Restart > This produced the following: > [2013-02-05 04:14:15] [info] [ 3988] Commons Daemon procrun (1.0.12.0 32= -bit) started > [2013-02-05 04:14:15] [info] [ 3988] Running 'Tomcat7' Service... > [2013-02-05 04:14:15] [info] [ 1536] Starting service... > [2013-02-05 04:14:16] [info] [ 1536] Service started in 1357 ms. > [2013-02-05 04:15:36] [info] [ 3456] Stopping service... > [2013-02-05 04:15:37] [info] [ 3456] Service stopped. > [2013-02-05 04:15:37] [info] [ 3988] Run service finished. > [2013-02-05 04:15:37] [info] [ 3988] Commons Daemon procrun finished > [2013-02-05 04:17:32] [info] [ 3968] Commons Daemon procrun (1.0.12.0 32= -bit) started > [2013-02-05 04:17:32] [info] [ 3968] Running 'Tomcat7' Service... > [2013-02-05 04:17:32] [info] [ 3552] Starting service... > [2013-02-05 04:17:34] [info] [ 3552] Service started in 1310 ms. > [2013-02-05 04:18:29] [info] [ 3764] Stopping service... > [2013-02-05 04:18:30] [info] [ 3764] Service stopped. > [2013-02-05 04:18:30] [ 3968] Run service finished. > [2013-02-05 04:18:30] [info] [ 3968] Commons Daemon procrun finished > [2013-02-05 04:18:31] [info] [ 1260] Commons Daemon procrun (1.0.12.0 32= -bit) started > [2013-02-05 04:18:31] [info] [ 1260] Running 'Tomcat7' Service... > [2013-02-05 04:18:31] [info] [ 1204] Starting service... > [2013-02-05 04:18:32] [info] [ 1204] Service started in 1357 ms. > There is a problem with a line at "2013-02-05 04:18:30" (Run service fini= shed). The "[info] " characters are missing. > Note that the same line at "2013-02-05 04:15:37" was printed correctly. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira