Bug#452365: symlink eating bug

2013-05-27 Thread Michael Tokarev
Control: found -1 1.26+dfsg-0.1
Hello.

Here I just got a bunch of broken symlinks after upgrading
a system from squeeze to wheezy and at the same time moving
to a new hw -- for which I installed wheezy on a new hw and
tar'ed stuff from /home and similar to the new machine.

In process, all symlinks which had more than one LINK on the
source were replaced with zero-len files owned by root.

This is important: only the symlinks which had more than 1
in the st_nlink field become broken.  There were lots of
other symlinks with st_nlink equal 1, -- these are all ok.

Linked symlinks may sound fun, but it's trivial to create
those, for example, cp -al a directory (which contains a
symlink) to another place, or `ln -n symlink othername'.

I tried to reproduce the issue, but it isn't that easy
still, even when I know another mandatory condition.
I tried creating a dir forest in /tmp with symlinks,
tried linking it to another forest, and tar'ing whole
thing to another place -- that one goes fine.

I'll try more to reproduce it.

But it is definitely present on the _receiving_ side,
where tar extracts stuff, because the archives look
sane.  And the receiving side is running wheezy.

Thanks,

/mjt


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#452365: symlink eating bug still present in tar 1.23-3

2012-04-11 Thread Attila Kinali
On Tue, 10 Apr 2012 16:52:34 -0600
Bdale Garbee bd...@gag.com wrote:

 On Tue, 10 Apr 2012 22:15:17 +0200, Attila Kinali att...@kinali.ch wrote:
  I just got hit by this bug as well. Unfortunately i cannot make a simple
  testcase that reproduces this bug. All my attempts failed. But at least
  i can reproduce it. 
 
 Do you think the problem is still present in tar version 1.26-4 which is
 what's current in unstable and testing?  I'm having trouble reproducing
 the problem.

I don't know. I am not sure whether upgrading tar is a good idea.
I've the same troubles reproducing the bug as you do. Ie i don't
know what causes the bug and how i can trigger it. All my attempts
on creating a test case failed. The only thing i can tell you is,
that tarring a certain directory will trigger the bug in question.

IMHO we should try to figure out what causes the bug in the stable
version of tar, then try to figure out whether that cause is still
present in the current version.

Attila Kinali

-- 
Why does it take years to find the answers to
the questions one should have asked long ago?



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#452365: symlink eating bug still present in tar 1.23-3

2012-04-10 Thread Attila Kinali
Package: tar
Version: 1.23-3
Severity: normal


Moin,

I just got hit by this bug as well. Unfortunately i cannot make a simple
testcase that reproduces this bug. All my attempts failed. But at least
i can reproduce it. 

What i did was:

tar cf - blah | (cd /somewhere/else; tar xf -)

an strace of the first tar for one of the broken symlinks looks like this:
---schnipp---
5798  lstat64(containingDirectory/symlink_with_long_name_and_absolut_path, 
{st_dev=makedev(8, 128), st_ino=12124195, st_mode=S_IFLNK|0777, st_nlink=1, 
st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=58, 
st_atime=2010/09/20-23:16:44, st_mtime=2010/09/19-21:40:51, 
st_ctime=2010/09/19-21:40:51}) = 0
5798  readlink(containingDirectory/symlink_with_long_name_and_absolut_path, 
/directory/the/symlink/is/pointing/to..., 59) = 58
---schnapp---

and for the second tar:

---schnipp---
5799  open(containingDirectory/symlink_with_long_name_and_absolut_path, 
O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0) = 3
5799  fstat64(3, {st_dev=makedev(8, 32), st_ino=27373569, st_mode=S_IFREG, 
st_nlink=1, st_uid=0, st_gid=0, st_blksize=4096, st_blocks=0, st_size=0, 
st_atime=2012/04/10-22:04:15, st_mtime=2012/04/10-22:04:15, 
st_ctime=2012/04/10-22:04:15}) = 0
5799  close(3) = 0
---schnapp---


As can be seen, a file is created instead of a symlink. Why, i don't know.
Please let me know if you need more info

Attila Kinali

-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.3.1 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages tar depends on:
ii  libc6 2.11.3-2   Embedded GNU C Library: Shared lib

tar recommends no packages.

Versions of packages tar suggests:
ii  bzip2   1.0.5-6+squeeze1 high-quality block-sorting file co
pn  ncompress   none   (no description available)
ii  xz-utils5.0.0-2  XZ-format compression utilities

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#452365: symlink eating bug still present in tar 1.23-3

2012-04-10 Thread Bdale Garbee
On Tue, 10 Apr 2012 22:15:17 +0200, Attila Kinali att...@kinali.ch wrote:
 I just got hit by this bug as well. Unfortunately i cannot make a simple
 testcase that reproduces this bug. All my attempts failed. But at least
 i can reproduce it. 

Do you think the problem is still present in tar version 1.26-4 which is
what's current in unstable and testing?  I'm having trouble reproducing
the problem.

Bdale


pgpr6mg2lLoP0.pgp
Description: PGP signature