You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Remko Popma (JIRA)" <ji...@apache.org> on 2013/07/19 13:30:49 UTC

[jira] [Commented] (LOG4J2-315) Multiple threads logging to same AsyncAppender- Data Loss

    [ https://issues.apache.org/jira/browse/LOG4J2-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713567#comment-13713567 ] 

Remko Popma commented on LOG4J2-315:
------------------------------------

I was able to reproduce the issue. I got this result:
{code}
Log file                  	log lines
---------------------------	---------
summary-2013-07-19-20-1.log	495,299
summary-2013-07-19-20-2.log	495,676
summary-2013-07-19-20-3.log	495,875
summary-2013-07-19-20-4.log	495,948
summary-2013-07-19-20-5.log	495,701
summary-2013-07-19-20-6.log	496,097
summary-2013-07-19-20-7.log	495,553
summary.log                	35,454
TOTAL:                     	3,505,603  <- should be 5,000,000
{code}

When I replaced the RollingFile appender configuration with a non-rolling FastFile appender the problem did not occur (all 5,000,000 log events appeared in the log).

The RollingFile appender may be dropping events during a roll-over.
                
> Multiple threads logging to same AsyncAppender- Data Loss
> ---------------------------------------------------------
>
>                 Key: LOG4J2-315
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-315
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders
>            Reporter: Sudharma Puranik
>            Priority: Blocker
>         Attachments: TestMultiThread.zip
>
>
> creating multiple threads which logs messages. I could see that for 5 million logging messages only 4.7 million messages  are logged. Dont know what is the reason but this could be something serious for auditing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: [jira] [Commented] (LOG4J2-315) Multiple threads logging to same AsyncAppender- Data Loss

Posted by Sudharma Puranik <su...@gmail.com>.
Yeah I replaced with FastFile and I also got the correct results, It failed
with FastRollingFile Appender as well. Are there any plans for fixing this?


On Fri, Jul 19, 2013 at 6:31 PM, Sudharma Puranik <
sudharma.puranik@gmail.com> wrote:

> but FastFileAppender is *Experimental, may replace FileAppender in a
> future release. *that is what is said in the documentation. So would you
> guys be fixing this issue or I should use FastFileAppender?
> *
> *
> *-Sudharma*
>
>
> On Fri, Jul 19, 2013 at 5:00 PM, Remko Popma (JIRA) <ji...@apache.org>wrote:
>
>>
>>     [
>> https://issues.apache.org/jira/browse/LOG4J2-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713567#comment-13713567]
>>
>> Remko Popma commented on LOG4J2-315:
>> ------------------------------------
>>
>> I was able to reproduce the issue. I got this result:
>> {code}
>> Log file                        log lines
>> ---------------------------     ---------
>> summary-2013-07-19-20-1.log     495,299
>> summary-2013-07-19-20-2.log     495,676
>> summary-2013-07-19-20-3.log     495,875
>> summary-2013-07-19-20-4.log     495,948
>> summary-2013-07-19-20-5.log     495,701
>> summary-2013-07-19-20-6.log     496,097
>> summary-2013-07-19-20-7.log     495,553
>> summary.log                     35,454
>> TOTAL:                          3,505,603  <- should be 5,000,000
>> {code}
>>
>> When I replaced the RollingFile appender configuration with a non-rolling
>> FastFile appender the problem did not occur (all 5,000,000 log events
>> appeared in the log).
>>
>> The RollingFile appender may be dropping events during a roll-over.
>>
>> > Multiple threads logging to same AsyncAppender- Data Loss
>> > ---------------------------------------------------------
>> >
>> >                 Key: LOG4J2-315
>> >                 URL: https://issues.apache.org/jira/browse/LOG4J2-315
>> >             Project: Log4j 2
>> >          Issue Type: Bug
>> >          Components: Appenders
>> >            Reporter: Sudharma Puranik
>> >            Priority: Blocker
>> >         Attachments: TestMultiThread.zip
>> >
>> >
>> > creating multiple threads which logs messages. I could see that for 5
>> million logging messages only 4.7 million messages  are logged. Dont know
>> what is the reason but this could be something serious for auditing.
>>
>> --
>> This message is automatically generated by JIRA.
>> If you think it was sent incorrectly, please contact your JIRA
>> administrators
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>

Re: [jira] [Commented] (LOG4J2-315) Multiple threads logging to same AsyncAppender- Data Loss

Posted by Sudharma Puranik <su...@gmail.com>.
but FastFileAppender is *Experimental, may replace FileAppender in a future
release. *that is what is said in the documentation. So would you guys be
fixing this issue or I should use FastFileAppender?
*
*
*-Sudharma*


On Fri, Jul 19, 2013 at 5:00 PM, Remko Popma (JIRA) <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/LOG4J2-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13713567#comment-13713567]
>
> Remko Popma commented on LOG4J2-315:
> ------------------------------------
>
> I was able to reproduce the issue. I got this result:
> {code}
> Log file                        log lines
> ---------------------------     ---------
> summary-2013-07-19-20-1.log     495,299
> summary-2013-07-19-20-2.log     495,676
> summary-2013-07-19-20-3.log     495,875
> summary-2013-07-19-20-4.log     495,948
> summary-2013-07-19-20-5.log     495,701
> summary-2013-07-19-20-6.log     496,097
> summary-2013-07-19-20-7.log     495,553
> summary.log                     35,454
> TOTAL:                          3,505,603  <- should be 5,000,000
> {code}
>
> When I replaced the RollingFile appender configuration with a non-rolling
> FastFile appender the problem did not occur (all 5,000,000 log events
> appeared in the log).
>
> The RollingFile appender may be dropping events during a roll-over.
>
> > Multiple threads logging to same AsyncAppender- Data Loss
> > ---------------------------------------------------------
> >
> >                 Key: LOG4J2-315
> >                 URL: https://issues.apache.org/jira/browse/LOG4J2-315
> >             Project: Log4j 2
> >          Issue Type: Bug
> >          Components: Appenders
> >            Reporter: Sudharma Puranik
> >            Priority: Blocker
> >         Attachments: TestMultiThread.zip
> >
> >
> > creating multiple threads which logs messages. I could see that for 5
> million logging messages only 4.7 million messages  are logged. Dont know
> what is the reason but this could be something serious for auditing.
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>