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

Re: idiosyncratic "ln" not making hard links



"Noah L. Meyerhans" <noahm@debian.org> writes:

> --zOcTNEe3AzgCmdo9
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
> 
> On Wed, Sep 25, 2002 at 10:33:15AM -0500, Elizabeth Barham wrote:
> > > | :~$ touch k
> > > | :~$ ln k y
> >=20
> > Any idea of what might be causing ln not to work correctly on my
> > system?
> 
> Try running strace on it:
> strace ln k y

execve("/bin/ln", ["ln", "k", "y"], [/* 21 vars */]) = 0
uname({sys="Linux", node="shelby", ...}) = 0
brk(0)                                  = 0x804d9a8
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)

Should /etc/ld.so.preload be here?

open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=22775, ...}) = 0
old_mmap(NULL, 22775, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40014000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\30\222"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=1153784, ...}) = 0
old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4012d000, 40160, PROT_NONE)  = 0
old_mmap(NULL, 1166560, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4012d000, 40160, PROT_NONE)  = 0
old_mmap(0x4012d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x113000) = 0x4012d000
old_mmap(0x40133000, 15584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40133000
close(3)                                = 0
munmap(0x40014000, 22775)               = 0
brk(0)                                  = 0x804d9a8
brk(0x804d9d0)                          = 0x804d9d0
brk(0x804e000)                          = 0x804e000
stat64("y", 0xbffff1fc)                 = -1 ENOENT (No such file or directory)
lstat64("k", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
lstat64("y", 0xbffff18c)                = -1 ENOENT (No such file or directory)
lstat64("y", 0xbffff18c)                = -1 ENOENT (No such file or directory)
link("k", "y")                          = -1 ENOENT (No such file or directory)
write(2, "ln: ", 4ln: )                     = 4
write(2, "creating hard link `y\' to `k\'", 29creating hard link `y' to `k') = 29
write(2, ": No such file or directory", 27: No such file or directory) = 27
write(2, "\n", 1
)                       = 1
_exit(1)                                = ?

The only thing that seems odd in the stat64("y", 0xbffff1fc) in that
the file does not exist when, apparently, it should have been created
by then?

I did have some sporadic memory errors with this machine but corrected
them although I have not run memtest in a while (the mmap).

> Look for indications of obvious brokeness.  And, as has been said
> already, unmount the filesystem and fsck it.

Tried the fsck; it's still buggy.

Thanks,

Elizabeth



Reply to: