Package: coreutils Version: 5.94-1 Severity: normal ln -sf can fail due to two unhandled race conditions:
To reproduce: while true; do /bin/ln -sf foo bar; done & (repeat a few times) while true; do rm -f bar ; sleep 1; done & You will see intermittent errors: /bin/ln: cannot remove `bar': No such file or directory /bin/ln: creating symbolic link `bar' to `foo': File exists The latter error is much more frequent than the former. This is due to the sequence of events: stat file unlink file symlink file Normally, this is fine, but it does not cope with these factors: 1) The file can be unlinked by another process in between the stat and the unlink, causing the unlink to fail. ln should be aware this can happen, and not treat this as a fatal error. 2) Another process can create file between unlink and symlink, leading to symlink creation failing. Again, ln should be aware creation may fail. If the error is EEXIST, it should repeat the unlink and try again. Regards, Roger -- System Information: Debian Release: testing/unstable APT prefers unstable APT policy: (990, 'unstable') Architecture: powerpc (ppc) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.15.4 Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Versions of packages coreutils depends on: ii libacl1 2.2.35-1 Access control list shared library ii libc6 2.3.6-3 GNU C Library: Shared libraries an ii libselinux1 1.28-4 SELinux shared libraries coreutils recommends no packages. -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

