Hi, i'm new to the list, so if this falls under FAQ, please just point me in the right direction.

We've been using Lucene.net 1.9.1 for quite a while and I wanted to finally get us current with lucene, so i incorporated 2.9.1 into our code. Unfortunately, 2.9.1 crashes under mono 2.4. Has anyone else tried it on Mono? I downgraded to 2.4.0 which does work but has problems with unclean shutdown with SimpleFSLock on windows and linux, that NativeFSLock in 2.9.1 does not exhibit.

Before i go into the 2.9.1 issues in detail, in 2.40 is there a best practice for cleaning up lingering locks for SimpleFSLock other than manually looking for the lock file and clearing it out at startup?

Anyway, here are the 2.9.1 issues i came across. Being mono only issues i don't know if this helpful, but i thought i'd see if this rings a bell.

When no index exists yet, IndexWriter will die and completely take down the process with this:

** ERROR:(mini.c:3624):mini_method_compile: assertion failed: (tblock- >native_offset)
Stacktrace:

at Lucene.Net.Index.SegmentInfos.FinishCommit (Lucene.Net.Store.Directory) <0xffffffff> at Lucene.Net.Index.SegmentInfos.FinishCommit (Lucene.Net.Store.Directory) <0x000e4> at Lucene.Net.Index.SegmentInfos.Commit (Lucene.Net.Store.Directory) <0x00024> at Lucene.Net.Index.IndexWriter.Init (Lucene .Net .Store .Directory ,Lucene .Net .Analysis .Analyzer ,bool ,bool ,Lucene .Net .Index.IndexDeletionPolicy,bool,int,Lucene.Net.Index.DocumentsWriter/ IndexingChain,Lucene.Net.Index.IndexCommit) <0x001a3> at Lucene.Net.Index.IndexWriter.Init (Lucene .Net .Store .Directory ,Lucene .Net .Analysis .Analyzer ,bool ,Lucene .Net .Index.IndexDeletionPolicy,bool,int,Lucene.Net.Index.DocumentsWriter/ IndexingChain,Lucene.Net.Index.IndexCommit) <0x00076> at Lucene.Net.Index.IndexWriter..ctor (Lucene .Net .Store .Directory,Lucene.Net.Analysis.Analyzer,Lucene.Net.Index.IndexWriter/ MaxFieldLength) <0x001c2>
  at Repro.Program.Main (string[]) <0x00089>
at (wrapper runtime-invoke) Repro.Program.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>

If an index already exists both IndexWriter and IndexSearcher will throw an exception (without taking down the process this time) for NIOFSDirectory:

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at Lucene.Net.Store.NIOFSDirectory+NIOFSIndexInput.ReadInternal (System.Byte[] b, Int32 offset, Int32 len) [0x00000]
  at Lucene.Net.Store.BufferedIndexInput.Refill () [0x00000]
  at Lucene.Net.Store.BufferedIndexInput.ReadByte () [0x00000]
  at Lucene.Net.Store.IndexInput.ReadInt () [0x00000]
at Lucene.Net.Index.SegmentInfos+FindSegmentsFile.Run (Lucene.Net.Index.IndexCommit commit) [0x00000] at Lucene.Net.Index.DirectoryReader.Open (Lucene.Net.Store.Directory directory, IndexDeletionPolicy deletionPolicy, Lucene.Net.Index.IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor) [0x00000] at Lucene.Net.Index.IndexReader.Open (Lucene.Net.Store.Directory directory, IndexDeletionPolicy deletionPolicy, Lucene.Net.Index.IndexCommit commit, Boolean readOnly, Int32 termInfosIndexDivisor) [0x00000] at Lucene.Net.Index.IndexReader.Open (Lucene.Net.Store.Directory directory) [0x00000] at Lucene.Net.Search.IndexSearcher..ctor (Lucene.Net.Store.Directory directory) [0x00000] at (wrapper remoting-invoke-with-check) Lucene.Net.Search.IndexSearcher:.ctor (Lucene.Net.Store.Directory)
  at Repro.Program.Main (System.String[] args) [0x00000]

I've also come across lock timeout with NativeFSLock on mono, but can't figure out how to repro this.

cheers,
Arne Claassen

MindTouch
San Diego, CA
http://twitter.com/sdether

Reply via email to