Package: debsums Version: 2.0.16 Severity: minor Tags: patch After a "run fsck manually" episode, I knew I'd need to reinstall some packages. I ran debsums to get a quick listing of what packages were messed up. But it wasn't quick at all. It sat there for a long time not producing output. Eventually I dceided something was wrong. It wasn't using any CPU and the disk wasn't busy, and I knew debsums wouldn't normally take this long.
fsck had fixed several files, and one of them got "fixed" real good - it went from being a normal boring man page to being a named pipe (prwS--S-wT or some such nonsense). debsums was blocked trying to open it because, as you might expect, there were no writers. I wouldn't have figured this out if it hadn't been for strace -p `pidof debsums` In case this happens to anyone else, I suggest that debsums should either use a non-blocking open or stat the file before opening to make sure it's a regular file. Named pipe isn't the worst case. It could have been a block or character device with unpleasant side effects on being opened (and read, if the open succeeded). Here's a patch that does stat-before-open. --- debsums.orig 2007-01-09 17:05:41.000000000 -0500 +++ debsums 2007-01-09 17:05:44.000000000 -0500 @@ -234,6 +234,12 @@ $path = $diversion{$path}[0] if exists $diversion{$path} and $diversion{$path}[1] ne $pack; + if (-e "$root/$path" && !-f _) + { + warn "$self: not regular file: $pack file $root/$path\n"; + return 0; + } + unless (open F, "$root/$path") { return 0 if $localepurge -- System Information: Debian Release: 3.1 Architecture: powerpc (ppc) Kernel: Linux 2.6.17.6 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Versions of packages debsums depends on: ii debconf [debconf-2.0] 1.4.30.13 Debian configuration management sy ii perl 5.8.4-8sarge5 Larry Wall's Practical Extraction -- debconf information: debsums/apt-autogen: true -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]