[jboss-jira] [JBoss JIRA] (JBLOGGING-106) Log4jLoggerProvider clearNdc doesn't clear Ndc reference to threads
William Burns (JIRA)
issues at jboss.org
Thu Jul 10 14:20:25 EDT 2014
William Burns created JBLOGGING-106:
---------------------------------------
Summary: Log4jLoggerProvider clearNdc doesn't clear Ndc reference to threads
Key: JBLOGGING-106
URL: https://issues.jboss.org/browse/JBLOGGING-106
Project: JBoss Logging
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jboss-logging-log4j
Affects Versions: 3.1.2.GA
Reporter: William Burns
Assignee: James Perkins
The Log4jLoggerProvider have a method clearNdc on it that calls to the NDC.clear method. Unfortunately this method only clears the Stack that log4j1.2 holds internally in it's NDC class. Unfortunately this leaves the entry still in the NDC class for the current thread pointing to that stack. If we use the remove method instead it will remove the entry from the NDC Hashtable and allow the thread to be GC'd if it is no longer running and referenced.
Without this change there is no way to clear the NDC table which will eventually cause an OOM unless we call directly into the log4j NDC class to clear it.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jboss-jira
mailing list