[Bug 547932] New: Unexpected behaviour of zypper when reporting in use deleted files at the end.
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.
http://bugzilla.novell.com/show_bug.cgi?id=547932 User jkupec@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=547932#c1 Ján Kupec <jkupec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jkupec@novell.com --- Comment #1 from Ján Kupec <jkupec@novell.com> 2009-10-20 02:09:24 MDT --- Hi Carlos and thanx! The list has been moved to separate command 'zypper ps' in zypper 1.2.5. Other zypper commands now only show a short notice and suggest to run 'zypper ps'. @ma: do you have an idea how to solve the chroot issue? -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=547932 User carlos.e.r@opensuse.org added comment http://bugzilla.novell.com/show_bug.cgi?id=547932#c2 --- Comment #2 from Carlos Robinson <carlos.e.r@opensuse.org> 2009-10-20 13:42:44 MDT --- (In reply to comment #1)
Hi Carlos and thanx! The list has been moved to separate command 'zypper ps' in zypper 1.2.5. Other zypper commands now only show a short notice and suggest to run 'zypper ps'.
I noticed that, yes, a day or two after reporting. But I wasn't sure. I partly solves my problem: at least, it avoids the excessively long report, and I can skip it when running in the chroot. Although I think it still reports deleted files not related to the update, but to other applications. -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=547932 http://bugzilla.novell.com/show_bug.cgi?id=547932#c3 Michael Andres <ma@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |ma@novell.com Resolution| |FIXED --- Comment #3 from Michael Andres <ma@novell.com> 2010-02-11 17:50:15 UTC --- Yes. For libzypp-6.22.1 I changed the default to collect files in bin and lib dirs only. This may of course include libs and binaries not affected by the last, but by earlier updates. But that's intended. -- 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.
participants (1)
-
bugzilla_noreply@novell.com