GNOME Bugzilla – Bug 354793
Exception in IndexHelper: System.IO.IOException: Too many open files
Last modified: 2006-09-07 17:08:49 UTC
Please describe the problem: I noticed the following exception in the current-IndexHelper log file: 060907 1138420519 05340 IndexH WARN EX: Exception caught while executing Beagle.Daemon.ConnectionHandler:Void HandleConnection() 060907 1138420519 05340 IndexH WARN EX: System.IO.IOException: Too many open files 060907 1138420519 05340 IndexH WARN EX: at System.IO.FileStream..ctor (System.String name, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x0 0246] in /build/buildd/mono-1.1.17.1/mcs/class/corlib/System.IO/FileStream.cs:232 060907 1138420519 05340 IndexH WARN EX: at System.IO.FileStream..ctor (System.String name, FileMode mode, FileAccess access, FileShare share) [0x00000] in /build/buildd/mono-1.1.17.1/mcs/class/corlib/Syst em.IO/FileStream.cs:121 060907 1138420519 05340 IndexH WARN EX: at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare) 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Store.FSIndexInput+Descriptor..ctor (Lucene.Net.Store.FSIndexInput enclosingInstance, System.IO.FileInfo file, FileAccess fileAccess) [0x00000] in /bu ild/buildd/beagle-0.2.8/beagled/Lucene.Net/Store/FSDirectory.cs:741 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Store.FSIndexInput..ctor (System.IO.FileInfo path) [0x00006] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Store/FSDirectory.cs:771 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Store.FSDirectory.OpenInput (System.String name) [0x00000] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Store/FSDirectory.cs:594 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Util.BitVector..ctor (Lucene.Net.Store.Directory d, System.String name) [0x0000d] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Util/BitVector.cs:1 24 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.SegmentReader.Initialize (Lucene.Net.Index.SegmentInfo si) [0x000b2] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index/SegmentReader.cs:160 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.SegmentReader.Get (Lucene.Net.Store.Directory dir, Lucene.Net.Index.SegmentInfo si, Lucene.Net.Index.SegmentInfos sis, Boolean closeDir, Boolean ownDir) [0x0003c] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index/SegmentReader.cs:136 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.SegmentReader.Get (Lucene.Net.Index.SegmentInfo si) [0x00000] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index/SegmentReader.cs:116 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.IndexReader+AnonymousClassWith.DoBody () [0x00045] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index/IndexReader.cs:68 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Store.Lock+With.Run () [0x00014] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Store/Lock.cs:144 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.IndexReader.Open (Lucene.Net.Store.Directory directory, Boolean closeDirectory) [0x00008] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index /IndexReader.cs:204 060907 1138420519 05340 IndexH WARN EX: at Lucene.Net.Index.IndexReader.Open (Lucene.Net.Store.Directory directory) [0x00000] in /build/buildd/beagle-0.2.8/beagled/Lucene.Net/Index/IndexReader.cs:196 060907 1138420519 05340 IndexH WARN EX: at Beagle.Daemon.LuceneIndexingDriver.Flush_Unlocked (Beagle.Daemon.IndexerRequest request) [0x00012] in /build/buildd/beagle-0.2.8/beagled/LuceneIndexingDriver.cs: 99 060907 1138420519 05340 IndexH WARN EX: at Beagle.Daemon.LuceneIndexingDriver.Flush (Beagle.Daemon.IndexerRequest request) [0x0000d] in /build/buildd/beagle-0.2.8/beagled/LuceneIndexingDriver.cs:89 060907 1138420519 05340 IndexH WARN EX: at Beagle.IndexHelper.RemoteIndexerExecutor.Execute (Beagle.RequestMessage raw_request) [0x00072] in /build/buildd/beagle-0.2.8/beagled/IndexHelper/RemoteIndexerExe cutor.cs:64 060907 1138420519 05340 IndexH WARN EX: at Beagle.Daemon.ConnectionHandler.HandleConnection () [0x0022f] in /build/buildd/beagle-0.2.8/beagled/Server.cs:273 060907 1138420519 05340 IndexH WARN EX: at (wrapper delegate-invoke) System.MulticastDelegate:invoke_void () 060907 1138420519 05340 IndexH WARN EX: at Beagle.Util.ExceptionHandlingThread.ThreadStarted () [0x00054] in /build/buildd/beagle-0.2.8/Util/ExceptionHandlingThread.cs:53 After this, beagle stops indexing and no more info is printed in either current-Beagle or current-IndexHelper. Steps to reproduce: 1. 2. 3. Actual results: Expected results: Does this happen every time? Yes. It happens every time after Beagle has been running for a while. Other information: I started getting this error after upgrading to Ubuntu Edgy.
Can you attach the output of "ls -l /proc/<pid>/fd", where <pid> is the pid of the failing index helper process?
Created attachment 72381 [details] Output of ls -l /proc/<pid>/fd Attaching output of ls -l /proc/<pid>/fd.
I also noticed this in the current-IndexHelper log file: 060907 1208429540 05340 IndexH DEBUG: No activity for 30.0 minutes, shutting down 060907 1208429796 05340 IndexH DEBUG: CancelIfBlocking Beagle.Daemon.ConnectionHandler 060907 1208430254 05340 IndexH DEBUG: Server '/home/anders/.beagle/socket-helper' shut down 060907 1208430401 05340 IndexH DEBUG: (1) Waiting for 1 worker... 060907 1208430403 05340 IndexH DEBUG: waiting for HandleConnection (47) The IndexHelper was never terminated though.
This is fixed in 0.2.9; the bug happens because you are using Mono 1.1.17.