2001-03-13 06:34:01

by John R Lenton

[permalink] [raw]
Subject: ln -l says symlink has size 281474976710666

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).

--
John Lenton ([email protected]) -- Random fortune:
L'acne giovanile si cura con la vecchiaia.


2001-03-13 21:49:57

by Andreas Dilger

[permalink] [raw]
Subject: Re: ln -l says symlink has size 281474976710666

John Lenton writes:
> 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
--
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

2001-03-14 05:22:10

by John R Lenton

[permalink] [raw]
Subject: Re: ln -l says symlink has size 281474976710666

On Tue, Mar 13, 2001 at 02:47:16PM -0700, Andreas Dilger wrote:
> 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

> 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.

--
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.

2001-03-14 05:59:37

by Andreas Dilger

[permalink] [raw]
Subject: Re: ln -l says symlink has size 281474976710666

John Lenton writes:
> 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.

> 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
--
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

2001-03-14 09:42:36

by Xavier Bestel

[permalink] [raw]
Subject: Re: ln -l says symlink has size 281474976710666

Le 13 Mar 2001 22:58:08 -0700, Andreas Dilger a ?crit :
> 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