logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 44157] New: - InterruptedIOException ignored by log4j
Date Wed, 02 Jan 2008 07:03:35 GMT
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=44157>.
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=44157

           Summary: InterruptedIOException ignored by log4j
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Appender
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: oberhaus@pobox.com


log4j catches and ignores InterruptedIOException's, causing code that uses log4j to freeze
under 
certain conditions.

When the exception InterruptedException is caught, special care must be taken. If InterruptedException

is caught and ignored, and the thread does not exit, other code that interrupted that thread
will not 
function correctly.

The same is true of InterruptedIOException (which derives from IOException). This can be thrown
from 
any java.nio blocking method, or can be thrown from java.io methods on Solaris. An 
InterruptedIOException must be treated the same as an InterruptedException; either the exception

should be allowed to continue up the call stack, or something special must be done.

One example of something special is to call the following:

Thread.currentThread().interrupt();

I propose that everywhere in log4j that IOException is caught, a special catch of InterruptedIOException

is done and 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


Mime
View raw message