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 2008/01/02 08:03:35 UTC
DO NOT REPLY [Bug 44157] New: - InterruptedIOException ignored by log4j
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
DO NOT REPLY [Bug 44157] - InterruptedIOException ignored by log4j
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=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
------- Additional Comments From oberhaus@pobox.com 2008-01-01 23:05 -------
Here are some documents that support my suggestion:
http://java.sun.com/j2se/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html
How do I stop a thread that waits for long periods (e.g., for input)?
http://www-128.ibm.com/developerworks/java/library/j-jtp05236.html
Don't swallow interrupts
--
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