You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2011/05/28 18:25:47 UTC
[jira] [Created] (LUCENE-3150) Wherever we catch & suppress
Throwable we should not suppress ThreadInterruptedException
Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
----------------------------------------------------------------------------------------
Key: LUCENE-3150
URL: https://issues.apache.org/jira/browse/LUCENE-3150
Project: Lucene - Java
Issue Type: Bug
Reporter: Michael McCandless
Priority: Minor
Fix For: 3.3, 4.0
In various places we catch Throwable and suppress it, usually in exception handlers where we want to just throw the first exc we had hit.
But this is dangerous for a thread interrupt since it means we can swallow & ignore the interrupt.
We should at least catch the interrupt & restore the interrupt bit, if we can't rethrow it.
One example is in SegmentInfos where we write the segments.gen file... there are many other examples in SegmentInfos too.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-3150) Wherever we catch & suppress
Throwable we should not suppress ThreadInterruptedException
Posted by "Simon Willnauer (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Willnauer updated LUCENE-3150:
------------------------------------
Attachment: LUCENE-3150.patch
here is a first patch for this issue. I integrated another utility into IOUtils that checks if we suppress an InterruptException and resets the interrupt bit on the thread if so. I also call maybeResetInterrupt throughout the code in core where we catch(Throwable) and don't rethrow - its a start....
> Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-3150
> URL: https://issues.apache.org/jira/browse/LUCENE-3150
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Priority: Minor
> Fix For: 3.5, 4.0
>
> Attachments: LUCENE-3150.patch
>
>
> In various places we catch Throwable and suppress it, usually in exception handlers where we want to just throw the first exc we had hit.
> But this is dangerous for a thread interrupt since it means we can swallow & ignore the interrupt.
> We should at least catch the interrupt & restore the interrupt bit, if we can't rethrow it.
> One example is in SegmentInfos where we write the segments.gen file... there are many other examples in SegmentInfos too.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-3150) Wherever we catch & suppress
Throwable we should not suppress ThreadInterruptedException
Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040791#comment-13040791 ]
Shai Erera commented on LUCENE-3150:
------------------------------------
We can fix IOUtils to do that -- now that we call it from many places in the code, it will catch a lot of instances. Also, perhaps we could have an Abortable interface and then call IOUtils from all places that impl abort() today.
> Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-3150
> URL: https://issues.apache.org/jira/browse/LUCENE-3150
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Priority: Minor
> Fix For: 3.3, 4.0
>
>
> In various places we catch Throwable and suppress it, usually in exception handlers where we want to just throw the first exc we had hit.
> But this is dangerous for a thread interrupt since it means we can swallow & ignore the interrupt.
> We should at least catch the interrupt & restore the interrupt bit, if we can't rethrow it.
> One example is in SegmentInfos where we write the segments.gen file... there are many other examples in SegmentInfos too.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-3150) Wherever we catch & suppress
Throwable we should not suppress ThreadInterruptedException
Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-3150?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless updated LUCENE-3150:
---------------------------------------
Fix Version/s: (was: 3.4)
3.5
> Wherever we catch & suppress Throwable we should not suppress ThreadInterruptedException
> ----------------------------------------------------------------------------------------
>
> Key: LUCENE-3150
> URL: https://issues.apache.org/jira/browse/LUCENE-3150
> Project: Lucene - Java
> Issue Type: Bug
> Reporter: Michael McCandless
> Priority: Minor
> Fix For: 3.5, 4.0
>
>
> In various places we catch Throwable and suppress it, usually in exception handlers where we want to just throw the first exc we had hit.
> But this is dangerous for a thread interrupt since it means we can swallow & ignore the interrupt.
> We should at least catch the interrupt & restore the interrupt bit, if we can't rethrow it.
> One example is in SegmentInfos where we write the segments.gen file... there are many other examples in SegmentInfos too.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org