[ubuntu-mono] [Bug 47153] Beagle doesn't cleanup lost locks and stalls as a result

Nicolas Maquet nmaquet at gmail.com
Sun May 28 18:08:06 BST 2006


Public bug reported:

Binary package hint: beagle

When beagle is shutdown unproperly (power failure or kill -9 for example), it leaves ".lock" files in the ~/.beagle directory.
These files are not erased by beagle at startup, resulting in beagle stalling completely when it is restarted. More details follow.

Steps to reproduce : 
---------------------------

- We need a fresh beagle index : 
  $  mv ~/.beagle ~/.beagle_bak

- This accelerates things up :
  $ export BEAGLE_EXERCISE_THE_DOG=1

- Start beagle :
  $ beagled --debug --fg

- Open nautilus go to the following path : 
   ~/.beagle/Indexes/FileSystemIndex/Locks/

- When beagled is indexing files, you should see .lock files appearing
and disappearing from the Locks folder

- Now we need a bit of luck to reproduce the bug : 
  $ killall beagled beagled-helper -s 9

- Check if there are still .lock files in the nautilus window; if not,
restart beagled and try again

- If you are "lucky", .lock files remain. In this case :
  $ beagled --debug --fg

It will soon stall, yielding a backtrace similar to this :

Warn: Exception caught while executing Beagle.Daemon.ConnectionHandler:Void HandleConnection()
Warn: System.IO.IOException: Lock obain timed out: /home/nmaquet/.beagle/Indexes/FileSystemIndex/Locks/lucene-f92013833becf7ae74327981fcb12b36-write.lock -- pid  -- process exists
in [0x0010e] (at /build/buildd/beagle-0.2.6/beagled/Lucene.Net/Store/Lock.cs:91) Lucene.Net.Store.Lock:Obtain (Int64 lockWaitTimeout)
in [0x0008d] (at /build/buildd/beagle-0.2.6/beagled/Lucene.Net/Index/IndexWriter.cs:414) Lucene.Net.Index.IndexWriter:.ctor (Lucene.Net.Store.Directory d, Lucene.Net.Analysis.Analyzer a, Boolean create, Boolean closeDir)
in [0x00005] (at /build/buildd/beagle-0.2.6/beagled/Lucene.Net/Index/IndexWriter.cs:401) Lucene.Net.Index.IndexWriter:.ctor (Lucene.Net.Store.Directory d, Lucene.Net.Analysis.Analyzer a, Boolean create)
in [0x00293] (at /build/buildd/beagle-0.2.6/beagled/LuceneIndexingDriver.cs:216) Beagle.Daemon.LuceneIndexingDriver:Flush_Unlocked (Beagle.Daemon.IndexerRequest request)
in [0x0000f] (at /build/buildd/beagle-0.2.6/beagled/LuceneIndexingDriver.cs:90) Beagle.Daemon.LuceneIndexingDriver:Flush (Beagle.Daemon.IndexerRequest request)
in [0x00079] (at /build/buildd/beagle-0.2.6/beagled/IndexHelper/RemoteIndexerExecutor.cs:69) Beagle.IndexHelper.RemoteIndexerExecutor:Execute (Beagle.RequestMessage raw_request)
in [0x00232] (at /build/buildd/beagle-0.2.6/beagled/Server.cs:275) Beagle.Daemon.ConnectionHandler:HandleConnection ()
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void ()
in [0x0005a] (at /build/buildd/beagle-0.2.6/Util/ExceptionHandlingThread.cs:54) Beagle.Util.ExceptionHandlingThread:ThreadStarted ()

I hope this helps :)

** Affects: beagle (Ubuntu)
       Severity: Normal
       Priority: (none set)
         Status: Unconfirmed

-- 
Beagle doesn't cleanup lost locks and stalls as a result
https://launchpad.net/bugs/47153



More information about the Ubuntu-mono mailing list