[jboss-jira] [JBoss JIRA] (LOGMGR-143) NullPointer in JbossAppenderHandler.doPublish() degrades performance
James Perkins (Jira)
issues at jboss.org
Wed May 22 20:33:00 EDT 2019
[ https://issues.jboss.org/browse/LOGMGR-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Perkins closed LOGMGR-143.
--------------------------------
> NullPointer in JbossAppenderHandler.doPublish() degrades performance
> --------------------------------------------------------------------
>
> Key: LOGMGR-143
> URL: https://issues.jboss.org/browse/LOGMGR-143
> Project: JBoss Log Manager
> Issue Type: Bug
> Components: core
> Affects Versions: 1.1.0.GA
> Environment: Windows 7 x64
> WildFly 8
> Java 8.0_102
> Reporter: David Frank
> Priority: Major
>
> I don't have code I can send to reproduce this, but if the issue doesn't show up readily, I can try to create it.
> I noticed while doing some performance monitoring of WildFly with JVisualVM, that JBossAppenderHandler.doPublish() kept popping up in the top 5 for Self Time (CPU). This is the method:
> {code:java}
> 36 @Override
> 37 protected void More ...doPublish(final ExtLogRecord record) {
> 38 final LoggingEvent event = new LoggingEvent(record, JBossLogManagerFacade.getLogger(logger));
> 39 final List<Appender> appenders = getAppenderList(logger);
> 40 for (Appender appender : appenders) {
> 41 if (new JBossFilterWrapper(appender.getFilter(), true).isLoggable(record)) {
> 42 appender.doAppend(event);
> 43 }
> 44 }
> 45 }
> {code}
> After attaching the Eclipse debugger to it, I found the following:
> 1) The logger's name was ""
> 2) The appender list returend from getAppendersList(logger) had one element in it, and it was null. So the for loop following it would throw the null pointer.
> I put a quick hack in place to see how much of an impact this was having, basically putting a if(appender != null) check within the for loop. My average CPU load for WildFly dropped from about 173% to 130%.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the jboss-jira
mailing list