GNOME Bugzilla – Bug 329286
Beagle daemon crashes shortly after start
Last modified: 2006-02-22 18:41:42 UTC
Steps to reproduce: Shortly after the daemon is started by running "beagled" in a terminal, it crashes and the search gui tells me it isn't running and should start it. The output from the terminal is attached. Stack trace: Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object in <0x0002e> System.IO.StreamWriter:LowLevelWrite (System.String s) in <0x0001d> System.IO.StreamWriter:Write (System.String value) in <0x0000e> System.IO.TextWriter:WriteLine (System.String value) in <0x002f4> Beagle.Util.Log:WriteLine (LogLevel level, System.String format, System.Object[] args, System.Exception ex) in <0x00011> Beagle.Util.Log:Warn (System.String message, System.Object[] args) in <0x0000d> Beagle.Util.Logger:Warn (System.String message, System.Object[] args) in <0x00222> Beagle.Util.ExceptionHandlingThread:ThreadStarted () in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void () Other information:
Are you building from source, or using a package?
Beagle was built from source using "--prefix=/usr" as the only configure parameter.
Ok, can you try changing some code for me? Open Util/ExceptionHandlingThread.cs and find the two lines that call Logger.Log.Warn() and change them to Console.WriteLine(). Recompile and see if you continue to see the error. (Better still, attach the output of those two lines)
The error still occurs. The following was ouputted to the terminal: ** ERROR **: file critical-sections.c: line 89 (DeleteCriticalSection): assertion failed: (ret == 0) aborting...
You get the same exception? That ** ERROR ** line indicates that this is a mono bug, not a beagle one.
The exception only occurs from time to time. Most of the time beagled just segfaults without printing anything to the console. After watching beagle-status for a while, I noticed that beagled doesn't get past "Optimize EvolutionDataServerIndex" etc. before shutting down. After removing EvolutionBackends.dll from /usr/lib/beagle/Backends/ the index runs without faults. The DLL file (which was made and installed from the beagle source) is attached. I'm running Ubuntu Dapper with the following installed: libevolution-cil 0.10.2-2ubuntu2 mono 1.1.13.1-1ubuntu3
Created attachment 58562 [details] Problematic DLL file.
Can you run with the Console.WriteLine() changes I suggested above until you hit the exception and print the output? That appears to be the real bug here. Are you running on a 64-bit arch?
I'm not a 64 Bit system. Sorry for the delay. For some reason the code change resulted in beagle just failing without printing anything to the console. I've tried it several times but nothing has come about. I was able to get the following from running 'beagle --replace --debug --fg' kevin@vital:~/Media/Software/beagle$ beagled --replace --debug --fg Debug: Starting Beagle Daemon (version 0.2.1) Debug: Command Line: /usr/lib/beagle/BeagleDaemon.exe --replace --debug --fg Debug: Starting main loop Debug: Starting messaging server Debug: Attempting to replace another beagled. Debug: Sending Shutdown Debug: Starting messaging server Debug: Starting QueryDriver Debug: Found index helper at /usr/lib/beagle/beagled-index-helper Debug: Found 2 types in EvolutionBackends, Version=0.0.0.0, Culture=neutral Debug: KMail folders not found. Will keep trying Debug: Starting Inotify Backend Debug: Loading Beagle.Util.Conf+IndexingConfig from indexing.xml Debug: Loading Beagle.Util.Conf+DaemonConfig from daemon.xml Debug: Loading Beagle.Util.Conf+SearchingConfig from searching.xml Debug: Loading Beagle.Util.Conf+NetworkingConfig from networking.xml Debug: Loading Beagle.Util.Conf+WebServicesConfig from webservices.xml Debug: Found 11 types in BeagleDaemonLib, Version=1.9.0.0, Culture=neutral Debug: Found 0 user-configured static queryables Debug: Waiting 60 seconds before starting queryables Debug: Starting Scheduler thread Debug: Starting Inotify threads Debug: Daemon initialization finished after 4.87s Debug: Caught ResponseMessageException: Connection refused Debug: InnerException is SocketException -- we probably need to launch a helper Debug: Launching helper process Debug: IndexHelper PID is 11279 Debug: Starting messaging server Warn: Unable to set IO-priority for process to idle Debug: Helper Size: VmRSS=14.7 MB, size=1.00, 0.0% Debug: Found IndexHelper (11279) in 2.01s Debug: Helper Size: VmRSS=25.2 MB, size=1.72, 18.0% Debug: Starting queryables Debug: Scanning addressbooks and calendars Error: Unhandled exception thrown. Exiting immediately. Error: System.TypeInitializationException: An exception was thrown by the type initializer for Evolution.SourceList ---> System.DllNotFoundException: libedataserver-1.2.so.4 in (wrapper managed-to-native) Evolution.Source:e_source_get_type () in <0x00014> Evolution.Source:get_GType () in <0x00026> GtkSharp.EvolutionSharp.ObjectManager:Initialize () in <0x00007> Evolution.SourceList:.cctor ()--- End of inner exception stack trace --- in (unmanaged) 0xb7e114f1 in [0x00029] (at /home/kevin/Media/Software/beagle/beagled/EvolutionDataServerQueryable/SourcesHandler.cs:51) Beagle.Daemon.EvolutionDataServerQueryable.SourcesHandler:.ctor (string,System.Type,Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable,string) in [0x00054] (at /home/kevin/Media/Software/beagle/beagled/EvolutionDataServerQueryable/EvolutionDataServerQueryable.cs:77) Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable:Start () in [0x00006] (at /home/kevin/Media/Software/beagle/beagled/Queryable.cs:51) Beagle.Daemon.Queryable:Start () in [0x00032] (at /home/kevin/Media/Software/beagle/beagled/QueryDriver.cs:320) Beagle.Daemon.QueryDriver:StartQueryables () in <0x00047> (wrapper delegate-invoke) System.MulticastDelegate:invoke_bool () in <0x0002a> TimeoutProxy:Handler () in <0x00036> (wrapper native-to-managed) TimeoutProxy:Handler () in (unmanaged) 0xb7cee317 in <0x00004> (wrapper managed-to-native) Gtk.Application:gtk_main () in <0x00007> Gtk.Application:Run () in [0x0036d] (at /home/kevin/Media/Software/beagle/beagled/BeagleDaemon.cs:410) Beagle.Daemon.BeagleDaemon:DoMain (string[]) in [0x00001] (at /home/kevin/Media/Software/beagle/beagled/BeagleDaemon.cs:224) Beagle.Daemon.BeagleDaemon:Main (string[]) Debug: Server '/home/kevin/.beagle/socket' shut down Debug: The daemon appears to have gone away. Debug: Shutting down helper. Debug: (1) Waiting for 1 worker... Debug: waiting for server '/home/kevin/.beagle/socket-helper' kevin@vital:~/Media/Software/beagle$ Debug: Server '/home/kevin/.beagle/socket-helper' shut down Debug: Exiting
Forgot to add that I have Evolution Data Server 1.5.90 installed and it provides /usr/lib/libedataserver-1.2.so.7
*** Bug 329838 has been marked as a duplicate of this bug. ***
Just edit /usr/lib/mono/gac/evolution-sharp/2.0.0.0__457eed85bd9370df/evolution-sharp.dll.config file and change: <dllmap dll="edataserver" target="libedataserver-1.2.so.4"/> to this: <dllmap dll="edataserver" target="libedataserver-1.2.so.7"/> This is a problem with libevolution-cil ubuntu/debian package.
That fixed the problem. Thanks, Krzysztof.
That is not a safe change to make, as I've stated several times before: http://mail.gnome.org/archives/dashboard-hackers/2006-February/msg00077.html http://mail.gnome.org/archives/dashboard-hackers/2005-May/msg00088.html Beagle may crash as a result of this; if it does don't file bugs, you keep both halves. :) *** This bug has been marked as a duplicate of 329273 ***
I tried the solution listed but it didnt worked for me :(.. it crashed the same way :( Another hint?