RPM artifacts related to ghost files

Panu Matilainen pmatilai at laiskiainen.org
Thu Jun 6 06:26:37 UTC 2013

On 06/05/2013 09:59 PM, Florian Weimer wrote:
> On 06/05/2013 05:30 PM, Panu Matilainen wrote:
>> Thanks for noticing and reporting!
> Thanks for caring.
> I've got another one: In abrt-2.1.4-1.fc17.i686, the ghost files
> /var/run/abrt/abrt.socket and /var/run/abrt/abrtd.pid both have inode 0
> and link count 2.  But they can't be hard-linked because one has mode
> 666, and the other mode 644.  This throws my hard link detection logic
> off course.  (I will disable it for zero inodes.)

Right, that's an anomaly specific to rpm < 4.10 with %ghosts which dont 
exist in the buildroot, the nlink counting probably just merrily figures 
they're hardlinks because device and inode match (as they are zero). 
With rpm >= 4.10 ghosts get a "virtual" inode like everything else 
whether they exist or not (this is probably contrary to what I said 
yesterday on irc).

Another anomaly/curiosity is that hardlinked ghosts existing on 
buildroot still get their nlink count as if they were hardlinked, but 
this hardly makes sense.

What would actually make sense with %ghosts is ... a good question, 
common sense doesn't necessarily apply with the paranormal :) Always 
zeroing out inode and device + taking this into account elsewhere in 
nlink counting is one possibility.

	- Panu -

More information about the devel mailing list