Oops when accessing /dev/fd0 (kernel 2.4.7 and devfsd 1.3.11)
Any access to /dev/fd0 gives a kernel oops. Have not accessed the floppy in a while, but noticed the complaint when booting and after looking further.
kernel: 2.4.7 (using devfs)
devfsd: 1.3.11
[12]# insmod floppy
Using /lib/modules/2.4.7athlon/kernel/drivers/block/floppy.o inserting floppy driver for 2.4.7athlon
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
[13]# ls -l /dev/fd0
Unable to handle kernel NULL pointer dereference at virtual address 00000000
printing eip:
c013c4c4
*pde = 00000000
Oops: 0000
CPU: 0
EIP: 0010:[<c013c4c4>]
EFLAGS: 00010246
eax: 00000000 ebx: 00001000 ecx: ffffffff edx: 00000000
esi: 00000000 edi: 00000000 ebp: dd439fa4 esp: dd439f5c
ds: 0018 es: 0018 ss: 0018
Process ls (pid: 367, stackpage=dd439000)
Stack: df693ec0 00000000 00001000 c015469b df693ec0 bfffec54 00001000 00000000
df092840 c01376d2 df693ec0 bfffec54 00001000 df092840 dd438000 bffffead
00000003 bffffc7c df693ec0 c188e4c0 00003000 dd438000 08057000 00000008
Call Trace: [<c015469b>] [<c01376d2>] [<c0106c2b>]
Code: f2 ae f7 d1 49 89 ce 39 de 0f 47 f3 56 52 8b 44 24 1c 50 e8Segmentation fault
Please CC replies to [email protected] as I am not on the list. Thanks.
Quoted 5 lines · Taylor Carpenter
Any access to
/dev/fd0gives a kernel oops. Have not accessed the floppy in a while, but noticed the complaint when booting and after looking further.kernel: 2.4.7 (using devfs)
devfsd: 1.3.11
If you think the problem may be devfs-related, a good test is to try again with CONFIG_DEVFS_FS=n.
However, I run devfs, and I don't see this problem.
Quoted 25 lines
[12]# insmod floppy
Using/lib/modules/2.4.7athlon/kernel/drivers/block/floppy.oinserting floppy driver for 2.4.7athlon
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077[13]# ls -l
/dev/fd0Unable to handle kernel NULL pointer dereference at virtual address 00000000 printing eip: c013c4c4 *pde = 00000000 Oops: 0000 CPU: 0 EIP: 0010:[<c013c4c4>] EFLAGS: 00010246 eax: 00000000 ebx: 00001000 ecx: ffffffff edx: 00000000 esi: 00000000 edi: 00000000 ebp: dd439fa4 esp: dd439f5c ds: 0018 es: 0018 ss: 0018 Process ls (pid: 367, stackpage=dd439000) Stack: df693ec0 00000000 00001000 c015469b df693ec0 bfffec54 00001000 00000000 df092840 c01376d2 df693ec0 bfffec54 00001000 df092840 dd438000 bffffead 00000003 bffffc7c df693ec0 c188e4c0 00003000 dd438000 08057000 00000008 Call Trace: [<c015469b>] [<c01376d2>] [<c0106c2b>] Code: f2 ae f7 d1 49 89 ce 39 de 0f 47 f3 56 52 8b 44 24 1c 50 e8
Quoted 1 line
Segmentation fault
You need to run this through ksymoops before anyone can help you.
Regards, Richard.... Permanent: [email protected] Current: [email protected]
Quoted 2 lines · Richard Gooch
If you think the problem may be devfs-related, a good test is to try again with
CONFIG_DEVFS_FS=n.
I tried kernel 2.4.8 and also had an oops. An earlier kernel w/out devfs did not cause an oops. I plan on making a non-devfs 2.4.8 kernel to see if the oops does not happen.
Quoted 1 line
However, I run devfs, and I don't see this problem.
I do not know if the devfs info, in the oops (ksymoops output) data below indicates a problem w/devfs or not. Maybe you can tell?
Quoted 1 line
You need to run this through ksymoops before anyone can help you.
Here is the output from ksymoops
-----
Quoted 1 line
Quoted 1 line
EIP;
c013c4c4<vfs_readlink+24/60> <=====
Trace; c015469b <devfs_unregister_blkdev+12eb/1960> Trace; c01376d2 <cdput+5e2/880>
Trace; c0106c2b <__up_wakeup+108b/24a0> Code; c013c4c4 <vfs_readlink+24/60> 00000000 <_EIP>:
Code; c013c4c4 <vfs_readlink+24/60> <=====
0: f2 ae repnz scas %es:(%edi),%al <=====
Code; c013c4c6 <vfs_readlink+26/60>
2: f7 d1 not %ecx
Code; c013c4c8 <vfs_readlink+28/60>
4: 49 dec %ecx
Code; c013c4c9 <vfs_readlink+29/60>
5: 89 ce mov %ecx,%esi
Code; c013c4cb <vfs_readlink+2b/60>
7: 39 de cmp %ebx,%esi
Code; c013c4cd <vfs_readlink+2d/60>
9: 0f 47 f3 cmova %ebx,%esi
Code; c013c4d0 <vfs_readlink+30/60>
c: 56 push %esi
Code; c013c4d1 <vfs_readlink+31/60>
d: 52 push %edx
Code; c013c4d2 <vfs_readlink+32/60>
e: 8b 44 24 1c mov 0x1c(%esp,1),%eax
Code; c013c4d6 <vfs_readlink+36/60>
12: 50 push %eax
Code; c013c4d7 <vfs_readlink+37/60>
13: e8 00 00 00 00 call 18 <_EIP+0x18> c013c4dc <vfs_readlink+3c/60>
-----
After watching what happens during the boot process I started turning off things that might be touching the floppy device (at boot), such as autofs. What finally stopped the Oops was to comment out the floppy entry in /etc/fstab:
/dev/fd0 /floppy auto defaults,user,noauto 0 0
I can then load the floppy module after boot, and successfully access the floppy device w/o any problems. The oops happened when the mountall script (Debian testing) was running:
mount -avt nonfs,noproc,nosmbfs
Devfsd is started way before mountall is ran so I do not know why it is causing problems.
Please CC replies to [email protected] as I am not on the list. Thanks.
Quoted 5 lines · Taylor Carpenter
Quoted 2 lines · Richard Gooch
If you think the problem may be devfs-related, a good test is to try again with
CONFIG_DEVFS_FS=n.
Quoted 8 lines
I tried kernel 2.4.8 and also had an oops. An earlier kernel w/out devfs did not cause an oops. I plan on making a non-devfs 2.4.8 kernel to see if the oops does not happen.
Quoted 1 line
However, I run devfs, and I don't see this problem.
I do not know if the devfs info, in the oops (ksymoops output) data below indicates a problem w/devfs or not. Maybe you can tell?
Well, the following line suggests a devfs interaction (provided you are sure that you used the correct System.map:
Quoted 1 line
Trace;
c015469b<devfs_unregister_blkdev+12eb/1960>
Are you unloading the floppy driver at some point? Or using module autoloading?
Quoted 6 lines
After watching what happens during the boot process I started turning off things that might be touching the floppy device (at boot), such as autofs. What finally stopped the Oops was to comment out the floppy entry in
/etc/fstab:
/dev/fd0/floppy auto defaults,user,noauto 0 0
Interesting. What happens if you use /dev/floppy/0 instead of /dev/fd0 in the /etc/fstab? Still an Oops?
Quoted 8 lines
I can then load the floppy module after boot, and successfully access the floppy device w/o any problems. The oops happened when the mountall script (Debian testing) was running:
mount -avt nonfs,noproc,nosmbfs
Devfsd is started way before mountall is ran so I do not know why it is causing problems.
Strange. I tried the following sequence, without problems:
# devfsd /dev # mount /floppy # ls -lF /dev/floppy
where /etc/fstab has:/dev/floppy/0 /floppy ext2 defaults,noauto,user 0 0
I have nothing in my /etc/devfsd.conf which refers to the floppy. In addition, I don't have any LOOKUP entries. I did this with 2.4.9 with devfs-patch-v188.
Could you please try reproducing the problem with the setup and sequence I used?
Regards, Richard.... Permanent: [email protected] Current: [email protected]
Quoted 7 lines · Taylor Carpenter
Quoted 2 lines · Richard Gooch
If you think the problem may be devfs-related, a good test is to try again with
CONFIG_DEVFS_FS=n.I tried kernel 2.4.8 and also had an oops. An earlier kernel w/out devfs did not cause an oops. I plan on making a non-devfs 2.4.8 kernel to see if the oops does not happen.
I've noticed kernels 2.4.7, 2.4.8 and 2.4.9 can oops when modprobing floppy.o under certain circumstances (specifically I've noticed it when rc.sysinit does "/sbin/pam_console_apply -r",which appears to cause the floppy driver to be modprobed). There doesn't seem to be a problem if the floppydriver is compiled into the kernel instead of being modular.
NOTE: I'm testing these kernels on Cobalt kit, which doesn't have a floppy drive (and does some very odd things at the hardware/firmware side occasionally :). So I can't vouch for how this will affect "normal" hardware.
Signature · 5 lines
- Steve Hill System Administrator Email: [email protected] Navaho Technologies Ltd. Tel: +44-870-7034015 ... Alcohol and calculus don't mix - Don't drink and derive! ...
Quoted 2 lines
I've noticed kernels 2.4.7, 2.4.8 and 2.4.9 can oops when modprobing floppy.o under certain circumstances (specifically I've noticed it when
floppy.o crashes the box or prints bad things if there is no floppy controller. I've not yet had time to investigate
Quoted 5 lines · Alan Cox
Quoted 2 lines
I've noticed kernels 2.4.7, 2.4.8 and 2.4.9 can oops when modprobing floppy.o under certain circumstances (specifically I've noticed it when
floppy.o crashes the box or prints bad things if there is no floppy controller. I've not yet had time to investigate
Ok - it's no big problem, I just don't compile it as a module now (the kernel is used on both boxes with floppy and without, so it needs to be there, but I have no problem with compiling it into the kernel - it doesn't seem to break, just says "no floppy controller present" on the floppy-less boxes.)
Signature · 5 lines
- Steve Hill System Administrator Email: [email protected] Navaho Technologies Ltd. Tel: +44-870-7034015 ... Alcohol and calculus don't mix - Don't drink and derive! ...
Quoted 3 lines
there, but I have no problem with compiling it into the kernel - it doesn't seem to break, just says "no floppy controller present" on the floppy-less boxes.)
Timing dependant - sometimes you get no floppy controller, sometimes a crash and sometimes moans about things still being active
Quoted 5 lines · Richard Gooch
Quoted 1 line · Taylor Carpenter
Well, the following line suggests a devfs interaction (provided you are sure that you used the correct System.map:
Quoted 1 line
Trace;
c015469b<devfs_unregister_blkdev+12eb/1960>
I can check again, but I am fairly certain it was the correct System.map (I looked before and after when running ksymoops).
Quoted 2 lines
Are you unloading the floppy driver at some point? Or using module autoloading?
I am using module autoloading. It seems that right after the mountall script is called this happens.
Quoted 2 lines
Interesting. What happens if you use
/dev/floppy/0instead of/dev/fd0in the/etc/fstab? Still an Oops?
I will try that...
I did not get the oops, but I could not access the device until I manually loaded the floppy module (the /dev/fd0 was created as usual).
After booting w/the floppy module not loaded I can start and stop devfsd and load and unload the floppy module in any order w/o an oops. I only get the oops if the module is loaded during boot.
Also when I get the oops during boot, the floppy module is not loaded once the system is through booting and I login, but /dev/fd* are all there! With out the oops /dev/fd* is only there when I load the floppy module (and disappears as usual when I rmmod the module).
Quoted 4 lines
Strange. I tried the following sequence, without problems:
# devfsd /dev # mount /floppy # ls -lF /dev/floppy
I could not mount the floppy until I manually loaded the floppy module! This is after editing /etc/fstab as you said below.
Quoted 5 lines
where
/etc/fstabhas:/dev/floppy/0/floppy ext2 defaults,noauto,user 0 0I have nothing in my
/etc/devfsd.confwhich refers to the floppy.
I only reference floppy in my perms file.
Quoted 2 lines
In addition, I don't have any LOOKUP entries. I did this with 2.4.9 with devfs-patch-v188.
I have many LOOKUP entries. I did not have any specific to /dev/fd*, but that was caught by the .* LOOKUP entry. I commented that out, which is probably why mdir and other commands do not work w/o manually loading floppy.o.
Quoted 2 lines
Could you please try reproducing the problem with the setup and sequence I used?
I believe I followed your steps, and had no oops during boot w/the /etc/fstab change. I do not think that made the difference though. I think telling devfsd to not autoload floppy is what let me boot w/o oops. So I think there still is a problem w/loading the floppy module during boot.
Quoted 8 lines · Taylor Carpenter
Quoted 4 lines · Richard Gooch
Taylor Carpenter writes:
Trace;c015469b<devfs_unregister_blkdev+12eb/1960>
Are you unloading the floppy driver at some point? Or using module autoloading?I am using module autoloading. It seems that right after the mountall script is called this happens.
You mean the floppy module gets loaded as a result of the mountall script being run?
Quoted 7 lines
Quoted 2 lines
Interesting. What happens if you use
/dev/floppy/0instead of/dev/fd0in the/etc/fstab? Still an Oops?I will try that...
I did not get the oops, but I could not access the device until I manually loaded the floppy module (the
/dev/fd0was created as usual).
Is the /etc/modules.devfs the one that ships with devfsd? Specifically, you need the following line:
alias /dev/floppy floppy
and of course the MODLOAD action in /etc/devfsd.conf.
Quoted 8 lines
After booting w/the floppy module not loaded I can start and stop devfsd and load and unload the floppy module in any order w/o an oops. I only get the oops if the module is loaded during boot.
Also when I get the oops during boot, the floppy module is not loaded once the system is through booting and I login, but
/dev/fd*are all there! With out the oops/dev/fd*is only there when I load the floppy module (and disappears as usual when I rmmod the module).
Do you mean to say that the Oops happens during the boot sequence, before you can log in?
Quoted 7 lines
Quoted 4 lines
Strange. I tried the following sequence, without problems:
# devfsd /dev # mount /floppy # ls -lF /dev/floppyI could not mount the floppy until I manually loaded the floppy module! This is after editing
/etc/fstabas you said below.
You must have a bogus /etc/devfsd.conf or /etc/modules.devfs file for module autoloading not to work.
Quoted 6 lines
Quoted 4 lines
where
/etc/fstabhas:/dev/floppy/0/floppy ext2 defaults,noauto,user 0 0I have nothing in my
/etc/devfsd.confwhich refers to the floppy.I only reference floppy in my perms file.
I don't know what a "perms" file is. I know Debian uses some convoluted directory tree for devfsd configuration, but frankly, I don't want to know about that. If you have one of these monstrosities, please collapse them all into a single /etc/devfsd.conf file a report based on that.
Quoted 7 lines
Quoted 2 lines
In addition, I don't have any LOOKUP entries. I did this with 2.4.9 with devfs-patch-v188.
I have many LOOKUP entries. I did not have any specific to
/dev/fd*, but that was caught by the .* LOOKUP entry. I commented that out, which is probably why mdir and other commands do not work w/o manually loading floppy.o.
Oh! Well, duh!
Quoted 8 lines
Quoted 2 lines
Could you please try reproducing the problem with the setup and sequence I used?
I believe I followed your steps, and had no oops during boot w/the
/etc/fstabchange. I do not think that made the difference though. I think telling devfsd to not autoload floppy is what let me boot w/o oops. So I think there still is a problem w/loading the floppy module during boot.
Hm. Please try a virgin 2.4.9 kernel with CONFIG_DEVFS_FS=n and try again. I have this feeling that I'm chasing someone else's bug...
Regards, Richard.... Permanent: [email protected] Current: [email protected]
Quoted 4 lines · Richard Gooch
Quoted 1 line · Taylor Carpenter
You mean the floppy module gets loaded as a result of the mountall script being run?
As far as I can tell, when it runs mount -avt, the floppy module is loaded if there is an entry in /etc/fstab for /dev/fd0 (even w/the noauto option).
Quoted 3 lines
Is the
/etc/modules.devfsthe one that ships with devfsd? Specifically, you need the following line:
alias/dev/floppyfloppy
I do not have a modules.devfs. I do have a /etc/modutils/devfsd, but it does not have an alias entry for the floppy.
I added the entry, and it now shows up in modules.conf.
Quoted 1 line
and of course the MODLOAD action in
/etc/devfsd.conf.
I did not have anything specific to /dev/fd* in devfsd.conf, but I did have a .* entry to load it. I commented that out, after your other email.
I added /dev/fd0, and /dev/floppy MODLOAD but it is still not autoloading.
Quoted 2 lines
Do you mean to say that the Oops happens during the boot sequence, before you can log in?
Yes, the oops happens during boot when it runs the mountall script, and then right after when something else tries to access the device. I did not mention before, but devfsd will not run after I get this oops. Or I should say it dies, and then I can not run it again after logging in. I get an oops everytime I access the floppy device after this, but I only get an oops if I get one during boot.
Quoted 2 lines
You must have a bogus
/etc/devfsd.confor/etc/modules.devfsfile for module autoloading not to work.
I had commented out the .* MODLOAD, it worked before that. I uncommented the .* and it still does not work, something else must have changed.
Quoted 5 lines
I don't know what a "perms" file is. I know Debian uses some convoluted directory tree for devfsd configuration, but frankly, I don't want to know about that. If you have one of these monstrosities, please collapse them all into a single
/etc/devfsd.conffile a report based on that.
OK. I have nothing but REGISTER PERMISSIONS for floppy in devfsd.conf.
Quoted 6 lines
Quoted 4 lines
I have many LOOKUP entries. I did not have any specific to
/dev/fd*, but that was caught by the .* LOOKUP entry. I commented that out, which is probably why mdir and other commands do not work w/o manually loading floppy.o.Oh! Well, duh!
I uncommented .* LOOKUP and it still did not autoload.
Quoted 2 lines
Hm. Please try a virgin 2.4.9 kernel with
CONFIG_DEVFS_FS=nand try again. I have this feeling that I'm chasing someone else's bug...
OK, done. I did not get the oops with DEVFS turned off (in 2.4.9).
Quoted 10 lines · Taylor Carpenter
Quoted 4 lines · Richard Gooch
Quoted 1 line · Taylor Carpenter
You mean the floppy module gets loaded as a result of the mountall script being run?
As far as I can tell, when it runs mount -avt, the floppy module is loaded if there is an entry in
/etc/fstabfor/dev/fd0(even w/the noauto option).
Quoted 6 lines
Quoted 3 lines
Is the
/etc/modules.devfsthe one that ships with devfsd? Specifically, you need the following line:
alias/dev/floppyfloppyI do not have a modules.devfs. I do have a
/etc/modutils/devfsd, but it does not have an alias entry for the floppy.
What the hell is /etc/modutils/devfsd? More Debian tricks?
[...]
Quoted 6 lines
Quoted 2 lines
You must have a bogus
/etc/devfsd.confor/etc/modules.devfsfile for module autoloading not to work.I had commented out the .* MODLOAD, it worked before that. I uncommented the .* and it still does not work, something else must have changed.
Quoted 7 lines
Quoted 5 lines
I don't know what a "perms" file is. I know Debian uses some convoluted directory tree for devfsd configuration, but frankly, I don't want to know about that. If you have one of these monstrosities, please collapse them all into a single
/etc/devfsd.conffile a report based on that.OK. I have nothing but REGISTER PERMISSIONS for floppy in devfsd.conf.
Argh! Let me spell it out: I want you to collapse all devfsd configuration files into a single file, and throw the stuff in directories away. And I also want you to do the same for modutils configuration files. I don't want you to edit out stuff that you think isn't relevant. I want the whole bloody lot so I can see the context.
Once you've stripped down the configuration to something simple, check if the Oops still happens. If so, decode it with ksymoops and send it. Hm. And also send the complete output of dmesg. No editing.
Quoted 4 lines
Quoted 2 lines
Hm. Please try a virgin 2.4.9 kernel with
CONFIG_DEVFS_FS=nand try again. I have this feeling that I'm chasing someone else's bug...OK, done. I did not get the oops with DEVFS turned off (in 2.4.9).
Interesting. But I need those collapsed files. I have no desire to figure out the subtle effects that can be generated by Debian's configuration system.
Regards, Richard.... Permanent: [email protected] Current: [email protected]