Syncdaemon not running (ValuerError: mmap offset is greater than file size)

Bug #825366 reported by Tony Zielmanski on 2011-08-12
60
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Ubuntu One Client
Status tracked in Trunk
Stable-2-0
High
Guillermo Gonzalez
Stable-3-0
High
Ubuntu One Client Engineering team
Trunk
High
Guillermo Gonzalez
ubuntuone-client (Ubuntu)
High
Ubuntu One Client Engineering team
Oneiric
Undecided
Unassigned

Bug Description

when I start ubuntu one I get
File Sync error. (org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus))
I have two other machine running 11.04 and they work fine, I get this error Value could not be retrieved. (DBusException: org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)) when I choose devices
I have completely removed and reinstall ubuntu one same errors

when in service enable file sync in not choosen and greyed out I can not choose this. i did install the desktop program it said I needed still no luck

WORKAROUND:
1. Kill UbuntuOne client: killall ubuntuone-syncdaemon
2. Go to ~/.local/share/ubuntuone/syncdaemon/tritcask
3. Find file that has 0 bytes length: (e.g. find ~/.local/share/ubuntuone/syncdaemon/tritcask -size 0 )
4. Remove that 0-byte file
5. Start ubuntuone-client again - u1sdtool --start

IKT (ikt) on 2011-08-25
affects: ubuntu → ubuntuone-client (Ubuntu)
Natalia Bidart (nataliabidart) wrote :

Hello, can you please paste the output of running this command in a terminal?

u1sdtool -q; python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon

Thanks!

Changed in ubuntuone-client (Ubuntu):
status: New → Incomplete
assignee: nobody → Natalia Bidart (nataliabidart)
tags: added: chicharra
Tobias Kuhn (tkuhn) wrote :

I have exactly the same problem. The above command returns this:

$ u1sdtool -q; python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon
ubuntuone-syncdaemon still running.
Another instance is running

Tobias Kuhn (tkuhn) wrote :

PS: I am running Ubuntu 11.10

Natalia Bidart (nataliabidart) wrote :

Hello Tobias,

Can you please run the following:

u1sdtool -s
killall ubuntuone-syncdaemon
python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon

And paste the output here? Thanks!

Tobias Kuhn (tkuhn) wrote :

Hi Natalia,

Thanks for helping! This is the output of the above commands:

$ u1sdtool -s

Oops, an error ocurred:
Traceback (most recent call last):
Failure: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "current_status" with signature "" on interface "com.ubuntuone.SyncDaemon.Status" doesn't exist

$ killall ubuntuone-syncdaemon
$ python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon

The last command does not terminate or show any output.

Regards,
Tobias

Tobias Kuhn (tkuhn) wrote :

PS: killing the last of the three commands with Ctrl+C gives:

Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 227, in <module>
    main(sys.argv)
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 91, in main
    d = async_main(parser, options, argv)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1141, in unwindGenerator
    return _inlineCallbacks(None, f(*args, **kwargs), Deferred())
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1020, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/ubuntuone-client/ubuntuone-syncdaemon", line 191, in async_main
    oauth_credentials=oauth_credentials)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/main.py", line 102, in __init__
    self.db = tritcask.Tritcask(self.tritcask_dir)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 612, in __init__
    self._build_keydir()
  File "/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 760, in _build_keydir
    self._load_from_hint(data_file)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 776, in _load_from_hint
    for hint_entry in hint_file.iter_entries():
  File "/usr/lib/python2.7/dist-packages/ubuntuone-client/ubuntuone/syncdaemon/tritcask.py", line 446, in iter_entries
    fmap = mmap.mmap(self.fd.fileno(), 0, access=mmap.ACCESS_READ)
exceptions.ValueError: mmap offset is greater than file size

Natalia Bidart (nataliabidart) wrote :

Hello Tobias!

Can you please compress and attach the Ubuntu One logs? Those are located under:

~/.cache/ubuntuone/log

Thanks!

Tobias Kuhn (tkuhn) wrote :

These are the log files.

Natalia Bidart (nataliabidart) wrote :

Hello Tobias!

Thanks for the logs. Would you please paste the output of running the following in a terminal:

ls -la ~/.local/share/ubuntuone/syncdaemon/tritcask

Natalia.

Tobias Kuhn (tkuhn) wrote :

$ ls -la ~/.local/share/ubuntuone/syncdaemon/tritcask
total 2480
drwxr-xr-x 2 tk tk 16384 2011-11-10 18:02 .
drwxr-xr-x 5 tk tk 4096 2011-03-22 13:09 ..
-rw-rw-r-- 1 tk tk 1363974 2011-11-09 20:33 1320867214014308.inactive.tritcask-v1.data
-rw-rw-r-- 1 tk tk 149250 2011-11-09 20:33 1320867214014308.inactive.tritcask-v1.data.hint
-rw-rw-r-- 1 tk tk 20866 2011-11-09 20:40 1320867214579799.inactive.tritcask-v1.data
-rw-rw-r-- 1 tk tk 0 2011-11-10 18:02 1320867214579799.inactive.tritcask-v1.data.hint
-rw-rw-r-- 1 tk tk 911680 2011-11-10 16:45 1320907348351455.inactive.tritcask-v1.data
-rw-rw-r-- 1 tk tk 26012 2011-11-10 21:07 1320944572535788.live.tritcask-v1.data

Natalia Bidart (nataliabidart) wrote :

Thanks for the info!

The workaround for this is killing syncdamon, removing the .hint file that has 0 bytes size, and restart the syncdaemon.
To do that, in a terminal, please run the following:

killall ubuntuone-syncdaemon
rm ~/.local/share/ubuntuone/syncdaemon/tritcask/1320867214579799.inactive.tritcask-v1.data.hint
python /usr/lib/ubuntuone-client/ubuntuone-syncdaemon --debug

And let me know how it went.
Thanks, Natalia.

Tobias Kuhn (tkuhn) wrote :

The workaround seems to work! File synchronization is still running, as it has to keep up with all the accumulated changes, but as far as I can tell synchronization works now.

Thanks for the quick help!

Natalia Bidart (nataliabidart) wrote :

Hi Tobias!

I'm glad it worked. Nevertheless, a user should never have a 0-bytes hint file, so I'm assigning this to the proper person so we can fix this bug.

Thanks!

Changed in ubuntuone-client (Ubuntu):
assignee: Natalia Bidart (nataliabidart) → Guillermo Gonzalez (verterok)
importance: Undecided → High
status: Incomplete → Triaged
Tobias Kuhn (tkuhn) wrote :

Hi,

Three days later, it still works! That's the good news. The bad news is: There is no "Ubuntu One" menu entry anymore in the context menu. So, I cannot add new folders. I think this problem appeared after applying the workaround for the bug described above, but it might be an unrelated issue...

Cheers,
Tobias

Roman Yepishev (rye) on 2011-11-25
description: updated
description: updated
Changed in ubuntuone-client:
assignee: nobody → Guillermo Gonzalez (verterok)
importance: Undecided → High
status: New → Triaged
Changed in ubuntuone-client:
status: Triaged → In Progress
summary: - Ubuntu one not syncing on 11.04 one computer
+ Syncdaemon not running (ValuerError: mmap offset is greater than file
+ size)
Changed in ubuntuone-client (Ubuntu):
assignee: Guillermo Gonzalez (verterok) → Ubuntu One Desktop+ team (ubuntuone-desktop+)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.99.1-0ubuntu1

---------------
ubuntuone-client (2.99.1-0ubuntu1) precise; urgency=low

  * New upstream release.
    - Avoid using hint files with size 0. (LP: #825366)
    - Use g_return_if_fail to avoid NULL for important args (LP: #908805)
    - Don't register a new VOID__POINTER marshaller for dbus as it breaks now
      (LP: #908787, LP: #908261)
  * debian/watch:
    - Point at the release milestone
 -- Rodney Dawes <email address hidden> Wed, 04 Jan 2012 09:44:36 -0500

Changed in ubuntuone-client (Ubuntu):
status: Triaged → Fix Released

Hello Tony, or anyone else affected,

Accepted ubuntuone-client into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in ubuntuone-client (Ubuntu Oneiric):
status: New → Fix Committed
tags: added: verification-needed
Roman Yepishev (rye) wrote :

Tested as follows:
With -updates only:
 1 In ~/.local/share/ubuntuone/syncdaemon/tritcask i truncated a hint file to 0
 1 Started syncdaemon. It did not run, killing syncdaemon printed the ValueError as seen in the bug description.

Updated to -proposed, started syncdaemon. It started successfully and processed the queued files.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.0.1-0ubuntu1

---------------
ubuntuone-client (2.0.1-0ubuntu1) oneiric-proposed; urgency=low

  * New upstream release.
    - Avoid connection failure when timestamp invalid. (LP: #692597)
    - Files in new folders not uploaded due to filtering. (LP: #869920)
    - Sync daemon not running (mmap ValueError). (LP: #825366)
    - Typo in man page for "paths." (LP: #682954)
    - Apport recipe attaches old and useless logs. (LP: #956407)
  * debian/control:
    - Require the new ubuntuone-storage-protocol for #692597.
  * debian/patches:
    - Remove patches which have been included in upstream.
  * debian/watch:
    - Update to use the stable branch.
 -- Rodney Dawes <email address hidden> Wed, 18 Apr 2012 16:37:15 -0400

Changed in ubuntuone-client (Ubuntu Oneiric):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers