NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/47748: Invalid file on ffs



The following reply was made to PR kern/47748; it has been noted by GNATS.

From: David Holland <dholland-bugs%netbsd.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/47748: Invalid file on ffs
Date: Fri, 19 Apr 2013 06:12:54 +0000

 On Thu, Apr 18, 2013 at 10:30:11AM +0000, Fr?d?ric Fauberteau wrote:
  >  >  > root@trashware:~$ rm /usr/pkgsrc/ham/tfkiss/pkg/CVS/K+^F
  >  >  > rm: /usr/pkgsrc/ham/tfkiss/pkg/CVS/K+: No such file or directory
  >  >
  >  >  You could 'ls -li' the file, note the inode, then "shutdown now" to
  >  >  single user mode, umount(8) the file system, clri(8) the inode, then
  >  >  fsck(8) -fp the file system, and reboot.
  >  
  >  I could not 'ls -li' the file since syscalls failed on it. But I should 
  >  try a fsck in single user mode before submitting PR. It does not 
  >  enlighten me on what was the problem with this file but it corrects the 
  >  fs.
 
 It looks to me like it was probably four (or maybe more) characters
 long with a zero byte as the fourth character. There is no way to name
 such a file, because a string with a zero byte as the fourth character
 is three characters long; you have to have fsck remove it.
 
 (Without the zero byte, you'd probably have been able to name the file
 with autocompletion, and ls -l would have worked. Although I remember
 once a long time ago accidentally getting a file with a newline in its
 name, which turned out to be surprisingly hard to get rid of. I think
 I ended up needing to write a C program that called unlink(2).)
 
 It looks like CVS has some error path that creates control files using
 an uninitialized pathname. This is a bug in CVS, and I'd leave the PR
 open to remember it, except that there's zero chance we'll ever track
 it down.
 
 -- 
 David A. Holland
 dholland%netbsd.org@localhost
 


Home | Main Index | Thread Index | Old Index