Synchronization failed via Ubuntu One / Tomboy Web with exception: "Collection was modified; enumeration operation may not execute"

Bug #793380 reported by Hendy Irawan on 2011-06-06
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
tomboy (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: tomboy

I have ~460 notes, and synchronizing doesn't work with the following messages (tomboy --debug) :

[DEBUG 12:21:41.998] Saving 'Flowchart Konsultasi Laptop'...
[ERROR 12:21:41.998] Synchronization failed with the following exception: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].VerifyState () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].MoveNext () [0x00000] in <filename unknown>:0
  at Tomboy.NoteManager.Find (System.String linked_title) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0
[DEBUG 12:21:41.999] Saving 'Maven pom.xml'...

I do have many special characters on my notes (I save a lot of XML code, Java code, PHP code, etc.)

This is similar stack trace to the comment here: https://bugs.launchpad.net/ubuntu/+source/tomboy/+bug/449648/comments/34

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: tomboy 1.6.0-0ubuntu3
ProcVersionSignature: Ubuntu 2.6.38-9.43+kamal~mjgbacklight4-generic 2.6.38.4
Uname: Linux 2.6.38-9-generic x86_64
Architecture: amd64
Date: Mon Jun 6 12:19:37 2011
InstallationMedia: Pinguy OS 11.04 64-Bit - Release amd64
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_GB.UTF-8
 LC_MESSAGES=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: tomboy
UpgradeStatus: No upgrade log present (probably fresh install)

Hendy Irawan (ceefour) wrote :
Hendy Irawan (ceefour) wrote :

I've deleted the "offending" notes, still failed, with different notes surrounding the error..

[DEBUG 21:18:58.260] Saving 'New Note 220'...
[ERROR 21:18:58.260] Synchronization failed with the following exception: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].VerifyState () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].MoveNext () [0x00000] in <filename unknown>:0
  at Tomboy.NoteManager.Find (System.String linked_title) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0
[DEBUG 21:18:58.260] Saving 'Gradle build maven'...
[DEBUG 21:18:58.261] Saving 'HR3D-HET'...
[DEBUG 21:18:58.261] Saving 'Next Steps'...

(Tomboy:7908): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
[DEBUG 21:18:58.281] Saving 'Online Store'...

I'm also curious about this line: (Tomboy:7908): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

Hendy Irawan (ceefour) wrote :

Deleted the "offending" notes again. Retried, and it still failed with yet another different set of surrounding notes:

[DEBUG 21:40:10.291] Saving 'The Secret'...
[ERROR 21:40:10.291] Synchronization failed with the following exception: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].VerifyState () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].MoveNext () [0x00000] in <filename unknown>:0
  at Tomboy.NoteManager.Find (System.String linked_title) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0
[DEBUG 21:40:10.292] Saving 'GottaCrash'...

If there is a way to delete all 400+ notes on Ubuntu One quickly I would have done it.

Hendy Irawan (ceefour) wrote :

I found how to delete all notes from the server:
https://wiki.ubuntu.com/UbuntuOne/FAQ/HowCanIDeleteAllMyTomboyNotesFromTheServer

I also tried to re-authenticate Tomboy with the steps here:
https://wiki.ubuntu.com/UbuntuOne/Bugs

Sure enough, Ubuntu One notes are wiped out, and tomboy is now uploading all (backed up, local) notes to Ubuntu One server.

However the process failed with another exception:

** (Tomboy:29124): DEBUG: SyncDaemon already running, initializing SyncdaemonDaemon object
[DEBUG 21:56:35.147] SyncThread using SyncServiceAddin: Ubuntu One
[DEBUG 21:56:35.155] Building web request for URL: https://one.ubuntu.com/notes//api/1.0/
[DEBUG 21:56:43.365] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/user/
[DEBUG 21:56:50.601] 8
[DEBUG 21:56:50.602] Sync: GetNoteUpdatesSince rev -1
[DEBUG 21:56:50.604] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/?include_notes=true
[DEBUG 21:56:55.129] Sync: 0 updates since rev -1
[DEBUG 21:56:55.131] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[DEBUG 21:56:59.774] Sync: Uploading 740 note updates
[DEBUG 21:56:59.927] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[DEBUG 21:57:03.605] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[ERROR 22:00:35.681] Caught exception. Message: The remote server returned an error: (504) Gateway Time-out.
[ERROR 22:00:35.684] Stack trace for previous exception: at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in <filename unknown>:0
[ERROR 22:00:35.686] Rest of stack trace for above exception: at System.Environment.get_StackTrace()
   at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
   at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
   at Tomboy.WebSync.Api.OAuth.Put(System.String uri, IDictionary`2 queryParameters, System.String putValue)
   at Tomboy.WebSync.Api.UserInfo.UpdateNotes(IList`1 noteUpdates, Int32 expectedNewRevision)
   at Tomboy.WebSync.WebSyncServer.CommitSyncTransaction()
   at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 22:00:35.686] Synchronization failed with the following exception: The remote server returned an error: (504) Gateway Time-out.
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in <filename unknown>:0

(Tomboy:29124): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

I will retry again.

Hendy Irawan (ceefour) wrote :

Retried, and re-failed :

[DEBUG 22:09:19.422] SyncThread using SyncServiceAddin: Ubuntu One
[DEBUG 22:09:19.433] Building web request for URL: https://one.ubuntu.com/notes//api/1.0/
[DEBUG 22:09:22.838] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/user/
[DEBUG 22:09:29.071] 8
[DEBUG 22:09:29.071] Sync: GetNoteUpdatesSince rev -1
[DEBUG 22:09:29.073] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/?include_notes=true
[DEBUG 22:09:31.762] Sync: 0 updates since rev -1
[DEBUG 22:09:31.764] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[DEBUG 22:09:35.265] Sync: Uploading 737 note updates
[DEBUG 22:09:35.414] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[DEBUG 22:09:38.129] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/
[ERROR 22:13:10.879] Caught exception. Message: The remote server returned an error: (504) Gateway Time-out.
[ERROR 22:13:10.881] Stack trace for previous exception: at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in <filename unknown>:0
[ERROR 22:13:10.883] Rest of stack trace for above exception: at System.Environment.get_StackTrace()
   at Tomboy.WebSync.Api.OAuth.MakeWebRequest(RequestMethod method, System.String url, System.Collections.Generic.List`1 parameters, System.String postData)
   at Tomboy.WebSync.Api.OAuth.WebRequest(RequestMethod method, System.String url, System.String postData)
   at Tomboy.WebSync.Api.OAuth.Put(System.String uri, IDictionary`2 queryParameters, System.String putValue)
   at Tomboy.WebSync.Api.UserInfo.UpdateNotes(IList`1 noteUpdates, Int32 expectedNewRevision)
   at Tomboy.WebSync.WebSyncServer.CommitSyncTransaction()
   at Tomboy.Sync.SyncManager.SynchronizationThread()
[ERROR 22:13:10.883] Synchronization failed with the following exception: The remote server returned an error: (504) Gateway Time-out.
  at System.Net.HttpWebRequest.CheckFinalStatus (System.Net.WebAsyncResult result) [0x00000] in <filename unknown>:0
  at System.Net.HttpWebRequest.SetResponseData (System.Net.WebConnectionData data) [0x00000] in <filename unknown>:0

(Tomboy:1188): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

I don't believe it is a connection problem on my part. I have no trouble accessing the Internet at all, pretty smooth line right now.

Hendy Irawan (ceefour) wrote :

Right after the failed sync, I retried the sync again without deleting any database/notes, it failed almost immediately :

[DEBUG 22:15:51.489] SyncThread using SyncServiceAddin: Ubuntu One
[DEBUG 22:15:51.490] Building web request for URL: https://one.ubuntu.com/notes//api/1.0/
[DEBUG 22:15:53.711] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/user/
[DEBUG 22:15:58.027] 8
[DEBUG 22:15:58.028] Sync: GetNoteUpdatesSince rev -1
[DEBUG 22:15:58.028] Building web request for URL: https://one.ubuntu.com/notes/api/1.0/op/?include_notes=true
[ERROR 22:16:18.131] Synchronization failed with the following exception: Latest revision on server has changed, please update restart your sync
  at Tomboy.WebSync.WebSyncServer.VerifyLatestSyncRevision (Nullable`1 latestRevision) [0x00000] in <filename unknown>:0
  at Tomboy.WebSync.WebSyncServer.GetNoteUpdatesSince (Int32 revision) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0

(Tomboy:1188): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed

Hendy Irawan (ceefour) wrote :

After the last failed sync, I deleted all files in ~/.local/share/tomboy (but leaving the directory empty), then restarted tomboy and sync. It downloads several notes from Ubuntu One, then failed again !!

[DEBUG 22:19:14.947] Creating Buffer for 'eyeOS Competition (old) 1'...
[DEBUG 22:19:14.969] Saving 'Business Notebook Template'...
[DEBUG 22:19:14.970] Saving 'Bisnis Internet (old) 3'...
[ERROR 22:19:14.973] Synchronization failed with the following exception: Collection was modified; enumeration operation may not execute.
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].VerifyState () [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1+Enumerator[Tomboy.Note].MoveNext () [0x00000] in <filename unknown>:0
  at Tomboy.NoteManager.Find (System.String linked_title) [0x00000] in <filename unknown>:0
  at Tomboy.Sync.SyncManager.SynchronizationThread () [0x00000] in <filename unknown>:0
[DEBUG 22:19:15.177] Saving 'Bisnis Internet (old) 2'...
[DEBUG 22:19:15.432] Saving 'Bisnis Internet (old) 1'...
[DEBUG 22:19:15.638] Saving 'HendyIrawan.com'...

(Tomboy:2013): GLib-CRITICAL **: g_source_remove: assertion `tag > 0' failed
[DEBUG 22:19:15.640] Saving 'CDO Standalone'...

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in tomboy (Ubuntu):
status: New → Confirmed
Pascal Garber (jumplink) wrote :

I've the same problem, but only on two pcs with 64bit. On two other pc's with 32bit, I have no Problems.
The Workarounds dosn't work for me, any other ideas how I can sync my nodes?

David Oneill (david-m-oneill) wrote :

I've had this problem as well. I am trying to use SSH sync between three computers (two are 64 bit)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers