2001-02-04 09:54:40

by Pierfrancesco Caci

[permalink] [raw]
Subject: 2.4.1 segfault when doing "ls /dev/"


It happened with 2.4.0, it continues to happen with 2.4.1 too

root@penny:~ # ps -ax|grep devfs
48 ? S 0:00 /sbin/devfsd /dev
6300 pts/0 S 0:00 grep devfs
root@penny:~ # cd /dev
root@penny:/dev # ls
Segmentation fault
root@penny:/dev # ps -ax|grep devfs
6309 pts/0 S 0:00 grep devfs
root@penny:/dev #

>From now on, I get a segfault whenever I try to see what's inside /dev
but I can see what's _below_ /dev/, supposing I know where to look:

root@penny:/dev # ls scsi
host0
root@penny:/dev # ls tts
0 1


Here's the output of ksymoops:


Feb 4 10:28:57 penny kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
Feb 4 10:28:57 penny kernel: c013b1c9
Feb 4 10:28:57 penny kernel: *pde = 00000000
Feb 4 10:28:57 penny kernel: CPU: 0
Feb 4 10:28:57 penny kernel: EIP: 0010:[vfs_follow_link+33/348]
Feb 4 10:28:57 penny kernel: EFLAGS: 00010217
Feb 4 10:28:57 penny kernel: eax: 00000000 ebx: c7ae9fa4 ecx: 00000735 edx: c0320a60
Feb 4 10:28:57 penny kernel: esi: 00000000 edi: 00000000 ebp: 00000000 esp: c7ae9f10
Feb 4 10:28:57 penny kernel: ds: 0018 es: 0018 ss: 0018
Feb 4 10:28:57 penny kernel: Process devfsd (pid: 48, stackpage=c7ae9000)
Feb 4 10:28:57 penny kernel: Stack: c7ae9fa4 00000000 c3aea960 c7ae9fa4 00000000 c015a703 c7ae9fa4 00000000
Feb 4 10:28:57 penny kernel: c7ae8000 c0138db9 c3aea960 c7ae9fa4 c69c87e0 c2e4e000 00000000 c7ae9fa4
Feb 4 10:28:57 penny kernel: 00000000 00000001 00000000 c7ae9fa8 00000009 c3aea960 c2e4e005 00000004
Feb 4 10:28:57 penny kernel: Call Trace: [devfs_follow_link+31/36] [path_walk+1701/1964] [__user_walk+60/88] [sys_chown+22/72] [system_call+51/56] [startup_32+43/313]
Feb 4 10:28:57 penny kernel: Code: 80 3f 2f 0f 85 c2 00 00 00 53 e8 b0 d2 ff ff ba 00 e0 ff ff
Using defaults from ksymoops -t elf32-i386 -a i386

Code; 00000000 Before first symbol
0000000000000000 <_EIP>:
Code; 00000000 Before first symbol
0: 80 3f 2f cmpb $0x2f,(%edi)
Code; 00000003 Before first symbol
3: 0f 85 c2 00 00 00 jne cb <_EIP+0xcb> 000000cb Before first symbol
Code; 00000009 Before first symbol
9: 53 push %ebx
Code; 0000000a Before first symbol
a: e8 b0 d2 ff ff call ffffd2bf <_EIP+0xffffd2bf> ffffd2bf <END_OF_CODE+356a3187/????>
Code; 0000000f Before first symbol
f: ba 00 e0 ff ff mov $0xffffe000,%edx

Feb 4 10:28:57 penny kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000000
Feb 4 10:28:57 penny kernel: c013b1c9
Feb 4 10:28:57 penny kernel: *pde = 00000000
Feb 4 10:28:57 penny kernel: Oops: 0000
Feb 4 10:28:57 penny kernel: CPU: 0
Feb 4 10:28:57 penny kernel: EIP: 0010:[vfs_follow_link+33/348]
Feb 4 10:28:57 penny kernel: EFLAGS: 00010217
Feb 4 10:28:57 penny kernel: eax: 00000000 ebx: c39b3fa4 ecx: 00000735 edx: c0320a60
Feb 4 10:28:57 penny kernel: esi: c3aea0e0 edi: 00000000 ebp: 00000000 esp: c39b3f10
Feb 4 10:28:57 penny kernel: ds: 0018 es: 0018 ss: 0018
Feb 4 10:28:57 penny kernel: Process ls (pid: 6303, stackpage=c39b3000)
Feb 4 10:28:57 penny kernel: Stack: c39b3fa4 c3aea0e0 c3aea0e0 c39b3fa4 00000000 c015a703 c39b3fa4 00000000
Feb 4 10:28:57 penny kernel: c39b2000 c0138db9 c3aea0e0 c39b3fa4 c69c87e0 c31c4000 00000000 c39b3fa4
Feb 4 10:28:57 penny kernel: 00000002 00000001 00000002 c01382ea 00000009 c3aea0e0 c31c4000 00000004
Feb 4 10:28:57 penny kernel: Call Trace: [devfs_follow_link+31/36] [path_walk+1701/1964] [getname+90/152] [__user_walk+60/88] [sys_stat64+22/120] [system_call+51/56]
Feb 4 10:28:57 penny kernel: Code: 80 3f 2f 0f 85 c2 00 00 00 53 e8 b0 d2 ff ff ba 00 e0 ff ff

Code; 00000000 Before first symbol
0000000000000000 <_EIP>:
Code; 00000000 Before first symbol
0: 80 3f 2f cmpb $0x2f,(%edi)
Code; 00000003 Before first symbol
3: 0f 85 c2 00 00 00 jne cb <_EIP+0xcb> 000000cb Before first symbol
Code; 00000009 Before first symbol
9: 53 push %ebx
Code; 0000000a Before first symbol
a: e8 b0 d2 ff ff call ffffd2bf <_EIP+0xffffd2bf> ffffd2bf <END_OF_CODE+356a3187/????>
Code; 0000000f Before first symbol
f: ba 00 e0 ff ff mov $0xffffe000,%edx


root@penny:/usr/src/linux/scripts # . ver_linux
-- Versions installed: (if some fields are empty or look
-- unusual then possibly you have very old versions)
Linux penny 2.4.1 #1 Sat Feb 3 20:43:54 CET 2001 i686 unknown
Kernel modules 2.4.1
Gnu C 2.95.3
Gnu Make 3.79.1
Binutils 2.10.1.0.2
Linux C Library 2.2.1
Dynamic linker ldd (GNU libc) 2.2.1
Procps 2.0.7
Mount 2.10q
Net-tools 2.05
Console-tools 0.2.3
Sh-utils 2.0.11
Modules Loaded rd sb sb_lib uart401 nfs mousedev hid input ipv6 nfsd lockd sunrpc af_packet eepro100 3c509 awe_wave opl3 sound soundcore isa-pnp uhci usbcore ipchains

root@penny:/usr/src/linux/scripts # dpkg -l devfsd
ii devfsd 1.3.10-5 Daemon for the device filesystem


Pf


--

-------------------------------------------------------------------------------
Pierfrancesco Caci | ik5pvx | mailto:[email protected] - http://gusp.dyndns.org
Firenze - Italia | Office for the Complication of Otherwise Simple Affairs
Linux penny 2.4.1 #1 Sat Feb 3 20:43:54 CET 2001 i686 unknown


2001-02-04 13:47:38

by Pierre Rousselet

[permalink] [raw]
Subject: Re: 2.4.1 segfault when doing "ls /dev/"

Pierfrancesco Caci wrote:

> 48 ? S 0:00 /sbin/devfsd /dev

on my box devfsd has pid 15, it comes just after the [kdaems]

1 ? S 0:04 init
2 ? SW 0:00 [keventd]
3 ? SW 0:00 [kapm-idled]
4 ? SW 0:00 [kswapd]
5 ? SW 0:00 [kreclaimd]
6 ? SW 0:00 [bdflush]
7 ? SW 0:00 [kupdate]
8 ? SW 0:00 [kreiserfsd]
15 ? S 0:00 devfsd /dev

and it works with 2.4.x

--
------------------------------------------------
Pierre Rousselet <[email protected]>
------------------------------------------------

2001-02-04 13:56:37

by Pierfrancesco Caci

[permalink] [raw]
Subject: Re: 2.4.1 segfault when doing "ls /dev/"

:-> "Pierre" == Pierre Rousselet <[email protected]> writes:

> Pierfrancesco Caci wrote:
>> 48 ? S 0:00 /sbin/devfsd /dev

> on my box devfsd has pid 15, it comes just after the [kdaems]


> and it works with 2.4.x

I can't see how this can affect performance/funtionality of
devfsd. Can you try to stop the daemon and restart it to see if
continues to work as before ?

Pf


--

-------------------------------------------------------------------------------
Pierfrancesco Caci | ik5pvx | mailto:[email protected] - http://gusp.dyndns.org
Firenze - Italia | Office for the Complication of Otherwise Simple Affairs
Linux penny 2.4.1 #1 Sat Feb 3 20:43:54 CET 2001 i686 unknown

2001-02-04 15:59:07

by Pierre Rousselet

[permalink] [raw]
Subject: Re: 2.4.1 segfault when doing "ls /dev/"

Pierfrancesco Caci wrote:

> I can't see how this can affect performance/funtionality of
> devfsd. Can you try to stop the daemon and restart it to see if
> continues to work as before ?

/dev is mounted at boot time by the kernel (CONFIG_DEVFS_MOUNT=y).
The system boots and runs without devfsd. You just can't start any
process calling for non-existing device under /dev and not created
by devfsd. For instance pppd or mc won't start by lack of pseudo-tty
esd needs /dev/dsp ...

i was thinking the trouble may come from some programme launched by
your boot scripts before devfsd is running.

is your version of fileutils > 4.0.28 (ls --version) ?

--
------------------------------------------------
Pierre Rousselet <[email protected]>
------------------------------------------------

2001-02-04 16:23:50

by Pierfrancesco Caci

[permalink] [raw]
Subject: Re: 2.4.1 segfault when doing "ls /dev/"

:-> "Pierre" == Pierre Rousselet <[email protected]> writes:


> /dev is mounted at boot time by the kernel (CONFIG_DEVFS_MOUNT=y).
> The system boots and runs without devfsd. You just can't start any
> process calling for non-existing device under /dev and not created
> by devfsd. For instance pppd or mc won't start by lack of pseudo-tty
> esd needs /dev/dsp ...

Yes I know this. Actually, booting with "devfs=nomount s" is the only
way to update the boot record with lilo and my existing lilo.conf.
If I boot with devfs=nomount, I *can* ls /dev, without segfaulting.
I don't want to access or use any device in /dev, I just want to stat
/dev and see what's inside. There's something wrong with (I suspect)
devfsd and the way it populates /dev with symlinks, whick make /dev
un-listable but still usable, somewhat.


> i was thinking the trouble may come from some programme launched by
> your boot scripts before devfsd is running.

I have no idea. Any other debian users reporting this ?

> is your version of fileutils > 4.0.28 (ls --version) ?

root@penny:/usr/src/linux # ls --version
ls (fileutils) 4.0.37


Pf


--

-------------------------------------------------------------------------------
Pierfrancesco Caci | ik5pvx | mailto:[email protected] - http://gusp.dyndns.org
Firenze - Italia | Office for the Complication of Otherwise Simple Affairs
Linux penny 2.4.1 #1 Sat Feb 3 20:43:54 CET 2001 i686 unknown

2001-02-04 17:37:43

by Pierre Rousselet

[permalink] [raw]
Subject: Re: 2.4.1 segfault when doing "ls /dev/"

Pierfrancesco Caci wrote:

> Yes I know this. Actually, booting with "devfs=nomount s" is the only
> way to update the boot record with lilo and my existing lilo.conf.

i can't do that on my box, /dev is only a mount point for devfs.

assuming your /dev directory is dirty from something else than devfsd,
could you try this while devfsd is running :
#mkdir /devtest
#mount none -t devfs /devtest
#ls /devtest

--
------------------------------------------------
Pierre Rousselet <[email protected]>
------------------------------------------------