lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4083) RateLimited.pause() throws unchecked exception
Date Tue, 03 Jul 2012 11:14:25 GMT


Dawid Weiss commented on LUCENE-4083:

Just a comment on the belated follow-up check that I did. If the main test's thread times
out, any forked threads will also be interrupted/ terminated as a consequence of this. Any
exceptions that happen after the main thread is terminated will be wrapped as in here (note
"after termination attempt").
java.lang.RuntimeException: Thread threw an uncaught exception (after termination attempt),
thread: Thread[spinning,5,]
	at com.carrotsearch.randomizedtesting.RunnerThreadGroup.processUncaught(
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(
	at com.carrotsearch.randomizedtesting.RandomizedRunner.access$7(
	at com.carrotsearch.randomizedtesting.RandomizedRunner$3$
Caused by: java.lang.RuntimeException: foobar
	at __randomizedtesting.SeedInfo.seed([54B0307E3EA5B518]:0)
	at com.carrotsearch.randomizedtesting.TestTestTimeoutAndRunawayThreadException$Nested$

So I don't think the above exception was a result of after-the-timeout exception, rather something
> RateLimited.pause() throws unchecked exception
> ----------------------------------------------
>                 Key: LUCENE-4083
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/store
>    Affects Versions: 4.0
>            Reporter: Andrzej Bialecki 
>             Fix For: 4.0
> The while() loop in RateLimiter.pause() invokes Thread.sleep() with potentially large
values, which occasionally results in InterruptedException being thrown from Thread.sleep().
This is wrapped in an unchecked ThreadInterruptedException and re-thrown, and results in high-level
errors like this:
> {code}
>     [junit] 2012-05-29 15:50:15,464 ERROR core.SolrCore - org.apache.lucene.util.ThreadInterruptedException:
java.lang.InterruptedException: sleep interrupted
>     [junit] 	at
>     [junit] 	at
>     [junit] 	at
>     [junit] 	at
>     [junit] 	at org.apache.lucene.codecs.lucene40.Lucene40PostingsWriter.addPosition(
>     [junit] 	at org.apache.lucene.index.FreqProxTermsWriterPerField.flush(
>     [junit] 	at org.apache.lucene.index.FreqProxTermsWriter.flush(
>     [junit] 	at org.apache.lucene.index.TermsHash.flush(
>     [junit] 	at org.apache.lucene.index.DocInverter.flush(
>     [junit] 	at org.apache.lucene.index.DocFieldProcessor.flush(
>     [junit] 	at org.apache.lucene.index.DocumentsWriterPerThread.flush(
>     [junit] 	at org.apache.lucene.index.DocumentsWriter.doFlush(
>     [junit] 	at org.apache.lucene.index.DocumentsWriter.flushAllThreads(
>     [junit] 	at org.apache.lucene.index.IndexWriter.prepareCommit(
>     [junit] 	at org.apache.lucene.index.IndexWriter.commitInternal(
>     [junit] 	at org.apache.lucene.index.IndexWriter.commit(
>     [junit] 	at org.apache.solr.update.DirectUpdateHandler2.commit(
>     [junit] 	at org.apache.solr.update.processor.RunUpdateProcessor.processCommit(
> {code}
> I believe this is a bug - the while() loop already ensures that the total time spent
in pause() is correct even if InterruptedException-s are thrown, so they should not be re-thrown.
> The patch is trivial - simply don't re-throw.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message