Skip to contentSkip to conversation

ln -s broken on 2.4.5

DISCUSSION Edsel Adap 8 participants 13 messages May 30, 2001

lore
Share & tools
lore

Edsel Adap

author
#0 lore raw

Hi,

I downloaded the linux 2.4.5 sources and built and installed them on my system. Since then, I've noticed strange file system behavior:

marvin:~> cd /tmp
marvin:/tmp> ls -la
total 2656

drwxrwxrwt    6 root     root         1024 May 30 12:06 ./
drwxr-xr-x   22 root     root         1024 Feb 18  2000 ../
-r--r--r--    1 root     root           11 May 30 11:19 .X0-lock
drwxrwxrwt    2 root     root         1024 May 30 11:19 .X11-unix/
drwxrwxrwt    2 root     root         1024 May 30 11:18 .font-unix/
-rw-r--r--    1 adap     users     2699286 May 30 11:24 mpeg2-digital.mpg
drwx------    2 adap     root         1024 May 30 12:06 ssh-SXp13149/
drwx------    2 adap     root         1024 May 30 11:19 ssh-unNLs321/
marvin:/tmp> ln -s foo bar
marvin:/tmp> ls -la
total 2656
drwxrwxrwt    6 root     root         1024 May 30 12:06 ./
drwxr-xr-x   22 root     root         1024 Feb 18  2000 ../
-r--r--r--    1 root     root           11 May 30 11:19 .X0-lock
drwxrwxrwt    2 root     root         1024 May 30 11:19 .X11-unix/
drwxrwxrwt    2 root     root         1024 May 30 11:18 .font-unix/
lrwxrwxrwx    1 adap     users           3 May 30 12:09 bar -> bar
-rw-r--r--    1 adap     users     2699286 May 30 11:24 mpeg2-digital.mpg
drwx------    2 adap     root         1024 May 30 12:06 ssh-SXp13149/
drwx------    2 adap     root         1024 May 30 11:19 ssh-unNLs321/

marvin:/tmp>

Notice that the symlink created is wrong. It seems that any symlink I create is always linked to itself.

I booted 2.4.0 again, and the problem went away. Is this a known problem? Is there a patch?

Please cc me with your replies since I am not on the list.

Signature · 5 lines
Edsel Adap
[email protected]
http://www.adap.org/~edsel/          LINUX - the choice of the GNU generation

"Netscape is an application which grows to fill all available memory."  - me
#1 lore raw
Quoted 9 lines · Edsel Adap

I downloaded the linux 2.4.5 sources and built and installed them on my system. Since then, I've noticed strange file system behavior:

marvin:/tmp> ln -s foo bar

lrwxrwxrwx 1 adap users 3 May 30 12:09 bar -> bar

Notice that the symlink created is wrong. It seems that any symlink I create is always linked to itself.

I tried the same:

moffe@grignard:/tmp/test# ls -la
totalt 1
drwxr-xr-x    2 moffe    users          48 ons maj 30 19:10:20 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 19:10:40 2001 ..
moffe@grignard:/tmp/test# ln -s foo bar
moffe@grignard:/tmp/test# ls -la
totalt 1
drwxr-xr-x    2 moffe    users          72 ons maj 30 19:10:58 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 19:10:40 2001 ..
lrwxrwxrwx    1 moffe    users           3 ons maj 30 19:10:58 2001 bar -> foo
moffe@grignard:/tmp/test# cd /boot/test/
moffe@grignard:/boot/test# ls -la
totalt 2
drwxr-xr-x    2 moffe    users        1024 ons maj 30 19:10:28 2001 .
drwxr-xr-x    4 root     root         1024 ons maj 30 19:10:28 2001 ..
moffe@grignard:/boot/test# ln -s foo bar
moffe@grignard:/boot/test# ls -la
totalt 2
drwxr-xr-x    2 moffe    users        1024 ons maj 30 19:11:09 2001 .
drwxr-xr-x    4 root     root         1024 ons maj 30 19:10:28 2001 ..
lrwxrwxrwx    1 moffe    users           3 ons maj 30 19:11:09 2001 bar -> foo

/ is on reiserfs and /boot is on ext2 - as you see, I do not have the problem (also running 2.4.5).

Could it be a fileutils problem?

Rasmus

Signature · 7 lines
-- [ Rasmus 'Møffe' Bøg Hansen ] --------------------------------------
Programming is a race between programmers, who try and make more and
more idiot-proof software, and universe, which produces more and more
remarkable idiots.
Until now, universe leads the race.
                                                           - R. Cooka
-------------------------------- [ moffe at amagerkollegiet dot dk ] --
#2 lore raw
In reply to Edsel Adap
Quoted 2 lines

I downloaded the linux 2.4.5 sources and built and installed them on my system. Since then, I've noticed strange file system behavior:

What file system. Its find on my 2.4.5-ac with ext2

#3 lore raw
Quoted 4 lines · In article <[email protected]> you wrote:
Quoted 2 lines

I downloaded the linux 2.4.5 sources and built and installed them on my system. Since then, I've noticed strange file system behavior:

What file system. Its find on my 2.4.5-ac with ext2

100% reproducible on NFS and EXT2 here, with following:

$ ln -s fupp/bar bar
$ ls -la bar
lrwxrwxrwx   1 marcus   users           3 May 30 20:30 bar -> bar
$ 

Ciao, Marcus

#4 lore raw
Quoted 2 lines · Marcus Meissner
$ ln -s fupp/bar bar
$ ls -la bar

---
Is it peculiar to a specific architecture? What does strace show for args to the symlink cmd?
-l
--

The above thoughts and           | They may have nothing to do with
writings are my own.             | the opinions of my employer. :-)
L A Walsh                        | Trust Technology, Core Linux, SGI
[email protected]                      | Voice: (650) 933-5338
#5 lore raw
In reply to Marcus Meissner
Quoted 7 lines
Quoted 1 line

What file system. Its find on my 2.4.5-ac with ext2

100% reproducible on NFS and EXT2 here, with following:

$ ls -la bar
lrwxrwxrwx   1 marcus   users           3 May 30 20:30 bar -> bar

bash-2.04$ uname -a
Linux irongate.swansea.linux.org.uk 2.4.5-ac2 #163 Mon May 28 22:56:38 BST 2001 i686 unknown bash-2.04$ ln -s frobnitz flop
bash-2.04$ ls -l f*
lrwxrwxrwx 1 alan users 8 May 30 20:50 flop -> frobnitz

bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81

#6 lore raw
In reply to Marcus Meissner
Quoted 14 lines · Alan Cox
Quoted 7 lines
Quoted 1 line

What file system. Its find on my 2.4.5-ac with ext2

100% reproducible on NFS and EXT2 here, with following:

$ ls -la bar
lrwxrwxrwx   1 marcus   users           3 May 30 20:30 bar -> bar

bash-2.04$ uname -a
Linux irongate.swansea.linux.org.uk 2.4.5-ac2 #163 Mon May 28 22:56:38 BST 2001 i686 unknown bash-2.04$ ln -s frobnitz flop
bash-2.04$ ls -l f*
lrwxrwxrwx 1 alan users 8 May 30 20:50 flop -> frobnitz

Quoted 3 lines

bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81

The problem is only there if you specify a directory for the linked to component.

[marcus@wine /tmp]$ strace -f ln -s fupp/berk xxx execve("/bin/ln", ["ln", "-s", "fupp/berk", "xxx"], [/* 39 vars */]) = 0 ... ld stuff ... locale stuff ...

lstat64("xxx", 0xbffff47c)              = -1 ENOENT (No such file or directory)
lstat64("xxx", 0xbffff47c)              = -1 ENOENT (No such file or directory)
symlink("fupp/berk", "xxx")             = 0
_exit(0)                                = ?

[marcus@wine /tmp]$ ll xxx
lrwxrwxrwx 1 marcus users 3 May 30 22:36 xxx -> xxx
[marcus@wine /tmp]$ uname -a
Linux wine.lst.de 2.4.5-ac4 #3 SMP Tue May 29 18:24:07 CEST 2001 i686 unknown [marcus@wine /tmp]$

It works just wonderful with previous kernels.

Ciao, Marcus

#7 lore raw
Quoted 41 lines · Marcus Meissner
Quoted 10 lines · Alan Cox
Quoted 7 lines
Quoted 1 line

What file system. Its find on my 2.4.5-ac with ext2

100% reproducible on NFS and EXT2 here, with following:

$ ls -la bar
lrwxrwxrwx   1 marcus   users           3 May 30 20:30 bar -> bar

bash-2.04$ uname -a
Linux irongate.swansea.linux.org.uk 2.4.5-ac2 #163 Mon May 28

22:56:38 BST 2001 i686 unknown

Quoted 3 lines

bash-2.04$ ln -s frobnitz flop
bash-2.04$ ls -l f*
lrwxrwxrwx 1 alan users 8 May 30 20:50 flop ->

frobnitz

Quoted 4 lines

bash-2.04$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81

The problem is only there if you specify a directory for the linked to component.

[marcus@wine /tmp]$ strace -f ln -s fupp/berk xxx execve("/bin/ln", ["ln", "-s", "fupp/berk", "xxx"], [/* 39 vars */]) = 0
... ld stuff ... locale stuff ...
lstat64("xxx", 0xbffff47c) = -1 ENOENT (No such file or
directory)
lstat64("xxx", 0xbffff47c) = -1 ENOENT (No such file or
directory)
symlink("fupp/berk", "xxx") = 0
_exit(0) = ?
[marcus@wine /tmp]$ ll xxx
lrwxrwxrwx 1 marcus users 3 May 30 22:36 xxx -> xxx
[marcus@wine /tmp]$ uname -a
Linux wine.lst.de 2.4.5-ac4 #3 SMP Tue May 29 18:24:07 CEST 2001 i686 unknown
[marcus@wine /tmp]$

Quoted 1 line

It works just wonderful with previous kernels.

Works here:

=== Cut ===
[root@nomad tmp]# uname -a
Linux nomad.cyberbills.com 2.4.5ac4 #1 SMP Wed May 30 11:55:15 PDT 2001 i686 unknown
[root@nomad tmp]# touch 2/dummy
[root@nomad tmp]# ln -s 2/dummy very_dummy
[root@nomad tmp]# ls -l very_dummy
lrwxrwxrwx 1 root root 7 May 30 14:37 very_dummy -> 2/dummy
=== Cut ===

EXT2, loaded as module.

There are other problems (may be caused by R.Gooch's latest patch, devfs-177) - no module autoloading complaining about "/dev//floppy/0" etc. (there are 2 slashes after /dev, it's not a mistake). Recompiling ac5 without that patch, may be it'll help.

---
Sergey Kubushin Sr. Unix Administrator
CyberBills, Inc. Phone: 702-567-8857
874 American Pacific Dr, Fax: 702-567-8808
Henderson, NV 89014

#8 lore raw
In reply to Marcus Meissner
Quoted 2 lines · Marcus Meissner

The problem is only there if you specify a directory for the linked to component.

I do still not see those problems:

moffe@grignard:/tmp/test# ls -la
totalt 1
drwxr-xr-x    2 moffe    users          48 ons maj 30 23:43:46 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 23:43:54 2001 ..
moffe@grignard:/tmp/test# ln -s foo/test bar
moffe@grignard:/tmp/test# ls -la
totalt 1
drwxr-xr-x    2 moffe    users          72 ons maj 30 23:44:32 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 23:43:54 2001 ..
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:44:32 2001 bar -> foo/test
moffe@grignard:/tmp/test# mkdir test
moffe@grignard:/tmp/test# ln -s test/bar foo
moffe@grignard:/tmp/test# ls -la
totalt 2
drwxr-xr-x    3 moffe    users         120 ons maj 30 23:44:48 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 23:43:54 2001 ..
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:44:32 2001 bar -> foo/test
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:44:48 2001 foo -> test/bar
drwxr-xr-x    2 moffe    users          48 ons maj 30 23:44:40 2001 test
moffe@grignard:/tmp/test# mkdir test/foo
moffe@grignard:/tmp/test# ln -s test/foo foo2
moffe@grignard:/tmp/test# ls -la
totalt 2
drwxr-xr-x    3 moffe    users         144 ons maj 30 23:45:11 2001 .
drwxrwxrwt   13 root     root          496 ons maj 30 23:43:54 2001 ..
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:44:32 2001 bar -> foo/test
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:44:48 2001 foo -> test/bar
lrwxrwxrwx    1 moffe    users           8 ons maj 30 23:45:11 2001 foo2 -> test/foo
drwxr-xr-x    3 moffe    users          72 ons maj 30 23:45:01 2001 test
moffe@grignard:/tmp/test# uname -m
i586
moffe@grignard:/tmp/test# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)
moffe@grignard:/tmp/test# uname -r
2.4.5
moffe@grignard:/tmp/test# ldd --version
ldd (GNU libc) 2.2.3

Rasmus

Signature · 5 lines
-- [ Rasmus 'Møffe' Bøg Hansen ] --------------------------------------
If you don't receive an answer, then it either indicates that the bug is
too obvious or too difficult.
                                                       -- Manfred Spraul
-------------------------------- [ moffe at amagerkollegiet dot dk ] --
#9 lore raw
In reply to Marcus Meissner
Quoted 6 lines

The problem is only there if you specify a directory for the linked to component.

[marcus@wine /tmp]$ strace -f ln -s fupp/berk xxx execve("/bin/ln", ["ln", "-s", "fupp/berk", "xxx"], [/* 39 vars */]) = 0 ... ld stuff ... locale stuff ...

bash-2.04$ ln -s foo/frob eep
bash-2.04$ ls -l eep
lrwxrwxrwx 1 alan users 8 May 30 22:19 eep -> foo/frob

#10 lore raw
In reply to Marcus Meissner
Quoted 4 lines · Marcus Meissner

The problem is only there if you specify a directory for the linked to component.

[marcus@wine /tmp]$ strace -f ln -s fupp/berk xxx

Is it only a directory, or the length?

ln -s fupp_berk xxx

for instance.

Signature · 3 lines
     Mike Castle      [email protected]      www.netcom.com/~dalgoda/
    We are all of us living in the shadow of Manhattan.  -- Watchmen
fatal ("You are in a maze of twisty compiler features, all different"); -- gcc
#11 lore raw
In reply to Marcus Meissner
Quoted 10 lines · Alan Cox
Quoted 6 lines

The problem is only there if you specify a directory for the linked to component.

[marcus@wine /tmp]$ strace -f ln -s fupp/berk xxx execve("/bin/ln", ["ln", "-s", "fupp/berk", "xxx"], [/* 39 vars */]) = 0 ... ld stuff ... locale stuff ...

bash-2.04$ ln -s foo/frob eep
bash-2.04$ ls -l eep
lrwxrwxrwx 1 alan users 8 May 30 22:19 eep -> foo/frob

*sigh*

I just rebooted and it is no longer reproducable.

Sorry for the confusion caused.

Ciao, Marcus

author
#12 lore raw
In reply to Edsel Adap
Quoted 4 lines · Alan Cox
Quoted 2 lines

I downloaded the linux 2.4.5 sources and built and installed them on my system. Since then, I've noticed strange file system behavior:

What file system. Its find on my 2.4.5-ac with ext2

Filesystem: ext2
Architecture: i386
CPU: AMD K6-II

Christopher Cole mentioned that he saw this problem, but it went away after a reboot. I rebooted into 2.4.5 again and the problem seemed to have gone away.

But now, I got something else.... something that looks like a kernel Ooops. I was running automake and got the following:
kernel BUG at inode.c:486!

invalid operand: 0000
CPU:    0
EIP:    0010:[<c013fa2b>]
EFLAGS: 00010286

...

I'm gonna try 2.4.4 for now. But if anyone is interested in looking into this deeper, I can send the whole "oops" message and whatever other info needed to debug this.

Signature · 5 lines
Edsel Adap
[email protected]
http://www.adap.org/~edsel/          LINUX - the choice of the GNU generation

"Netscape is an application which grows to fill all available memory."  - me