Re: How does beagle get stopped?



Hi Max,

> I took a look at the code and that is exactly what happens. But "beagle
> --fg" does not seem to return. I use it in a script that waits for
> beagled to return to stop the repository afterwards. This works fine
> with beagle-shutdown. However it does not seem to work when logging
> out /shutting down.

> The log at &9 prints the following:
>
>         Starting beagle and watching it...
>         Always: Starting Beagle Daemon (version 0.2.18)
...
>         Debug: Lost our connection to the X server!  Trying to shut down
>         gracefully
>         Always: Shutdown requested
>         Debug: Stopping inotify threads
>         Debug: Server '/home/max/.beagle++/socket' shut down
>         Debug: All workers have finished.  Exiting main loop.
>         Debug: Xlib is forcing us to exit!
>         Debug: Live ExceptionHandlingThread: EHT 14186 [14106
>         BeagleDaemon] Beagle.Util.Inotify:SnarfWorker
> EOF
>
> Any ideas why this does not return while beagle-shutdown does?

Yesterday I found out a few places where index-helper/beagle could get caught 
during shutdown and not exit. That prompted me to re-read your email. If you 
have already figured it out, just ignore.

The last line in the log above says
	- "Debug: Live ExceptionHandlingThread: EHT 14186 [14106 BeagleDaemon] 
Beagle.Util.Inotify:SnarfWorker"
which means there is this SnarfWorker inotify thread that is still running, 
which is causing the process to not exit. SnarfWorker is a thread used in our 
Inotify handler to get inotify events asynchronously. During shutdown 
(after "stopping inotify threads") that thread is killed. I have never seen 
that thread to hang before, but I generally dont run with Xss enabled (i.e. 
my beagled does not monitor X to figure out when to quit; I run it from a 
terminal). So its possible there is some issue there that I am not aware of.

- dBera

-- 
-----------------------------------------------------
Debajyoti Bera @ http://dtecht.blogspot.com
beagle / KDE fan
Mandriva / Inspiron-1100 user


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]