[Bug 1243367] [NEW] tar complains about changed directory which hasn't changed

Sworddragon 1243367 at bugs.launchpad.net
Tue Oct 22 19:22:56 UTC 2013


Public bug reported:

I'm using Ubuntu 14.04 dev with tar 1.26+dfsg-8 and sometimes I'm seeing
the message "tar: .: file changed as we read it" which seems to not be
true. This bugs seems to be very difficult to reproduce and even the
reproducing behavior is really annoying. As I got today on testing the
chance for easy reproducing I have made a look with inotifywait what is
happening:

sworddragon at ubuntu:~$ mkdir tmp
sworddragon at ubuntu:~$ inotifywait -mr tmp &
[1] 12445
sworddragon at ubuntu:~$ Setting up watches.  Beware: since -r was given, this may take a while!
Watches established.
^C
sworddragon at ubuntu:~$ cd tmp
sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
tmp/ OPEN,ISDIR 
tmp/ CREATE test.tar
tmp/ OPEN test.tar
tar: .: file changed as we read it
tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
tmp/ MODIFY test.tar
tmp/ CLOSE_WRITE,CLOSE test.tar
sworddragon at ubuntu:~/tmp$ rm test.tar
tmp/ DELETE test.tar
sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -cf test.tar .
tmp/ CREATE test.tar
tmp/ OPEN test.tar
tmp/ OPEN,ISDIR 
tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
tmp/ MODIFY test.tar
tmp/ CLOSE_WRITE,CLOSE test.tar
sworddragon at ubuntu:~/tmp$ rm test.tar
tmp/ DELETE test.tar
sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
tmp/ OPEN,ISDIR 
tmp/ CREATE test.tar
tmp/ OPEN test.tar
tar: .: file changed as we read it
tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
tmp/ MODIFY test.tar
tmp/ CLOSE_WRITE,CLOSE test.tar
sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
tmp/ OPEN,ISDIR 
tmp/ MODIFY test.tar
tmp/ OPEN test.tar
tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
tmp/ MODIFY test.tar
tmp/ CLOSE_WRITE,CLOSE test.tar


The bug only appears if a compression is activated (even with -J) and the tar archive doesn't already exist (tested both multiple times). The curious is if I'm closing the terminal and open it again I'm not able to reproduce this anymore. The bug will then randomly appear whenever I'm using tar.

** Affects: tar (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to tar in Ubuntu.
https://bugs.launchpad.net/bugs/1243367

Title:
  tar complains about changed directory which hasn't changed

Status in “tar” package in Ubuntu:
  New

Bug description:
  I'm using Ubuntu 14.04 dev with tar 1.26+dfsg-8 and sometimes I'm
  seeing the message "tar: .: file changed as we read it" which seems to
  not be true. This bugs seems to be very difficult to reproduce and
  even the reproducing behavior is really annoying. As I got today on
  testing the chance for easy reproducing I have made a look with
  inotifywait what is happening:

  sworddragon at ubuntu:~$ mkdir tmp
  sworddragon at ubuntu:~$ inotifywait -mr tmp &
  [1] 12445
  sworddragon at ubuntu:~$ Setting up watches.  Beware: since -r was given, this may take a while!
  Watches established.
  ^C
  sworddragon at ubuntu:~$ cd tmp
  sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
  tmp/ OPEN,ISDIR 
  tmp/ CREATE test.tar
  tmp/ OPEN test.tar
  tar: .: file changed as we read it
  tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
  tmp/ MODIFY test.tar
  tmp/ CLOSE_WRITE,CLOSE test.tar
  sworddragon at ubuntu:~/tmp$ rm test.tar
  tmp/ DELETE test.tar
  sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -cf test.tar .
  tmp/ CREATE test.tar
  tmp/ OPEN test.tar
  tmp/ OPEN,ISDIR 
  tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
  tmp/ MODIFY test.tar
  tmp/ CLOSE_WRITE,CLOSE test.tar
  sworddragon at ubuntu:~/tmp$ rm test.tar
  tmp/ DELETE test.tar
  sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
  tmp/ OPEN,ISDIR 
  tmp/ CREATE test.tar
  tmp/ OPEN test.tar
  tar: .: file changed as we read it
  tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
  tmp/ MODIFY test.tar
  tmp/ CLOSE_WRITE,CLOSE test.tar
  sworddragon at ubuntu:~/tmp$ tar --exclude "*\.tar" -zcf test.tar .
  tmp/ OPEN,ISDIR 
  tmp/ MODIFY test.tar
  tmp/ OPEN test.tar
  tmp/ CLOSE_NOWRITE,CLOSE,ISDIR 
  tmp/ MODIFY test.tar
  tmp/ CLOSE_WRITE,CLOSE test.tar

  
  The bug only appears if a compression is activated (even with -J) and the tar archive doesn't already exist (tested both multiple times). The curious is if I'm closing the terminal and open it again I'm not able to reproduce this anymore. The bug will then randomly appear whenever I'm using tar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tar/+bug/1243367/+subscriptions



More information about the foundations-bugs mailing list