[vortex] can't unload module

Andrew Morton andrewm@uow.edu.au
Fri, 22 Sep 2000 23:36:30 +1100


[ added netdev ]

David Fries wrote:
> 
> I don't know if it is a motherboard/network card combination, but I
> see networking going down the tube with nfs traffic the first to show
> things slowing down.  Sometimes networking completely stops and
> without any error message.
> 
> In previous kernels I just did ifconfig eth0 down, rmmod 3c59x, insmod
> 3c59x, ifconfig ... and it was back to normal.

This is unfamiliar and it does sound like a driver problem.  Does it do
this under kernel 2.2?

Could you please do some further investigation?  Try increasing the
driver debug level, look at the `ifconfig' output and /proc/interrupts
when it's happening, etc?  Thanks.

> Now I booted the 2.4.0-test9 pre4 kernel ( the test8 did it also, but
> I think I could unload under test7).  This is with a 3c509B network
> card.
> 
> With 2.4.0-test9 it gives me,
> 
> unregister_netdevice: waiting for eth0 to become free.  Usage count =
> 2
> 
> and that keeps scrolling on the screen.

And does it continue to do this for more than thirty seconds?

If so, then someone may be leaking some skbuffs.

Is this an NFS server or a client?

What NFS mount options are you using (specifically, rsize and wsize)?

I've just tried an ifdown/rmmod in the middle of heavy NFS client
traffic and everything seems to hang together, although the application
which is using NFS gets errors when the interface is brought back up.  
(Is NFS client supposed to be able to recover from a local interface
outage??)

Are you able to provide a set of steps with which others can reproduce
this?

Are you running SMP?  I assume not, because if you were, your kernel
would have locked up good and tight.

Alexey, Dave: that wait-for-ever crap which went into
unregister_netdevice() happens under the lock_kernel() in
sys_delete_module()!  This means that the kernel lock will be held until
all the frags expire.  Ugly.  Is sys_delete_module() the only user of
unregister_netdevice who can get bitten by this?

> If I run ifconfig it hangs, doing strace ifconfig shows it hangs on
> the ioctl ( SIOCGIFCONF) call.

Possibly the rtnetlink semaphore. Not sure.

> /proc/net/dev does not list an eth0 device
> /proc/modules lists 3c59x 21992  0 (deleted)

OK, you're not using SMP :)

> I need the latest kernel or usb crashes, but if networking goes down
> I'm SOL, time to reboot which is just as annoying.
> 
> I'm open to suggestions.

David, it would be useful if you could play with this or an hour or so
and characterise it a bit more.  It sounds nicely reproducible, which is
good.  But how do I reproduce it here?