http://bugzilla.novell.com/show_bug.cgi?id=547932 Summary: Unexpected behaviour of zypper when reporting in use deleted files at the end. Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: Other OS/Version: openSUSE 11.2 Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: carlos.e.r@opensuse.org QAContact: qa@suse.de Found By: --- I just discovered a useful feature of "zypper dup": that at the end reports files that are supposedly deleted but are in use by some processes. This is a feature that I have asked for for a long time. But it has a glitch. In my setup (see later), it produces a very long text, so long that the beginning went off the top of the xterm window. So next time, I used "xterm -sl 3000": not enough. Finally, I saw the beginning with a 15000 lines buffer (an iteration that delayed for some weeks, while I updated to milestone 6, 7, 8...): +++*********** The following running processes use deleted files: PID | PPID | UID | Login | Command | Service | Files ------+-------+------+---------+--------------------------+---------+---------------------------------------------------------------------------------------------- 618 | 3550 | 0 | root | spamd | | /usr/lib/libdb-4.5.so (path dev=3,9, inode=104822) | | | | | | /usr/lib/libdb-4.5.so (path dev=3,9, inode=104822) | | | | | | /lib/libnss_nis-2.8.so (stat: No such file or directory) | | | | | | /lib/libnss_compat-2.8.so (stat: No such file or directory) | | | | | | /lib/libnss_files-2.8.so (stat: No such file or directory) .. (thousands of lines more) .. ***********++- Why so long an output? Because I'm running zypper dup of the factory partition in a chroot, inside a 11.0 system. Your code is seeing the "host" files, not only the guest (the guest has no running processes, except bash). (I always do the update this way, because it is safer, and I can work while it runs for hours and (long) hours) I use a different code than you to detect those in use deleted files, which doesn't fail in the exact same way, but fails, too. It is a variation of a script published by Bob Vickers on the security list on Tue, 10 Jan 2006 10:14:59 +0000 (GMT). I haven't had the occasion to test it on current factory: #!/bin/bash set -o nounset procs=`lsof -n | grep -E 'RPMDELETE|;|path inode=' ` if [ -n "$procs" ] then host=`hostname` cat <<EOF Host $host has obsolete files still in use by running processes. This may constitute a security hazard so you should restart daemons where necessary. COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME EOF echo "$procs" exit 1 else exit 0 fi And it fails this way: Tirith_chrooted_on_nimrodel:~ # lsof -n | grep -E 'RPMDELETE|;|path inode=' lsof: WARNING: can't stat() xfs file system /home1 Output information may be incomplete. lsof: WARNING: can't stat() reiserfs file system /xtr Output information may be incomplete. lsof: WARNING: can't stat() ext3 file system /cosas Output information may be incomplete. --- lsof: WARNING: can't stat() proc file system /var/lib/ntp/proc Output information may be incomplete. lsof: no pwd entry for UID 115 lsof: no pwd entry for UID 115 .. lsof: no pwd entry for UID 65 lsof: no pwd entry for UID^C Tirith_chrooted_on_nimrodel:~ # I suggest you add some code to zypper so that it doesn't run this deleted files test if it is chrooted. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.