Debian Bug report logs -
#349674
unison: causes data loss if one of the replicas disappears
Reported by: Gabor Gombas <gombasg@sztaki.hu>
Date: Tue, 24 Jan 2006 13:48:10 UTC
Severity: important
Tags: upstream
Found in versions unison/2.13.16-4, unison/2.13.16-6
Fixed in version unison/2.27.57-1
Done: Sylvain Le Gall <gildor@debian.org>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Gabor Gombas <gombasg@sztaki.hu>:
New Bug report received and forwarded. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: unison
Version: 2.13.16-4
Severity: critical
Justification: causes serious data loss
Hi,
I'm regularly replicating my home directory to an USB harddisk using
unison. This morning the USB drive got disconnected during the
synchronization (hw error). Instead of noticing that one of the replica
roots have completely disappeared and aborting, unison started to delete
large amounts of data from my home directory. Luckily I could restore
most of it, but this behaviour makes unison unsuitable as a serious
synchronization tool.
Possible solution: unison should do a stat() on the replica roots before
delete operations and if the st_dev field changes (i.e. the file system
containing the replica is unmounted or is over-mounted) it should abort
the synchronization. This is not a complete solution as it does not
protect from e.g. bind mounts, but it would at least cover the
"removable device fails causing the mount to go away" case.
Gabor
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (500, 'stable'), (101, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages unison depends on:
ii libc6 2.3.5-12 GNU C Library: Shared libraries an
Versions of packages unison recommends:
ii openssh-client [ssh-client] 1:4.2p1-5 Secure shell client, an rlogin/rsh
-- no debconf information
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to "Sylvain Le Gall" <sylvain.le-gall@polytechnique.org>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #10 received at 349674@bugs.debian.org (full text, mbox, reply):
Hello,
On Tue, Jan 24, 2006 at 02:35:25PM +0100, Gabor Gombas wrote:
> Package: unison
> Version: 2.13.16-4
> Severity: critical
> Justification: causes serious data loss
>
>
> Hi,
>
> I'm regularly replicating my home directory to an USB harddisk using
> unison. This morning the USB drive got disconnected during the
> synchronization (hw error). Instead of noticing that one of the replica
> roots have completely disappeared and aborting, unison started to delete
> large amounts of data from my home directory. Luckily I could restore
> most of it, but this behaviour makes unison unsuitable as a serious
> synchronization tool.
>
> Possible solution: unison should do a stat() on the replica roots before
> delete operations and if the st_dev field changes (i.e. the file system
> containing the replica is unmounted or is over-mounted) it should abort
> the synchronization. This is not a complete solution as it does not
> protect from e.g. bind mounts, but it would at least cover the
> "removable device fails causing the mount to go away" case.
>
> Gabor
>
Was it during the synchronisation phase (when effectively doing
operation) or before (when calculating changes) ?
I think, it is the first case, and in this case, i agree : it a real
problem.
Kind regard
Sylvain Le Gall
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Gabor Gombas <gombasg@sztaki.hu>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #15 received at 349674@bugs.debian.org (full text, mbox, reply):
On Tue, Jan 24, 2006 at 09:44:59PM +0100, Sylvain Le Gall wrote:
> Was it during the synchronisation phase (when effectively doing
> operation) or before (when calculating changes) ?
I don't really know, I was not sitting in front of the machine during
the synchronization. I only realized the end result.
> I think, it is the first case, and in this case, i agree : it a real
> problem.
I think not noticing that the whole filesystem has changed is a problem
in any phase.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences,
Laboratory of Parallel and Distributed Systems
Address : H-1132 Budapest Victor Hugo u. 18-22. Hungary
Phone/Fax : +36 1 329-78-64 (secretary)
W3 : http://www.lpds.sztaki.hu
---------------------------------------------------------
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Kapil Hari Paranjape <kapil@imsc.res.in>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #20 received at 349674@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
tags 349674 upstream
thanks
Hello,
As reported in Debian bug #349674 which can be seen at
http://bugs.debian.org/349674
Unison has problems when the file system is removed from under it.
For example, here is the result of my experiment.
Setup: A USB drive is mounted at /media/fakehd0
/media/fakehd0/a and /tmp/b are directories
that have already been synchronised by unison
in the past.
Experiment:
Run the command
unison -batch -logfile /tmp/test.log /media/fakehd0/a /tmp/b
and unplug the USB drive from the machine before the
synchronisation can complete.
Result:
The files on /tmp/b that were not synchronised before
the unplugging are deleted.
In the logfile we see that there is an I/O error
recorded by unison before this problem occurs.
Real World Scenario:
USB and floppy media are known to fail "mysteriously"
while they are being used. A problem like that above
could lead to a "backup" procedure deleting files
instead of backing them up!
Possible solution:
unison should abort on I/O errors.
Thanks and regards,
Kapil.
--
[signature.asc (application/pgp-signature, inline)]
Tags added: upstream
Request was from Kapil Hari Paranjape <kapil@imsc.res.in>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to "Sylvain Le Gall" <sylvain.le-gall@polytechnique.org>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #27 received at 349674@bugs.debian.org (full text, mbox, reply):
Hello,
On Mon, Jul 31, 2006 at 09:30:35AM +0530, Kapil Hari Paranjape wrote:
> tags 349674 upstream
> thanks
>
> Hello,
>
> As reported in Debian bug #349674 which can be seen at
>
> http://bugs.debian.org/349674
>
> Unison has problems when the file system is removed from under it.
>
> For example, here is the result of my experiment.
>
> Setup: A USB drive is mounted at /media/fakehd0
> /media/fakehd0/a and /tmp/b are directories
> that have already been synchronised by unison
> in the past.
>
> Experiment:
> Run the command
> unison -batch -logfile /tmp/test.log /media/fakehd0/a /tmp/b
> and unplug the USB drive from the machine before the
> synchronisation can complete.
>
> Result:
> The files on /tmp/b that were not synchronised before
> the unplugging are deleted.
>
> In the logfile we see that there is an I/O error
> recorded by unison before this problem occurs.
>
> Real World Scenario:
> USB and floppy media are known to fail "mysteriously"
> while they are being used. A problem like that above
> could lead to a "backup" procedure deleting files
> instead of backing them up!
>
> Possible solution:
> unison should abort on I/O errors.
>
> Thanks and regards,
>
I see, you submitted the bug directly upstream... very well and thanks.
I hope it will be fixed in the next upstream release (but i think i will
backport changes to the current unison package).
Kind regard
Sylvain Le Gall
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Reuben Thomas <rrt@sc3d.org>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #32 received at 349674@bugs.debian.org (full text, mbox, reply):
Rationale: this is a bug in all current versions of unison. It applies
to a specific use case, one in which one of the media is likely to
disappear during backup. By all means add a big fat warning until the
bug is fixed, but please don't prevent us getting the up-to-date
version of unison.
The version currently in testing, 2.9.1, is built with hacks, has UI
problems as a result (I filed a bug which was reasonably closed wontfix
about this) and has bugs and missing features compared to the current
version; hence, allowing the current version into testing is an
improvement all round.
--
http://rrt.sc3d.org/ | It is impossible to love and be wise (Francis Bacon)
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Sylvain Le Gall <gildor@debian.org>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #37 received at 349674@bugs.debian.org (full text, mbox, reply):
severity 349674 important
thanks
Hello,
On Thu, Oct 19, 2006 at 08:38:47AM +0100, Reuben Thomas wrote:
> Rationale: this is a bug in all current versions of unison. It applies
> to a specific use case, one in which one of the media is likely to
> disappear during backup. By all means add a big fat warning until the
> bug is fixed, but please don't prevent us getting the up-to-date
> version of unison.
>
> The version currently in testing, 2.9.1, is built with hacks, has UI
> problems as a result (I filed a bug which was reasonably closed wontfix
> about this) and has bugs and missing features compared to the current
> version; hence, allowing the current version into testing is an
> improvement all round.
>
A comprehensive user :-)
OK, i agree with the severity lowering. I will apply the correction that
the upstream proposed to me : explain in README.Debian that using unison
on removable media in batch mode is unsafe (it is enough specific to
lower the bug severity).
FYI, i will begin to work on a correction of this ASAP (ie when i will
have made my other package enter etch with a decent version number).
Kind regard
Sylvain Le Gall
Severity set to `important' from `critical'
Request was from Sylvain Le Gall <gildor@debian.org>
to control@bugs.debian.org.
(full text, mbox, link).
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Gabor Gombas <gombasg@sztaki.hu>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #44 received at 349674@bugs.debian.org (full text, mbox, reply):
Hi,
The same bug happened again with unison 2.13.16-5 (Debian Sid): USB
drive holding one of the replicas suddenly went offline during sync,
that caused a lot of I/O errors in the kernel log and HAL unmounted the
drive, which in turn caused unison to wipe half of my home directory
(the other replica) before I noticed and interrupted it. The
$HOME/.unison directory where the sync log was kept was also deleted so
I have no idea at what stage of the sync did the USB disconnect happen.
Note to Debian: README.Debian _still_ does not contain any warnings that
unison is not safe to use on removable media.
Gabor
--
---------------------------------------------------------
MTA SZTAKI Computer and Automation Research Institute
Hungarian Academy of Sciences
---------------------------------------------------------
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <sylvain.le-gall@polytechnique.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to sylvain@le-gall.net:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <sylvain.le-gall@polytechnique.org>.
(full text, mbox, link).
Message #49 received at 349674@bugs.debian.org (full text, mbox, reply):
Hello,
Gabor Gombas writes:
> Hi,
>
> The same bug happened again with unison 2.13.16-5 (Debian Sid): USB
> drive holding one of the replicas suddenly went offline during sync,
> that caused a lot of I/O errors in the kernel log and HAL unmounted the
> drive, which in turn caused unison to wipe half of my home directory
> (the other replica) before I noticed and interrupted it. The
> $HOME/.unison directory where the sync log was kept was also deleted so
> I have no idea at what stage of the sync did the USB disconnect happen.
>
> Note to Debian: README.Debian _still_ does not contain any warnings that
> unison is not safe to use on removable media.
>
I have a lot of real life work -- and i was in need to fix all other
debian packages for the freeze.
I will include this note and do an upload -- just for you -- tonight.
FYI, debian package stable version of unison. Unison-hackers has done
some works on this issue in the development branch of unison. This is
the reason why this bug is not fixed in the debian version.
Since, i think a lot of unison bugs are corrected in development version i
think i will split again the package in :
* unison: development version
* unison2.13.16: stable version
* unison2.9.1: compatibility with debian stable
In other word, unison package will follow development version of unison !
Kind regard
Sylvain Le Gall
Information forwarded to debian-bugs-dist@lists.debian.org, Sylvain Le Gall <gildor@debian.org>:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Reuben Thomas <rrt@sc3d.org>:
Extra info received and forwarded to list. Copy sent to Sylvain Le Gall <gildor@debian.org>.
(full text, mbox, link).
Message #54 received at 349674@bugs.debian.org (full text, mbox, reply):
Package: unison-gtk
Version: 2.13.16-6
Followup-For: Bug #349674
The changelog for 2.27.29 says this bug was fixed some time after
2.17. There is currently no post-2.17 stable release, so this is for
information only, but at least it means the bug has been fixed.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.21-2-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages unison-gtk depends on:
ii libatk1.0-0 1.18.0-2 The ATK accessibility toolkit
ii libc6 2.6-2 GNU C Library: Shared libraries
ii libcairo2 1.4.10-1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.4.2-1.2 generic font configuration library
ii libglib2.0-0 2.12.13-1 The GLib library of C routines
ii libgtk2.0-0 2.10.13-1 The GTK+ graphical user interface
ii libpango1.0-0 1.16.5-1 Layout and rendering of internatio
ii libx11-6 2:1.0.3-7 X11 client-side library
ii libxcursor1 1:1.1.8-2 X cursor management library
ii libxext6 1:1.0.3-2 X11 miscellaneous extension librar
ii libxfixes3 1:4.0.3-2 X11 miscellaneous 'fixes' extensio
ii libxi6 2:1.1.2-1 X11 Input extension library
ii libxinerama1 1:1.0.2-1 X11 Xinerama extension library
ii libxrandr2 2:1.2.1-1 X11 RandR extension library
ii libxrender1 1:0.9.2-1 X Rendering Extension client libra
Versions of packages unison-gtk recommends:
ii openssh-client [ssh-client] 1:4.6p1-5 secure shell client, an rlogin/rsh
pn ssh-askpass <none> (no description available)
-- no debconf information
Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#349674; Package unison.
(full text, mbox, link).
Acknowledgement sent to Sylvain Le Gall <gildor@debian.org>:
Extra info received and forwarded to list.
(full text, mbox, link).
Message #59 received at 349674@bugs.debian.org (full text, mbox, reply):
On Thu, Aug 16, 2007 at 09:16:40PM +0100, Reuben Thomas wrote:
> Package: unison-gtk
> Version: 2.13.16-6
> Followup-For: Bug #349674
>
> The changelog for 2.27.29 says this bug was fixed some time after
> 2.17. There is currently no post-2.17 stable release, so this is for
> information only, but at least it means the bug has been fixed.
Great, waiting for a new stable release
Regards
Sylvain Le Gall
Tags added: pending
Request was from Sylvain Le Gall <gildor@debian.org>
to control@bugs.debian.org.
(Mon, 14 Apr 2008 23:36:05 GMT) (full text, mbox, link).
Reply sent to Sylvain Le Gall <gildor@debian.org>:
You have taken responsibility.
(full text, mbox, link).
Notification sent to Gabor Gombas <gombasg@sztaki.hu>:
Bug acknowledged by developer.
(full text, mbox, link).
Message #66 received at 349674-close@bugs.debian.org (full text, mbox, reply):
Source: unison
Source-Version: 2.27.57-1
We believe that the bug you reported is fixed in the latest version of
unison, which is due to be installed in the Debian FTP archive:
unison-gtk_2.27.57-1_amd64.deb
to pool/main/u/unison/unison-gtk_2.27.57-1_amd64.deb
unison_2.27.57-1.diff.gz
to pool/main/u/unison/unison_2.27.57-1.diff.gz
unison_2.27.57-1.dsc
to pool/main/u/unison/unison_2.27.57-1.dsc
unison_2.27.57-1_amd64.deb
to pool/main/u/unison/unison_2.27.57-1_amd64.deb
unison_2.27.57.orig.tar.gz
to pool/main/u/unison/unison_2.27.57.orig.tar.gz
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 349674@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Sylvain Le Gall <gildor@debian.org> (supplier of updated unison package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Format: 1.8
Date: Mon, 14 Apr 2008 19:39:39 +0200
Source: unison
Binary: unison unison-gtk
Architecture: source amd64
Version: 2.27.57-1
Distribution: unstable
Urgency: low
Maintainer: Sylvain Le Gall <gildor@debian.org>
Changed-By: Sylvain Le Gall <gildor@debian.org>
Description:
unison - A file-synchronization tool for Unix and Windows
unison-gtk - A file-synchronization tool for Unix and Windows with GTK+ interf
Closes: 349674 462598 476051
Changes:
unison (2.27.57-1) unstable; urgency=low
.
[ Sylvain Le Gall]
* New upstream release (Closes: #462598):
* New option mountpoint can help avoid problem with removable media
(Closes: #349674)
* Unset CFLAGS in debian/rules (Closes: #476051)
* Upgrade to standards version 3.7.3 (no change)
* Update README.Debian to add new package unison2.13.16
* Remove debian/control.in
* Remove now useless gtkfont patch
* Change doc-base section to File Management
.
[ Stefano Zacchiroli ]
* promote Homepage to a real debian/control field, now that dpkg supports it
* fix vcs-svn field to point just above the debian/ dir
Checksums-Sha1:
8a38c2b4d772f18051fd175a380ad7b74b238c20 1308 unison_2.27.57-1.dsc
9892680d8bd3e3c50031451cc6e77eb5431768ea 617253 unison_2.27.57.orig.tar.gz
7b3a66e9d5d34a822f1d6c46d235088abf1a0cf7 14562 unison_2.27.57-1.diff.gz
18db98f8381ddb0afb55819c49a35f62f4f2a9cc 565016 unison_2.27.57-1_amd64.deb
db442981096049f300919a1ad6869e2081ec0d12 972904 unison-gtk_2.27.57-1_amd64.deb
Checksums-Sha256:
a1aaa3fb8dc1a0570a4946bbbb32d2ca9e4cd9916a47bc465fa05886568f1b88 1308 unison_2.27.57-1.dsc
49299ec14216a8467b2c6ba148f8145bec31fa787433f9ce3851c2d62f0035ae 617253 unison_2.27.57.orig.tar.gz
32383df582f7b489b42393e89633d43a35ad44c5eae8eb6589824ea1d3bb0f46 14562 unison_2.27.57-1.diff.gz
7cc13e255a0c51666a6417dca038f1e6abc1475b3d689d7b5c61d9e80384da20 565016 unison_2.27.57-1_amd64.deb
63949f7a400c031840b7d626ffc2b34a7473576a8559f843561cd18a725f96ab 972904 unison-gtk_2.27.57-1_amd64.deb
Files:
df2f42eded3c678dc1726f42c30b6274 1308 utils optional unison_2.27.57-1.dsc
4ba0a3e4bf4b4ad0c063f86391371f78 617253 utils optional unison_2.27.57.orig.tar.gz
6a2c040e3b88e249a1ad644c17c8c16d 14562 utils optional unison_2.27.57-1.diff.gz
b621e0d0b10e4645d2f6d0dcf39c8e93 565016 utils optional unison_2.27.57-1_amd64.deb
15460dadef20fa865ef25fa2f33c3fdc 972904 utils optional unison-gtk_2.27.57-1_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFICHWNir2bofsN/psRAsNfAKCBqgUazAesRDtwPU8cCZLesNVZswCfdwEN
Xqxgl+Eiq8mNYngTwQiJfB8=
=wLMj
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Fri, 04 Jul 2008 07:37:01 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Tue Mar 23 19:13:47 2021;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.