linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ln -l says symlink has size 281474976710666
@ 2001-03-13  6:35 John R Lenton
  2001-03-13 21:47 ` Andreas Dilger
  0 siblings, 1 reply; 5+ messages in thread
From: John R Lenton @ 2001-03-13  6:35 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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 (john@grulic.org.ar) -- Random fortune:
L'acne giovanile si cura con la vecchiaia.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ln -l says symlink has size 281474976710666
  2001-03-13  6:35 ln -l says symlink has size 281474976710666 John R Lenton
@ 2001-03-13 21:47 ` Andreas Dilger
  2001-03-14  5:22   ` John R Lenton
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2001-03-13 21:47 UTC (permalink / raw)
  To: John R Lenton; +Cc: Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ln -l says symlink has size 281474976710666
  2001-03-13 21:47 ` Andreas Dilger
@ 2001-03-14  5:22   ` John R Lenton
  2001-03-14  5:58     ` Andreas Dilger
  0 siblings, 1 reply; 5+ messages in thread
From: John R Lenton @ 2001-03-14  5:22 UTC (permalink / raw)
  To: Linux Kernel Mailing List

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 (john@grulic.org.ar) -- Random fortune:
Acepto que sientas odio, pero no que actúes con él...
acepto que ames, aplaudo que actúes siempre con él.
   -- Montesino.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ln -l says symlink has size 281474976710666
  2001-03-14  5:22   ` John R Lenton
@ 2001-03-14  5:58     ` Andreas Dilger
  2001-03-14  9:38       ` Xavier Bestel
  0 siblings, 1 reply; 5+ messages in thread
From: Andreas Dilger @ 2001-03-14  5:58 UTC (permalink / raw)
  To: John R Lenton; +Cc: Linux Kernel Mailing List, Theodore Y. Ts'o

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ln -l says symlink has size 281474976710666
  2001-03-14  5:58     ` Andreas Dilger
@ 2001-03-14  9:38       ` Xavier Bestel
  0 siblings, 0 replies; 5+ messages in thread
From: Xavier Bestel @ 2001-03-14  9:38 UTC (permalink / raw)
  To: Andreas Dilger
  Cc: John R Lenton, Linux Kernel Mailing List, Theodore "Y." Ts'o

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-03-14  9:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-13  6:35 ln -l says symlink has size 281474976710666 John R Lenton
2001-03-13 21:47 ` Andreas Dilger
2001-03-14  5:22   ` John R Lenton
2001-03-14  5:58     ` Andreas Dilger
2001-03-14  9:38       ` Xavier Bestel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).