You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Jason Kealey <jk...@franchiseblast.com> on 2014/06/17 23:54:39 UTC

Known bug?

Hey,

Once in a while, I receive an error which breaks Lucene.NET until we
completely delete the index and start from scratch. We are unable to
rebuild the index in any other way. I've found that others have the same
issue and wanted to know if it is a known one and, if so, if there's
anything I can do to prevent this from corrupting my index.

Here's my stack trace:

System.IndexOutOfRangeException: Index of bound 0
   at Lucene.Net.Util.BitVector.GetAndSet(Int32 bit) in
d:\Lucene.Net\FullRepo\trunk\src\core\Util\BitVector.cs:line 85
   at Lucene.Net.Index.SegmentReader.DoDelete(Int32 docNum) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\SegmentReader.cs:line 1143
   at Lucene.Net.Index.IndexReader.DeleteDocument(Int32 docNum) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexReader.cs:line 985
   at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(IndexReader
reader, Int32 docIDStart) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
1360
   at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos
infos) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
1268
   at Lucene.Net.Index.IndexWriter.ApplyDeletes() in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 5367
   at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean
flushDocStores, Boolean flushDeletes) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4374
   at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores,
Boolean flushDeletes) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4197
   at Lucene.Net.Index.IndexWriter.CloseInternal(Boolean
waitForMerges) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1997
   at Lucene.Net.Index.IndexWriter.Dispose(Boolean disposing, Boolean
waitForMerges) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1917
   at Lucene.Net.Index.IndexWriter.Dispose(Boolean waitForMerges) in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1901
   at Lucene.Net.Index.IndexWriter.Dispose() in
d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1873


Here's someone else with the same issue:

http://help.octopusdeploy.com/discussions/problems/10772-deployment-error

I would appreciate any insights.

Thanks,

---
Jason Kealey, Ing. - jkealey@franchiseblast.com
FranchiseBlast, franchise software - http://www.franchiseblast.com
Take control of your franchise operations

Re: Known bug?

Posted by Itamar Syn-Hershko <it...@code972.com>.
This is either a bug or a misuse that isn't protected against (which is
also a type of a bug). Can we work together somehow on a reproduction of
this issue so we can get it fixed?

And just to verify, is this the 3.0.3 release?

--

Itamar Syn-Hershko
http://code972.com | @synhershko <https://twitter.com/synhershko>
Freelance Developer & Consultant
Author of RavenDB in Action <http://manning.com/synhershko/>


On Wed, Jun 18, 2014 at 12:54 AM, Jason Kealey <jk...@franchiseblast.com>
wrote:

> Hey,
>
> Once in a while, I receive an error which breaks Lucene.NET until we
> completely delete the index and start from scratch. We are unable to
> rebuild the index in any other way. I've found that others have the same
> issue and wanted to know if it is a known one and, if so, if there's
> anything I can do to prevent this from corrupting my index.
>
> Here's my stack trace:
>
> System.IndexOutOfRangeException: Index of bound 0
>    at Lucene.Net.Util.BitVector.GetAndSet(Int32 bit) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Util\BitVector.cs:line 85
>    at Lucene.Net.Index.SegmentReader.DoDelete(Int32 docNum) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\SegmentReader.cs:line 1143
>    at Lucene.Net.Index.IndexReader.DeleteDocument(Int32 docNum) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexReader.cs:line 985
>    at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(IndexReader
> reader, Int32 docIDStart) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
> 1360
>    at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos
> infos) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
> 1268
>    at Lucene.Net.Index.IndexWriter.ApplyDeletes() in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 5367
>    at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean
> flushDocStores, Boolean flushDeletes) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4374
>    at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores,
> Boolean flushDeletes) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4197
>    at Lucene.Net.Index.IndexWriter.CloseInternal(Boolean
> waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1997
>    at Lucene.Net.Index.IndexWriter.Dispose(Boolean disposing, Boolean
> waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1917
>    at Lucene.Net.Index.IndexWriter.Dispose(Boolean waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1901
>    at Lucene.Net.Index.IndexWriter.Dispose() in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1873
>
>
> Here's someone else with the same issue:
>
> http://help.octopusdeploy.com/discussions/problems/10772-deployment-error
>
> I would appreciate any insights.
>
> Thanks,
>
> ---
> Jason Kealey, Ing. - jkealey@franchiseblast.com
> FranchiseBlast, franchise software - http://www.franchiseblast.com
> Take control of your franchise operations
>

Re: Known bug?

Posted by Jason Kealey <jk...@franchiseblast.com>.
Thanks for getting back to me.

1. This is a simple Windows folder on a regular disk of a normal machine;
 // FSDirectory.Open(new DirectoryInfo(pathondisk))
2. I don't have anything specified in my code; Google tells me this means
I'm using NativeFSLockFactory? (But you're the pro)
3. Local hard drive.
4. It is only used by my ASP.NET application on IIS. Only one process, but
potentially multiple simultaneous users. I basically have a process running
every 15minutes to add new data to the index, whereas the clients using my
ASP.NET application only perform reads.
5. This is a standard machine with a standard 7200rpm disk. Although it is
a web server, it is a typical computer with a very simple configuration -
not high-end server hardware.

Context: Our point of sale system is a web application. We deploy a copy of
this web application in all our stores. We're talking 5-6 users accessing
it throughout the day. To date, only one store seems to create this issue
and it happens maybe once a month. I am unable to replicate it and did not
keep a copy of the corrupt "bad index" but will do it if/when it happens
again.

Thanks,

---
Jason Kealey, Ing. - jkealey@franchiseblast.com
FranchiseBlast, franchise software - http://www.franchiseblast.com
Take control of your franchise operations


On Wed, Jun 18, 2014 at 1:07 AM, Simon Svensson <si...@devhost.se> wrote:

> Hi,
>
> I've been unable to find anything in Jira (at https://issues.apache.org/
> jira/browse/LUCENENET ) so it's not a known bug.
>
> Some questions regarding your execution environment;
> 1. What type of Directory are you using?
> 2. What type of LockFactory are you using?
> 3. Are you working with local harddrives or a remote share?
> 4. Is this an index shared between several processes? (Either locally, or
> a network share.)
> 5. Is this at an hosting environment with an unknown disk setup? (I've
> seen cases when multiple servers with supposed redundancy actually had
> SyncToy scheduled every 15 minutes...)
>
> Can you provoke this exception, including the writes to let to it, in a
> unit-test/small console application?
> Is there a copy of a known "bad index" that you can share?
>
> // Simon
>
>
> On 17/06/14 23:54, Jason Kealey wrote:
>
>> Hey,
>>
>> Once in a while, I receive an error which breaks Lucene.NET until we
>> completely delete the index and start from scratch. We are unable to
>> rebuild the index in any other way. I've found that others have the same
>> issue and wanted to know if it is a known one and, if so, if there's
>> anything I can do to prevent this from corrupting my index.
>>
>> Here's my stack trace:
>>
>> System.IndexOutOfRangeException: Index of bound 0
>>     at Lucene.Net.Util.BitVector.GetAndSet(Int32 bit) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Util\BitVector.cs:line 85
>>     at Lucene.Net.Index.SegmentReader.DoDelete(Int32 docNum) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\SegmentReader.cs:line 1143
>>     at Lucene.Net.Index.IndexReader.DeleteDocument(Int32 docNum) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexReader.cs:line 985
>>     at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(IndexReader
>> reader, Int32 docIDStart) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
>> 1360
>>     at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos
>> infos) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\
>> DocumentsWriter.cs:line
>> 1268
>>     at Lucene.Net.Index.IndexWriter.ApplyDeletes() in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 5367
>>     at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean
>> flushDocStores, Boolean flushDeletes) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4374
>>     at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores,
>> Boolean flushDeletes) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4197
>>     at Lucene.Net.Index.IndexWriter.CloseInternal(Boolean
>> waitForMerges) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1997
>>     at Lucene.Net.Index.IndexWriter.Dispose(Boolean disposing, Boolean
>> waitForMerges) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1917
>>     at Lucene.Net.Index.IndexWriter.Dispose(Boolean waitForMerges) in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1901
>>     at Lucene.Net.Index.IndexWriter.Dispose() in
>> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1873
>>
>>
>> Here's someone else with the same issue:
>>
>> http://help.octopusdeploy.com/discussions/problems/10772-deployment-error
>>
>> I would appreciate any insights.
>>
>> Thanks,
>>
>> ---
>> Jason Kealey, Ing. - jkealey@franchiseblast.com
>> FranchiseBlast, franchise software - http://www.franchiseblast.com
>> Take control of your franchise operations
>>
>>
>

Re: Known bug?

Posted by Simon Svensson <si...@devhost.se>.
Hi,

I've been unable to find anything in Jira (at 
https://issues.apache.org/jira/browse/LUCENENET ) so it's not a known bug.

Some questions regarding your execution environment;
1. What type of Directory are you using?
2. What type of LockFactory are you using?
3. Are you working with local harddrives or a remote share?
4. Is this an index shared between several processes? (Either locally, 
or a network share.)
5. Is this at an hosting environment with an unknown disk setup? (I've 
seen cases when multiple servers with supposed redundancy actually had 
SyncToy scheduled every 15 minutes...)

Can you provoke this exception, including the writes to let to it, in a 
unit-test/small console application?
Is there a copy of a known "bad index" that you can share?

// Simon

On 17/06/14 23:54, Jason Kealey wrote:
> Hey,
>
> Once in a while, I receive an error which breaks Lucene.NET until we
> completely delete the index and start from scratch. We are unable to
> rebuild the index in any other way. I've found that others have the same
> issue and wanted to know if it is a known one and, if so, if there's
> anything I can do to prevent this from corrupting my index.
>
> Here's my stack trace:
>
> System.IndexOutOfRangeException: Index of bound 0
>     at Lucene.Net.Util.BitVector.GetAndSet(Int32 bit) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Util\BitVector.cs:line 85
>     at Lucene.Net.Index.SegmentReader.DoDelete(Int32 docNum) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\SegmentReader.cs:line 1143
>     at Lucene.Net.Index.IndexReader.DeleteDocument(Int32 docNum) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexReader.cs:line 985
>     at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(IndexReader
> reader, Int32 docIDStart) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
> 1360
>     at Lucene.Net.Index.DocumentsWriter.ApplyDeletes(SegmentInfos
> infos) in d:\Lucene.Net\FullRepo\trunk\src\core\Index\DocumentsWriter.cs:line
> 1268
>     at Lucene.Net.Index.IndexWriter.ApplyDeletes() in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 5367
>     at Lucene.Net.Index.IndexWriter.DoFlushInternal(Boolean
> flushDocStores, Boolean flushDeletes) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4374
>     at Lucene.Net.Index.IndexWriter.DoFlush(Boolean flushDocStores,
> Boolean flushDeletes) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 4197
>     at Lucene.Net.Index.IndexWriter.CloseInternal(Boolean
> waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1997
>     at Lucene.Net.Index.IndexWriter.Dispose(Boolean disposing, Boolean
> waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1917
>     at Lucene.Net.Index.IndexWriter.Dispose(Boolean waitForMerges) in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1901
>     at Lucene.Net.Index.IndexWriter.Dispose() in
> d:\Lucene.Net\FullRepo\trunk\src\core\Index\IndexWriter.cs:line 1873
>
>
> Here's someone else with the same issue:
>
> http://help.octopusdeploy.com/discussions/problems/10772-deployment-error
>
> I would appreciate any insights.
>
> Thanks,
>
> ---
> Jason Kealey, Ing. - jkealey@franchiseblast.com
> FranchiseBlast, franchise software - http://www.franchiseblast.com
> Take control of your franchise operations
>