Re: Bad interaction dosemu - kerneld?

Eric W. Biederman (ebiederm@cse.unl.edu)
19 Dec 1996 19:17:04 -0600


>>>>> "Romano" == Romano Giannetti <romano@iet.unipi.it> writes:

Romano> Hi all!

Romano> I have a little problem with the new dosemu (or the new kernel,
Romano> I do not know). I have a kernel 2.0.27, partly modularized; I have the
Romano> floppy module autoloaded by kerneld on request (kerneld from
Romano> modules-2.0.0). Well, it all works well if I do a mdir a: from the shell:
Romano> floppy.o got loaded and all is working, and after sometime kerneld
Romano> unloads correctly the module.

Romano> If tthe module is not loaded and I do a dir a: form the xdos windows,
Romano> the following happens:

Romano> DOS says: (translated from italian :-)

Romano> Sector not found reading unit A:
Romano> Cancel, Retry, Tr... ? <- what does a english dos ask?
Abort, Retry, Fail

Romano> DOSEMU says:

Romano> SYSCALL ERROR: 19, *No such device* in file disks.c, line 581: expr=
Romano> open(dp->dev_name, dp->wantrdonly ? O_RDONLY : O_RDWR, 0)
Romano> DISK: closed disk
Romano> ERROR: Sector not found 1!

Romano> about ten times, and kernel complain :

Romano> Dec 19 16:01:10 sirio insmod: A module named floppy already exists
Romano> Dec 19 16:01:10 sirio kernel: inserting floppy driver for 2.0.27
Romano> Dec 19 16:01:10 sirio kernel: Floppy drive(s): fd0 is 1.44M
Romano> Dec 19 16:01:10 sirio kernel: FDC 0 is an 8272A
Romano> Dec 19 16:01:10 sirio insmod: A module named floppy already exists
Romano> Dec 19 16:01:12 sirio last message repeated 11 times

Romano> Saying R)etry to the dos dir command it now run correctly.

I have only caused this by saying R)etry multiple times at the dos
prompt. And the usual solution is after the first message wait a
moment or two for the module to load.

This is caused, it seems, by a rough spot in the kernel<->kerneld
interface. The kernel appears to service the synchronouse read
request asynchronously so it doesn't block while kerneld is loading
the module. And kerneld isn't smart enough to stop multiple load of
the same module, happening.

But don't expect this to get ironed out for until sometime in 2.1.xx
as it doesn't cause stability problems, just error messages. Is
someone considering this?

It looks like you said it about 11 times :) This is a
bug/race in kerneld. And possibly in the kernel as well. It would be
nice if the interface to kerneld worked better when a synchronous
request was being serviced asynchronously by the kernel.

Romano> Now sometime I have a lot of zombie modprobe, sons of kerneld, but
Romano> kerneld seems to work (well, sometime it does not unload the floppy
Romano> module, but it loads other needed modules).

The only true bug that I have observed with this setup is that with
once I got it two load the floppy module twice. One of which stuck in
the intializing state. If you don't see that with lsmod I wouldn't
worry.

Eric