[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16742563#comment-16742563 ] ASF subversion and git services commented on LOG4J2-2301: - Commit b3a910d5ee43e33d6c8d330bbbde2fcde384fe51 in logging-log4j2's branch refs/heads/master from Carter Kozak [ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=b3a910d ] Merge pull request #251 from mprusakov-rbc/patch-1 Remove garbage creation introduced by LOG4J2-2301 > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16742562#comment-16742562 ] ASF subversion and git services commented on LOG4J2-2301: - Commit c5ede52852739e866b3e4b6782065727b5fd800a in logging-log4j2's branch refs/heads/master from mprusakov-rbc [ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=c5ede52 ] Remove garbage creation introduced by LOG4J2-2301 After upgrading to 2.11.1 we have started seeing garbage being generated here: Stack Trace TLABs Total TLAB Size(bytes) Pressure(%) java.lang.ThreadLocal$ThreadLocalMap.set(ThreadLocal, Object) line: 481 10 3,638,864 56.192 java.lang.ThreadLocal$ThreadLocalMap.access$100(ThreadLocal$ThreadLocalMap, ThreadLocal, Object) line: 298 10 3,638,864 56.192 java.lang.ThreadLocal.setInitialValue() line: 184 10 3,638,864 56.192 java.lang.ThreadLocal.get() line: 170 10 3,638,864 56.192 org.apache.logging.log4j.core.async.AsyncLoggerConfig.log(LogEvent, LoggerConfig$LoggerConfigPredicate) line: 9110 3,638,864 56.192 The purpose of this patch is to fix this. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16742558#comment-16742558 ] ASF subversion and git services commented on LOG4J2-2301: - Commit dae68a68d6a59468cd15ec3ed0ee42da2457a4b5 in logging-log4j2's branch refs/heads/release-2.x from mprusakov-rbc [ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=dae68a6 ] Remove garbage creation introduced by LOG4J2-2301 After upgrading to 2.11.1 we have started seeing garbage being generated here: Stack Trace TLABs Total TLAB Size(bytes) Pressure(%) java.lang.ThreadLocal$ThreadLocalMap.set(ThreadLocal, Object) line: 481 10 3,638,864 56.192 java.lang.ThreadLocal$ThreadLocalMap.access$100(ThreadLocal$ThreadLocalMap, ThreadLocal, Object) line: 298 10 3,638,864 56.192 java.lang.ThreadLocal.setInitialValue() line: 184 10 3,638,864 56.192 java.lang.ThreadLocal.get() line: 170 10 3,638,864 56.192 org.apache.logging.log4j.core.async.AsyncLoggerConfig.log(LogEvent, LoggerConfig$LoggerConfigPredicate) line: 9110 3,638,864 56.192 The purpose of this patch is to fix this. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459648#comment-16459648 ] ASF GitHub Bot commented on LOG4J2-2301: Github user cakofony closed the pull request at: https://github.com/apache/logging-log4j2/pull/164 > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459387#comment-16459387 ] ASF subversion and git services commented on LOG4J2-2301: - Commit b34d8cc585368db51cc84e916a257d55de44e8d0 in logging-log4j2's branch refs/heads/release-2.x from [~ckozak] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=b34d8cc ] [LOG4J2-2301] Mixed async loggers no longer forget parameter values Previously each AsyncLoggerConfig would individually enqueue an event on the async delegate disruptor. In practice this caused us to trade reusable message parameters away at the first AsyncLoggerConfig in our path, causing the rest to get an array of nulls. Now we begin by traversing the configuration and logging to all synchronous loggers first, then enqueue the event to the highest level asynchronous logger allowing the asynchronous loggers to be traversed on the background thread. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459386#comment-16459386 ] ASF subversion and git services commented on LOG4J2-2301: - Commit fb453229457fb70467576002d8cb96f21143ea77 in logging-log4j2's branch refs/heads/release-2.x from [~ckozak] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=fb45322 ] Add an ignored failing test for LOG4J2-2301 > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459376#comment-16459376 ] Carter Kozak commented on LOG4J2-2301: -- Wonderful, thanks Remko! > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > Fix For: 3.0.0, 2.11.1 > > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459375#comment-16459375 ] ASF subversion and git services commented on LOG4J2-2301: - Commit d3744807daf27638e1eb0a8f0d41bb7ff1061dde in logging-log4j2's branch refs/heads/master from [~ckozak] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=d374480 ] [LOG4J2-2301] Mixed async loggers no longer forget parameter values Previously each AsyncLoggerConfig would individually enqueue an event on the async delegate disruptor. In practice this caused us to trade reusable message parameters away at the first AsyncLoggerConfig in our path, causing the rest to get an array of nulls. Now we begin by traversing the configuration and logging to all synchronous loggers first, then enqueue the event to the highest level asynchronous logger allowing the asynchronous loggers to be traversed on the background thread. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459364#comment-16459364 ] Remko Popma commented on LOG4J2-2301: - I had another look and I have no objections. Nice work! > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16459149#comment-16459149 ] Carter Kozak commented on LOG4J2-2301: -- Curious if there are outstanding thoughts or concerns with this change. I'm more than happy to hold off merging if folks prefer, otherwise I'll plan to merge the change tomorrow. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16440369#comment-16440369 ] Carter Kozak commented on LOG4J2-2301: -- That is correct. Good call on the predicate! To clarify, the old approach could end up enqueuing N events on the AsyncLoggerConfig disruptor, where N is the number of AsyncLoggerConfig elements between the event source and root (or where additivity is disabled, or the event is filtered). This approach enqueues at most one event to the disruptor ringbuffer. I've updated the PR with an attempt to clean up the implementation, thanks for your feedback! It's a bit tricky to split the paths apart because we have to maintain thread state as we invoke through potentially both AsyncLoggerConfig and LoggerConfig instances chained together, and only the first encountered AsyncLoggerConfig enqueues events to the ringbuffer. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16440332#comment-16440332 ] Remko Popma commented on LOG4J2-2301: - Started to look at this. Interesting idea. So the idea is basically that previously, we had a single call to, let's say {{callAppenders(LogEvent)}} (actual method may be different), and that has now been split into two: first call the synchronous, then the async downstream components. Would it be possible to rearrange the code so that this intention becomes very clear? Something like (pseudo-code): {code} // before callAppenders(logEvent); // after // (add comment with quick summary of why we're doing this and link to LOG4J2-2301) callAppenders(logEvent, LogPredicate.SYNCRONOUS_ONLY); callAppenders(logEvent, LogPredicate.ASYNCRONOUS_ONLY); {code} Detail: Can we pass a {{LoggingPredicate.ALWAYS}} constant instead of {{null}} so client code can just call {{predicate.allow(LoggerConfig)}} without needing to check for null? > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16436635#comment-16436635 ] Carter Kozak commented on LOG4J2-2301: -- Not a problem, I'm not in a rush. Thanks! > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16435008#comment-16435008 ] Remko Popma commented on LOG4J2-2301: - Hi Carter, sorry I have not been able to spend as much time as I would like on Log4j (been trying to get GROOVY-8520 done before the groovy 2.5 release). I really appreciate the work you've been doing recently and I will try to take a look at PR #164 soon. > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16434795#comment-16434795 ] Carter Kozak commented on LOG4J2-2301: -- Alright, I've refactored AsyncLoggerConfig and managed to get the test passing. I'd really appreciate review when you have time [~rem...@yahoo.com]! I've pushed the change to github for ease of sharing: [https://github.com/apache/logging-log4j2/pull/164] > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16432538#comment-16432538 ] ASF subversion and git services commented on LOG4J2-2301: - Commit f93f049c13f38a149378ea47c38868611d7c64f0 in logging-log4j2's branch refs/heads/master from [~ckozak] [ https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;h=f93f049 ] Add an ignored failing test for LOG4J2-2301 > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Assignee: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (LOG4J2-2301) gc-free mixed async loging loses parameter values after the first appender
[ https://issues.apache.org/jira/browse/LOG4J2-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16423340#comment-16423340 ] Carter Kozak commented on LOG4J2-2301: -- Perfect, will do! > gc-free mixed async loging loses parameter values after the first appender > -- > > Key: LOG4J2-2301 > URL: https://issues.apache.org/jira/browse/LOG4J2-2301 > Project: Log4j 2 > Issue Type: Bug > Components: Core >Affects Versions: 2.11.0 >Reporter: Carter Kozak >Priority: Major > > When gc-free logging is used with mixed synchronous/asynchronous loggers, > parameter values are replaced with "null" after the first AsyncLoggerConfig. > The message format is still present, as well as the parameter count, however > all values are nulls. > It appears that Log4jEventWrapperHandler.onEvent invokes > MutableLogEvent.clear, which nulls out the parameter array. > I have constructed a failing test (which I need to clean up and deduplicate > some code from the fix for LOG4J2-2299): > https://github.com/cakofony/logging-log4j2/commit/b9c03f5c6881bfe778f8e2d75d046ce6e021c4f1 -- This message was sent by Atlassian JIRA (v7.6.3#76005)