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 bu...@apache.org on 2007/11/15 00:04:29 UTC

DO NOT REPLY [Bug 43867] New: - NOPLoggerRepository error during shutdown

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867

           Summary: NOPLoggerRepository error during shutdown
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: marius.scurtescu@gmail.com


After upgrading from 1.2.14 to 1.2.15 the following error show up during shutdown:
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class
reloading, using NOPLoggerRepository.

No errors at all with 1.2.14

This probably is related to bug 40212

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From markt@apache.org  2008-01-25 15:32 -------
For the record, you can disable the Tomcat reference clearing code by setting
the following system property to false:
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES

For a properly written web app, this feature should not be required.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867


daniel.armbrust.list@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.armbrust.list@gmail.c
                   |                            |om




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From digulla@hepe.com  2007-11-15 02:28 -------
Apparently, the Tomcat classloader sets all static fields to null when you
remove a webapp. Bugs like this one here indicate that something is still alive
after the webapp has been removed (maybe a background thread).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From marius.scurtescu@gmail.com  2007-11-14 22:25 -------
Since 1.2.14 does not throw a NPE (or maybe it does, but it is never logged?), I
assumed that 1.2.15 should not log an error.

You are saying that 1.2.15 outputs a warning, it actually outputs an error. A
warning would be much preferred.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From carnold@apache.org  2008-01-25 11:49 -------
The underlying problem has to be resolved in Tomcat.  If the Tomcat team would suggest modifications 
that would make log4j immune to their classloader mucking with class invariants and leaving the class 
in limbo, it would likely be too drastic to consider to do this late in log4j 1.2's life.

So that leaves the question of what log4j should do in the circumstance that it is left in a corrupt state.  
Prior to log4j 1.2.15, log4j would throw a NPE when an attempt was made to log after the Tomcat 
class-loader did its damage.  In log4j 1.2.15, if that situation occurs log4j emits an error message 
which is definitely an improvement over a NPE.

You have observed that log4j 1.2.15 appears to be more likely to get in that state than log4j 1.2.14 
since you never saw the NPE with earlier versions, but now see the error message.  That likely is not 
directly related to the presence of the check and error message.  Removing the check for the null 
repository selector may or may not change the frequency of log4j being in a corrupt state, but it would 
cause the NPE's to return when it got in that state.

It is unreasonable to expect log4j to perform perfectly when the class loader has put it in a state that is 
not reachable by ordinary means.

The options are:

1. Fix the tomcat class loader or provide instructions to avoid the scenario.  That would have to be 
done by the Tomcat project.
2.  Identify characteristics that make a library more likely to be corrupted.  If the Tomcat project could 
identify that, we may (or may not) be able to adjust log4j to reduce the likelihood of getting in the 
corrupt state.
3. Remove the check for null repo which would cause NPE's to return.
4. Change the error to a warning message.
5. Change the error to a debug message (which would generally not be displayed). 
6. Change the message so it is not as frightening.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From marius.scurtescu@gmail.com  2007-11-15 11:41 -------
(In reply to comment #3)
> Apparently, the Tomcat classloader sets all static fields to null when you
> remove a webapp. Bugs like this one here indicate that something is still alive
> after the webapp has been removed (maybe a background thread).

Yes, I am aware of that. I mentioned that this is related to bug 40212.

The issue is that with 1.2.14 there are not errors (no NPE) and with 1.2.15
there are errors. Same Tomcat and exact same webapps.

So problem seems to be with Log4j, introduced in 1.2.15.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From daniel.armbrust.list@gmail.com  2008-01-25 15:49 -------
Far more info here, from the Tomcat side:

http://issues.apache.org/bugzilla/show_bug.cgi?id=41939

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867


digulla@hepe.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |digulla@hepe.com




------- Additional Comments From digulla@hepe.com  2007-11-21 01:42 -------
For me, your argument means that your webapp had a bug which wasn't triggered
with 1.2.14 but since we enhanced the code to report more erroneous states in
1.2.15, it now shows up.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From daniel.armbrust.list@gmail.com  2008-01-25 10:15 -------
For me, the argument goes like this:

Log4j has errors when a tomcat container is shutdown which contains log4j.  

These errors used to be silent - so no issue.

Now, in 1.2.15, they are being logged - which is a problem for me as well.

Suddenly, my customers are calling the help desk and asking what is this new error?

Log4J needs to be able to be shutdown without logging (and preferably, without
throwing) errors like this.

If someone can tell me what in my webapp would cause this, I'm happy to fix it.
 But this appears to be a tomcat / log4j bug, from what I have learned so far.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From carnold@apache.org  2007-11-14 22:03 -------
The error message isn't the bug, it is a symptom of something else.  It is a notification that somehow that 
class invarients are being broken (likely by class reloading) and log4j is going to avoid throwing a NPE by 
substituting a minimal non-functional logger repository.  If this is happening at shutdown, then you have 
an annoying message but at least you didn't crash.  Not much log4j can do if a class loader is starting to 
mess with invariants other than to minimize the damage.  I'd expect that 1.2.14 would raise 
NullPointerException under the same conditions that 1.2.15 would output a warning, but doesn't suprise 
me that things are a little inconsistent.  If the Tomcat community can either fix the classloader or give us 
specific instructions how to avoid their issue, we could have the problem go away, but there isn't much 
log4j can do to avoid the issue. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From daniel.armbrust.list@gmail.com  2008-01-25 12:01 -------
The strange part to me in the sequence of events is that I have never had an
issue with the Null Pointers - I never saw one previously.  But I also haven't
followed the other bug very closely which led to this change.

Unless we can get some help from the tomcat folks to figure out how to prevent
this from happening - I would vote for option 5.

It doesn't seem unreasonable to me for someone to turn on full debug error
logging if they are trying to figure out where their log messages went if they
end up getting switched over to the NOPLoggerRepository for some other reason.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43867] - NOPLoggerRepository error during shutdown

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43867>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43867





------- Additional Comments From digulla@hepe.com  2007-11-15 02:27 -------
Apparently, the Tomcat classloader sets all static fields to null when you
remove a webapp. Bugs like this one here indicate that something is still alive
after the webapp has been removed (maybe a background thread).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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