Skip to contentSkip to conversation

ln -l says symlink has size 281474976710666

DISCUSSION John R Lenton 3 participants 5 messages Mar 13, 2001 – Mar 14, 2001

lore
Share & tools
lore
#0 lore raw

as the subject says:

lrwxrwxrwx 1 root root 281474976710666 Jan 27 20:50 imlib1 -> imlib-base

it isn't the only one, for example

lrwxrwxrwx 1 root root 281474976710669 Jan 27 14:43 fd -> /proc/self/fd

i.e. 2**48 + what it should be.

ver_linux says

  Gnu C                  2.95.3
  Gnu make               3.79.1
  binutils               2.10.91.0.2
  util-linux             2.10s
  modutils               2.4.2
  e2fsprogs              1.19
  reiserfsprogs          3.x.0b
  PPP                    2.4.0
  Linux C Library        2.2.2
  Dynamic linker (ldd)   2.2.2
  Procps                 2.0.7
  Net-tools              1.58
  Kbd                    1.04
  Sh-utils               2.0.11
  Modules Loaded         ppp_deflate bsd_comp ppp_async ppp_generic slhc rtc

the fs is plain ext2, and I'm running 2.4.2-ac16. My first guess was I was needing a newer foo, but all my foos seem to be OK (except for reiserfsprogs, but that's another issue).

Signature · 2 lines
John Lenton ([email protected]) -- Random fortune:
L'acne giovanile si cura con la vecchiaia.
#1 lore raw
Quoted 9 lines · John Lenton

as the subject says:

lrwxrwxrwx 1 root root 281474976710666 Jan 27 20:50 imlib1 -> imlib-base

it isn't the only one, for example

lrwxrwxrwx 1 root root 281474976710669 Jan 27 14:43 fd -> /proc/self/fd

i.e. 2**48 + what it should be.

Can you do the following:

ls -i (path)/imlib1; ls -i (path)/fd # record inode numbers
debugfs /dev/hdX
stat <inode_number> # '<' and '>' are required

send output. This should tell us if the badness is stored on disk or in memory. Of course e2fsck would help as well. Were these newly created inodes, or existing ones? If you shutdown and restart, does it go away? Anything in syslog about ext2 warnings or errors?

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
#2 lore raw
In reply to John R Lenton
Quoted 3 lines · Andreas Dilger

ls -i (path)/imlib1; ls -i (path)/fd # record inode numbers
debugfs /dev/hdX
stat <inode_number> # '<' and '>' are required

burocracia:~# ls -i /usr/share/doc/|grep \ imlib1$
 404176 imlib1
burocracia:~# ls -i /dev/|grep fd$
 404192 fd
burocracia:~# debugfs /dev/hda2
debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
debugfs:  stat <404176>
Inode: 404176   Type: symlink    Mode:  0777   Flags: 0x0   Generation: 2457884131
User:     0   Group:     0   Size: 281474976710666
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 0
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x3a735ed8 -- Sat Jan 27 20:50:48 2001
atime: 0x3aaef4cd -- Wed Mar 14 01:34:21 2001
mtime: 0x3a735ed8 -- Sat Jan 27 20:50:48 2001
Fast_link_dest: imlib-base
debugfs:  stat <404192>
Inode: 404192   Type: symlink    Mode:  0777   Flags: 0x0   Generation: 1796859698
User:     0   Group:     0   Size: 281474976710669
File ACL: 0    Directory ACL: 0
Links: 1   Blockcount: 0
Fragment:  Address: 0    Number: 0    Size: 0
ctime: 0x3a7308d5 -- Sat Jan 27 14:43:49 2001
atime: 0x3aaef4cd -- Wed Mar 14 01:34:21 2001
mtime: 0x3a7308d5 -- Sat Jan 27 14:43:49 2001
Fast_link_dest: /proc/self/fd
Quoted 4 lines

send output. This should tell us if the badness is stored on disk or in memory. Of course e2fsck would help as well. Were these newly created inodes, or existing ones? If you shutdown and restart, does it go away? Anything in syslog about ext2 warnings or errors?

this is after an e2fsck, after a reboot, after restart. Nothing in the logs. The inodes are as old as the system, which isn't all that old (circa the first release with reiserfs).

I did a find on the whole filesystem and I seem to have stumbled on the only two files with this problem by accident.

Signature · 4 lines
John Lenton ([email protected]) -- Random fortune:
Acepto que sientas odio, pero no que actúes con él...
acepto que ames, aplaudo que actúes siempre con él.
   -- Montesino.
#3 lore raw
Quoted 10 lines · John Lenton
burocracia:~# debugfs /dev/hda2
debugfs 1.19, 13-Jul-2000 for EXT2 FS 0.5b, 95/08/09
debugfs:  stat <404176>
Inode: 404176   Type: symlink    Mode:  0777   Flags: 0x0   Generation: 2457884131
User:     0   Group:     0   Size: 281474976710666
Fast_link_dest: imlib-base
debugfs:  stat <404192>
Inode: 404192   Type: symlink    Mode:  0777   Flags: 0x0   Generation: 1796859698
User:     0   Group:     0   Size: 281474976710669
Fast_link_dest: /proc/self/fd

So it is garbage in the "i_size_high" field (=i_dir_acl) in the inode.

Quoted 3 lines

this is after an e2fsck, after a reboot, after restart. Nothing in the logs. The inodes are as old as the system, which isn't all that old (circa the first release with reiserfs).

Luckily, after the symlink is created it ignores the size, and only uses the i_blocks count to determine if the symlink is stored in the inode itself or in another block (the fast symlink will be NUL terminated). It could well have been corruption from a long time ago, and only with 2.4.x and LFS you have noticed it.

Probably e2fsck needs to be updated to check for and fix this problem - it is impossible for a symlink to be larger than a single block, so the i_size_high field should always be zero.

Cheers, Andreas

Signature · 3 lines
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert
#4 lore raw
Quoted 5 lines · Andreas Dilger

Luckily, after the symlink is created it ignores the size, and only uses the i_blocks count to determine if the symlink is stored in the inode itself or in another block (the fast symlink will be NUL terminated). It could well have been corruption from a long time ago, and only with 2.4.x and LFS you have noticed it.

BTW, if I hand-make an ext2 fs with tiny files stored directly in the inode, will it work ? Silly question ?

Xav