After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723198 - local folder sync crash - first attempt after adding new gnote client with existing messages
local folder sync crash - first attempt after adding new gnote client with ex...
Status: RESOLVED FIXED
Product: gnote
Classification: Applications
Component: synchronization
3.10.x
Other Linux
: Normal normal
: ---
Assigned To: gnote-maint
gnote-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-28 21:51 UTC by msocorcim
Modified: 2015-07-12 12:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
strace output leading up to segv (1.70 KB, text/plain)
2014-01-28 21:51 UTC, msocorcim
Details
sync dialog before crash (24.33 KB, image/png)
2014-01-28 22:48 UTC, msocorcim
Details
Backtrace (sanitized) (25.73 KB, text/plain)
2014-01-28 23:43 UTC, msocorcim
Details

Description msocorcim 2014-01-28 21:51:03 UTC
Created attachment 267448 [details]
strace output leading up to segv

a lock file is created:

<?xml version="1.0"?>
<lock><transaction-id>36058f61-87f5-4ebc-bcb4-83035f63774a</transaction-id><client-id></client-id><renew-count>0</renew-count><lock-expiration-duration>0:0:2:0:0</lock-expiration-duration><revision>1</revision></lock>

It might be desireable for this file to have a value in the client-id field.

Then after reloading gnote and attempting to sync, a box appears:

Server is locked 
One of your computers is currently synchronizing. Please wait 2 minutes and try again.

The lock doesn't seem to expire and must be removed manually to attempt synchronization again.

The target folder is serviced by the dropbox client, but testing with the dropbox daemon stopped doesn't make any difference.

Tf I clear syncronization settings and select an empty folder the synchronization process does not crash.

File ownership is user.user and permissions of files in the empty test synch targetm folder are 664 files and 775 directories, as also in the dropbox populated folder.
Comment 1 msocorcim 2014-01-28 22:48:16 UTC
Created attachment 267454 [details]
sync dialog before crash
Comment 2 msocorcim 2014-01-28 23:43:59 UTC
Created attachment 267457 [details]
Backtrace (sanitized)
Comment 3 msocorcim 2014-01-30 01:44:41 UTC
I installed the needed debugging packages and attached gdb to the running process and set a breakpoint to: filesystemsyncserver.cpp:201 (which is where the lockfile is checked) and contnued.  Clicked "synchronize now", the breakpoint was triggered.  Continued the process and for unknown reasons the synchronization works like a champ.  

For now I can not reproduce the crash.
Comment 4 Aurimas Černius 2014-01-30 20:35:22 UTC
> For now I can not reproduce the crash.

No surprise. It's multithreaded, so crashes are difficult to reproduce. I'll try to look into this, thanks for quite a lot of info.
Comment 5 msocorcim 2014-03-09 18:00:27 UTC
I added a new fedora 20 pc to the existing two with a fresh install of gnote 3.10.1-1.fc20 and setting it to synch to a Dropbox folder that was already populated with the current shared note-base.  

In the new pc there were only the package's start here/sample notes.  Gnote crashed at every synchronization attempt.  When I deleted the sample notes from this new Gnote note-base, synchronization was able to run normally.
Comment 6 Tomas Pospisek 2015-06-23 07:26:22 UTC
As of 3.14.0-1 gnote crashes consistently when local synchronization is on.

See f.ex. this bug report in Debian:

  https://bugs.debian.org/711354

This is giving the impression that synchronization is and has been broken for a long time in Gnote.

If nobody is willing/has the time to fix it, maybe it would be a good idea to drop that extension instead, so that users do not need to get a guinea pig treatment?
Comment 7 msocorcim 2015-06-23 15:14:28 UTC
After some initial problems the (filesystem) synchronization feature is performing well for me.  My best guess on the problem was that I'd initially populated the new Gnote repository by directly copying an existing store to a new computer then attempted to synchronize notes between these machines.

I would like to request that synchronize be left in place, since it is IMHO one of Gnote's most attractive features. If any development work is done on that subsystem I'd suggest:

 identifying the lock file as to which host/acct/process created it
 deleting old lock files after some period of time has passed
 exception handler optionally writing diagnostic/logging messages to a gnote
Comment 8 Aurimas Černius 2015-06-23 21:32:51 UTC
Can you try the newest (3.16 series) version?
There was a crash fixed in 3.15 related to disabling note actions, which is done when synchronization is performed.
Comment 9 msocorcim 2015-06-24 03:07:52 UTC
I'm "local folder" syncing Gnote 3.16 on Fedora 22 with Gnote 3.14 on Fedora 21 via Dropbox.  This appears to be working fine in both directions
Comment 10 Tomas Pospisek 2015-06-24 08:35:18 UTC
So I recompiled Gnote within Debian jessie by using the libraries that are provided there:

   https://packages.debian.org/jessie/gnote

I have reactivated local synchronisation and so far Gnote is alive. So unless you won't hear from me later, I'm considering this problem fixed in Gnote 3.15.

However there are a few other important points that I'd like to note:

1. gnote segfaults on exit:

$ gnote &
[1] 32021

$ # at this point I select Gnote -> Quit
(gnote:32021): Gtk-CRITICAL **: gtk_widget_get_parent: assertion 'GTK_IS_WIDGET (widget)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_freeze_notify: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed

(gnote:32021): Gtk-CRITICAL **: gtk_widget_get_receives_default: assertion 'GTK_IS_WIDGET (widget)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_ref: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): Gtk-CRITICAL **: gtk_widget_get_display: assertion 'GTK_IS_WIDGET (widget)' failed

(gnote:32021): Gdk-CRITICAL **: gdk_display_get_device_manager: assertion 'GDK_IS_DISPLAY (display)' failed

(gnote:32021): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed

(gnote:32021): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed

(gnote:32021): Gdk-CRITICAL **: gdk_device_manager_list_devices: assertion 'GDK_IS_DEVICE_MANAGER (device_manager)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_notify: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): Gtk-CRITICAL **: gtk_widget_has_default: assertion 'GTK_IS_WIDGET (widget)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_thaw_notify: assertion 'G_IS_OBJECT (object)' failed

(gnote:32021): GLib-GObject-CRITICAL **: g_object_unref: assertion 'G_IS_OBJECT (object)' failed

[1]+  Speicherzugriffsfehler  gnote

2. The "Gnome" titlebar is gone and Gnote nicely integrates into my XFce4 Desktop again. Thanks ye programmers!

3. When I go to Gnote -> Preferences -> Synchronization then both the Fields "Service: Local Folder" and "Folder Path: my_backups" are greyed out, so I am unable to change them.

4. Gnote does not appear in the "System Tray" any more.

What to do? I guess I shall I report all these things in separate bug reports, right?

Now that I've upgraded to Gnote 3.16 can I downgrade again back to 3.14 without damaging my notes?
Comment 11 Tomas Pospisek 2015-06-24 08:38:48 UTC
FWIW - what I did to build Gnote 3.16 under Debian jessie was this:

  $ apt-get build-dep gnote
  # echo "deb-src http://ftp.ch.debian.org/debian/ unstable main" >> /etc/apt/sources.list
  $ apt-get source gnote
  $ cd gnote-3.16.1
  $ dpkg-buildpackage -rfakeroot
  # dpkg -i ../gnote_3.16.1-1_amd64.deb

in other words all the Gnote sources are from Debian sid/unstable and all the dependencies/libraries are from Debian jessie/stable.
Comment 12 Tomas Pospisek 2015-06-24 09:45:28 UTC
I've reported the other problems mentioned in the comment 10 [1]1 above as:

#751428 : "Doesn't appear in System Tray any more"
#751427 : "Gnote crashes on exit"
#751429 : "Changing the local folder to sync to is not possible"

[1] https://bugzilla.gnome.org/show_bug.cgi?id=723198#c10
Comment 13 Aurimas Černius 2015-07-12 12:00:03 UTC
Looks like this one is fixed. Closing.