GNOME Bugzilla – Bug 556107
Evolution hang trying to connect to beagle when creating new message
Last modified: 2018-07-03 09:52:56 UTC
Sometimes when I click on the New button to compose a new mail message, Beagle hangs for at least a minute before the new mail window pops up. Stracing the process, it appears that it hangs trying to connect to the Beagle daemon, which is running on my system. [frederik@defected tmp]$ strace -p 10263 Process 10263 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...>) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, NULL) = 0 connect(29, {sa_family=AF_FILE, path="/home/frederik/.beagle/socket"}, 110) = -1 EAGAIN (Resource temporarily unavailable) nanosleep({0, 200000000}, ^C <unfinished ...> Process 10263 detached [frederik@defected tmp]$ [frederik@defected tmp]$ [frederik@defected tmp]$ ps aux | grep beagle frederik 5070 0.5 1.0 333012 43468 ? SNl 08:56 0:36 beagled /usr/lib64/beagle/BeagleDaemon.exe --replace --bg frederik 6705 0.9 1.0 223392 42360 ? SNl 08:58 1:07 beagled-helper /usr/lib64/beagle/IndexHelper.exe frederik 31784 0.0 0.0 340 120 pts/5 R+ 10:57 0:00 grep --color beagle lib64beagle1-0.3.5.1-2mdv2009.0 evolution-data-server-2.24.0-2mdv2009.0 mono-web-1.9.1-5mdv2009.0 evolution-2.24.0-2mdv2009.0 python-beagle-0.3.5.1-2mdv2009.0 mono-data-sqlite-1.9.1-5mdv2009.0 beagle-0.3.8-12mdv2009.0 beagle-gui-0.3.8-12mdv2009.0 mono-addins-0.3.1-2mdv2009.0 mono-1.9.1-5mdv2009.0 evolution-sharp-0.18.0-1mdv2009.0 beagle-libs-0.3.8-12mdv2009.0 beagle-evolution-0.3.8-12mdv2009.0 mono-winforms-1.9.1-5mdv2009.0 firefox-ext-beagle-0.3.8-12mdv2009.0 mono-data-1.9.1-5mdv2009.0 lib64mono0-1.9.1-5mdv2009.0 Mandriva Linux 2009.0 x86_64
The first sentence of my description is inaccurate/wrong. To clarify: when clicking on the New button to compose a mail message in Evolution, Evolution temporarily hangs trying to connect to Beagle. Mandriva bug report: https://qa.mandriva.com/show_bug.cgi?id=44856
New Mandriva bug report: https://qa.mandriva.com/show_bug.cgi?id=44532 GTK+ file selectors hang too when this happens.
I also found this in Indexhelper log, I think this could be related: 20081013 08:58:04.4602 06705 IndexH INFO: Starting Index Helper process (version 0.3.8) 20081013 08:58:04.4746 06705 IndexH INFO: Running on Mono 1.9.1 20081013 08:58:04.4805 06705 IndexH INFO: Extended attributes are supported 20081013 08:58:04.4808 06705 IndexH INFO: Command Line: /usr/lib64/beagle/IndexHelper.exe 20081013 08:58:05.1238 06705 IndexH WARN: bibparse is not found; bibtex files will not be indexed 20081013 08:58:10.7113 06705 IndexH ERROR: Exception trying to retrieve FSpot/Digikam information:Mono.Data.Sqlite.SqliteException: Sqlite error 20081013 08:58:10.7113 06705 IndexH ERROR: no such column: directory_path 20081013 08:58:10.7113 06705 IndexH ERROR: at Mono.Data.Sqlite.Sqlite3.Prepare (System.String strSql, Mono.Data.Sqlite.SqliteStatement previous, System.String& strRemain) [0x00000] 20081013 08:58:10.7113 06705 IndexH ERROR: at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: Error loading TIFF file 20081013 09:16:06.6321 06705 IndexH ERROR EX: SemWeb.ParserException: rdf:RDF cannot be used as a property name. 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.RdfXmlReader.OnError (System.String message) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.RdfXmlReader.ParseProperty (SemWeb.Entity subject, System.Int32& liIndex) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.RdfXmlReader.ParsePropertyNodes (SemWeb.Entity subject) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.RdfXmlReader.ParseDescription () [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.RdfXmlReader.Select (StatementSink storage) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.MemoryStore+StoreImpl.Import (StatementSource source) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at SemWeb.Store.Import (StatementSource source) [0x00000] 20081013 09:16:06.6321 06705 IndexH ERROR EX: at FSpot.Xmp.XmpFile.Load (System.IO.Stream stream) [0x00000] 20081013 09:58:03.5160 06705 IndexH INFO: Shutdown requested
(From my response in the mailing list) Roughly, libbeagle is trying to connect to beagle using the latter's unix socket. Sometimes when the load is high (and sometimes for reasons I havent yet figured out) this takes a long time. The connection happens in a non-blocking mode but sometimes the buffer at beagle's end gets filled up so quickly that several sleep/retries are needed. That is pretty much the cause of the delay. I can reproduce the problem if I am firing lots of queries to beagled; but some people have reported that the problem happens even when there are no other queries. I don't yet know what causes the unix socket connection problems in that case. Can you check if this makes it easier. From what I can tell, there was no release after this change. http://svn.gnome.org/viewvc/beagle?view=revision&revision=4747 Also, can you check if there are multiple instance of beagled running ? Technical followup: Earlier libbeagle attempted to create a blocking connection. That had some other issues and in general a non-blocking mode is preferred. So I tried to emulate the blocking mode by attempting several non-blocking connection-sleep-retry. But for some reason, this causes a lot of EAGAIN in connect() even though there is (as reported by other people) no apparent activity. I havent been able to resolve this mystery yet. Relevant unix socket code in http://svn.gnome.org/viewvc/beagle/trunk/libbeagle/beagle/beagle-request.c?view=markup (function _beagle_connect_timeout) If anyone can spot anything wrong in the unix socket connection code, then I will appreciate any help in fixing the problem.
I just hit this problem again. $ ps aux | grep beagle frederik 1686 0.0 0.0 7408 788 pts/6 S+ 11:54 0:00 grep --color beagle frederik 7157 0.0 0.9 263176 37412 ? SNl 09:06 0:04 beagled /usr/lib64/beagle/BeagleDaemon.exe --replace --bg [frederik@defected Log]$ for i in current* > do > echo "=== $i ===" > cat $i > done === current-Beagle === 20081113 09:06:15.2796 07157 Beagle INFO: Starting Beagle Daemon (version 0.3.8) 20081113 09:06:15.3082 07157 Beagle INFO: Running on Mono 1.9.1 20081113 09:06:15.3084 07157 Beagle INFO: Command Line: /usr/lib64/beagle/BeagleDaemon.exe --replace --bg 20081113 09:06:16.4466 07157 Beagle WARN: Inotify watches may be too low (8192) for some users! Increase it to at least 65535 by setting fs.inotify.max_user_watches in /etc/sysctl.conf 20081113 09:06:18.4533 07157 Beagle ERROR EX: Caught exception while instantiating Files backend 20081113 09:06:18.4533 07157 Beagle ERROR EX: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: read past EOF 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.BufferedIndexInput.Refill () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.BufferedIndexInput.ReadByte () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.IndexInput.ReadInt () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Index.SegmentInfos+AnonymousClassFindSegmentsFile1.DoBody (System.String segmentFileName) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Index.SegmentInfos+FindSegmentsFile.run () [0x00000] --- End of inner exception stack trace --- 20081113 09:06:18.4533 07157 Beagle ERROR EX: 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Activator.CreateInstance (System.Type type) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Beagle.Daemon.QueryDriver.ScanAssemblyForQueryables (System.Reflection.Assembly assembly) [0x00000] 20081113 09:07:19.1167 07157 Beagle WARN: GMail account information not set. Search is disabled. 20081113 09:16:18.5527 07157 Beagle ERROR: Something terrible happened --- Flush failed log files check /home/frederik/.beagle/Log/current-Beagle. === current-BeagleConsole === Marshaling contacts_added signal Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Cannot cast from source type to destination type. at Beagle.Daemon.EvolutionDataServerQueryable.BookContainer.OnContactsAdded (System.Object o, Evolution.ContactsAddedArgs args) [0x00000] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) at GLib.SignalClosure.MarshalCallback(IntPtr , IntPtr , UInt32 , IntPtr , IntPtr , IntPtr ) at GLib.MainLoop.g_main_loop_run(IntPtr ) at GLib.MainLoop.g_main_loop_run(IntPtr ) at GLib.MainLoop.Run() at Beagle.Daemon.BeagleDaemon.DoMain(System.String[] args) at Beagle.Daemon.BeagleDaemon.Main(System.String[] args) === current-BeagleExceptions === 20081113 09:06:18.4533 07157 Beagle ERROR EX: Caught exception while instantiating Files backend 20081113 09:06:18.4533 07157 Beagle ERROR EX: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.IOException: read past EOF 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.BufferedIndexInput.Refill () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.BufferedIndexInput.ReadByte () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Store.IndexInput.ReadInt () [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Index.SegmentInfos+AnonymousClassFindSegmentsFile1.DoBody (System.String segmentFileName) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Lucene.Net.Index.SegmentInfos+FindSegmentsFile.run () [0x00000] --- End of inner exception stack trace --- 20081113 09:06:18.4533 07157 Beagle ERROR EX: 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at System.Activator.CreateInstance (System.Type type) [0x00000] 20081113 09:06:18.4533 07157 Beagle ERROR EX: at Beagle.Daemon.QueryDriver.ScanAssemblyForQueryables (System.Reflection.Assembly assembly) [0x00000] === current-IndexHelper === 20081113 09:07:20.0460 09172 IndexH INFO: Starting Index Helper process (version 0.3.8) 20081113 09:07:20.0589 09172 IndexH INFO: Running on Mono 1.9.1 20081113 09:07:20.0655 09172 IndexH INFO: Extended attributes are supported 20081113 09:07:20.0657 09172 IndexH INFO: Command Line: /usr/lib64/beagle/IndexHelper.exe 20081113 09:07:21.7678 09172 IndexH WARN: bibparse is not found; bibtex files will not be indexed 20081113 09:49:48.7548 09172 IndexH ERROR: Exception trying to retrieve FSpot/Digikam information:Mono.Data.Sqlite.SqliteException: Sqlite error 20081113 09:49:48.7548 09172 IndexH ERROR: no such column: directory_path 20081113 09:49:48.7548 09172 IndexH ERROR: at Mono.Data.Sqlite.Sqlite3.Prepare (System.String strSql, Mono.Data.Sqlite.SqliteStatement previous, System.String& strRemain) [0x00000] 20081113 09:49:48.7548 09172 IndexH ERROR: at Mono.Data.Sqlite.SqliteCommand.BuildNextCommand () [0x00000] 20081113 10:38:10.2950 09172 IndexH INFO: Shutdown requested 20081113 10:38:11.1013 09172 IndexH INFO: Index helper process shut down cleanly. === current-IndexHelperConsole ===
Does the libbeagle patch posted in #4 help ?
No, it doesn't... Tried it (/main/testing package repository: libbeagle-0.3.5.1-3mdv2009.0) with Mandriva 2009.0 This is what I get: Current-Beagle: 20090127 18:58:59.7209 04131 Beagle INFO: Starting Beagle Daemon (version 0.3.8) 20090127 18:58:59.7553 04131 Beagle INFO: Running on Mono 1.9.1 20090127 18:58:59.7557 04131 Beagle INFO: Command Line: /usr/lib/beagle/BeagleDaemon.exe --replace --bg 20090127 18:59:02.9911 04131 Beagle WARN: Inotify watches may be too low (8192) for some users! Increase it to at least 65535 by setting fs.inotify.max_user_watches in /etc/sysctl.conf AND Current-BeagleConsole: Marshaling objects_added signal Exception in Gtk# callback delegate Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidCastException: Cannot cast from source type to destination type. at Beagle.Daemon.EvolutionDataServerQueryable.CalContainer.OnObjectsAdded (System.Object o, Evolution.ObjectsAddedArgs args) [0x00000] at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[]) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] --- End of inner exception stack trace --- at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] at GLib.ExceptionManager.RaiseUnhandledException(System.Exception e, Boolean is_terminal) at GLib.SignalClosure.MarshalCallback(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) at GLib.SignalClosure.MarshalCallback(IntPtr , IntPtr , UInt32 , IntPtr , IntPtr , IntPtr ) at Evolution.Cal.e_cal_new(IntPtr , Int32 ) at Evolution.Cal.e_cal_new(IntPtr , Int32 ) at Evolution.Cal..ctor(Evolution.Source source, CalSourceType type) at Beagle.Daemon.EvolutionDataServerQueryable.CalContainer.OpenClient() at Beagle.Daemon.EvolutionDataServerQueryable.SourcesHandler.IndexSourceGroup(Evolution.SourceGroup group, Boolean all_items) at Beagle.Daemon.EvolutionDataServerQueryable.SourcesHandler..ctor(System.String gconf_key, System.Type container_type, Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable queryable, System.String fingerprint, System.Object[] ctor_args) at Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable.ConnectToEDS() at Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable.StartWorker() at Beagle.Daemon.EvolutionDataServerQueryable.EvolutionDataServerQueryable+<>c__CompilerGenerated0.<Start>c__1() at GLib.Idle+IdleProxy.Handler() at GLib.Idle+IdleProxy.Handler() at GLib.MainLoop.g_main_loop_run(IntPtr ) at GLib.MainLoop.g_main_loop_run(IntPtr ) at GLib.MainLoop.Run() at Beagle.Daemon.BeagleDaemon.DoMain(System.String[] args)
Reopening as the question has been answered.
I've never encountered this problem anymore with beagle 0.3.9, to me this bug can be closed now.
Beagle is not under active development anymore and had its last code changes in early 2011. Its codebase has been archived (see bug 796735): https://gitlab.gnome.org/Archive/beagle/commits/master "tracker" is an available alternative. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.