lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Ingersoll <gsing...@apache.org>
Subject Re: New "Stream closed" exception with Java 6
Date Tue, 15 Sep 2009 14:18:43 GMT

On Sep 15, 2009, at 9:26 AM, Chris Bamford wrote:

> Mark
>
> It appears you are right - it *IS* something tricky.  My code is  
> single threaded, so there is no contention.  I still get  
> intermittent "Stream Close" exceptions (about 1 in every 800  
> indexWriter.addDocument() calls) which I cannot explain.  By moving  
> code around / recompiling, I have managed successful test runs where  
> I get none, but now I have added some more logging code, the problem  
> has come back  :-(
> I feel like I have wasted the last 10 days chasing shadows and am no  
> further forward.
>

Your description sure sounds like a threading issue (adding logging or  
other code causing the problem to flare up).  I believe tools like  
YourKit and some others can help with threading issues.

Can you isolate (take it out of Tomcat) your indexing code and  
reproduce it in a standalone test case?


> My assumption is that 2.4 is stable (we are moving from 2.0 to 2.4  
> at present) - should I reconsider that assumption?
>
> Thanks for any ideas.
>
> - Chris
>
> ----- Original Message -----
> From: Mark Miller <markrmiller@gmail.com>
> Sent: Tue, 8/9/2009 8:06pm
> To: java-user@lucene.apache.org
> Subject: Re: New "Stream closed" exception with Java 6
>
> Chris Hostetter wrote:
>> : I'm coming to the same conclusion - there must be >1 threads  
>> accessing this index at the same time.  Better go figure it  
>> out  ...  :-)
>>
>> careful about your assumptions ... you could get this same type of
>> exception even with only one thread, the stream that's being closed  
>> isn't
>> internal to Lucene, it's the InputStreamReader you supplied as the  
>> value
>> of some Field.  it's possibly you just have a simple bug where you  
>> are
>> closing hte reader before you pass it to Lucene, or maybe you are
>> mistakenly adding the saame field twice (or in two different  
>> documents)
>>
>>
>> -Hoss
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> Its possible its something tricky. When I was converting the  
> Highlighter
> to the new TokenStream API, I started to
> get this exception in the Highlighter rewrite test - everything else
> passed, but this was failing. I couldn't figure it out - and
> before I could find the root cause, all the tests started passing
> (perhaps from changing code doing other things, rebuilding, or who  
> knows
> - I don't have a clue). I couldn't get it to fail again after that.
>
> Not very helpful - but just to note, there were not multiple threads
> involved concurrently, nor multiple Writers.
>
> -- 
> - Mark
>
> http://www.lucidimagination.com
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message