2006-11-03 18:17:17

by Roland

[permalink] [raw]
Subject: unregister_netdevice: waiting for eth0 to become free

hi list,

I have come across a problem on a SLES8 (2.4 kernel based) system today.

getting "unregister_netdevice: waiting for eth0 to become free" on shutdown
and the shutdown got stuck at this point. needed to do a hard reset to
continue.

by some search via google/vmware-forum i found a hint very soon (this was
for RedHat, but also worked with SLES)

------------------------------------------------
In many Linux distributions, if IPv6 is enabled, VMware Tools cannot be
configured with vmware-config-tools.pl after installation. In this case,
VMware Tools is unable to set the network device correctly for the virtual
machine, and displays a message similar to
Unloading pcnet32 module
unregister_netdevice: waiting for eth0 to become free
This message repeats continuously until you reboot the virtual machine. To
prevent this problem in virtual machines running Linux, disable IPv6 before
installing VMware Tools.
To disable IPv6 in a virtual machine running Linux:
1 If the file /etc/sysconfig/network contains the line NETWORKING_IPV6=yes,
change the line to NETWORKING_IPV6=no.

2 In the file /etc/modules.conf, add the following lines:
alias ipv6 off
alias net-pf-10 off

After you disable IPv6, you should be able to install and configure VMware
Tools successfully.
------------------------------------------------

this solved my shutdown problem. (network driver wasn`t pcnet32 but vmxnet
, which is a vmware specific network device)

anyway - i wondered about this "waiting to become free".
this is just a workaround, not a solution.
what if i needed to use ipv6 ?

before i disabled ipv6 (as it is being recommended) , i tried some manual
steps to disable ipv6, but failed.

don`t have the sles8 here at home, but trying to disable ipv6 "manually" on
a newer system gives a similar error:

vserver1:~ # rmmod ipv6
ERROR: Module ipv6 is in use by ip6t_REJECT
vserver1:~ # rmmod ip6t_REJECT
ERROR: Module ip6t_REJECT is in use

ok - rmmod telling me, that ip6t_REJECT is in use.

but - what/who is using it ?

i disabled all network services for which lsof had shown that they had an
ipv6 socket open, i also did "ifconfig sit0 down", which seems to be a ipv6
related network device, but still having ip6t_REJECT in use.

now my questions:

- how can i determine what "component" (i.e. one of userspace app, device,
kernel-thread....whatever) is using a module, so i`m able to unload that
module ?
- is there sort of "lsof" for kernel modules ?
- what is causing the unregister_netdevice to fail ? is it an older bug
which has been resolved in later kernels ?

i`m quite sure, that i have seen this issue in the past, more then once and
not related to vmware.
so, this is why i`m reporting it here and asking for help

regards
roland


2006-11-03 18:44:38

by YOSHIFUJI Hideaki

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

In article <01a501c6ff74$6fc52c80$962e8d52@aldipc> (at Fri, 3 Nov 2006 19:18:17 +0100), "roland" <[email protected]> says:

> vserver1:~ # rmmod ipv6
> ERROR: Module ipv6 is in use by ip6t_REJECT
> vserver1:~ # rmmod ip6t_REJECT
> ERROR: Module ip6t_REJECT is in use

The ipv6 module cannot be unloaded once it has been
loaded.

I'm not sure what is happened with vmware.

--yoshfuji

2006-11-03 19:55:12

by Roland

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

> The ipv6 module cannot be unloaded once it has been
> loaded.

sorry, i thought i could rmmod evey module which was insmod/modprobe'd
before and i didn`t know that there are exceptions

> I'm not sure what is happened with vmware.

i think this is not completely related to vmware - but maybe this is being
triggered more often by vmware ?
http://www.google.de/search?hl=de&q=%22unregister_netdevice%3A+waiting+for+eth0+to+become+free

it`s really strange, but after taking a look, vmware seems to recommend
disabling ipv6 for _every_ linux based guest OS in general:
http://pubs.vmware.com/guestnotes/wwhelp/wwhimpl/common/html/wwhelp.htm?context=gos_ww5_output&file=choose_install_guest_os.html

since there are already running millions of linux based VMs in this world,
i think this isn`t very good "promotion" for ipv6, if vmware recommending
disabling it.
ok, there are not that much people already needing ipv6 NOW, but the later
they are running it and the later outstanding bugs being fixed, the harder
it will be to convert from ipv4 to ipv6....

roland



----- Original Message -----
From: "YOSHIFUJI Hideaki / ????" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>; <[email protected]>;
<[email protected]>
Sent: Friday, November 03, 2006 7:47 PM
Subject: Re: unregister_netdevice: waiting for eth0 to become free


> In article <01a501c6ff74$6fc52c80$962e8d52@aldipc> (at Fri, 3 Nov 2006
> 19:18:17 +0100), "roland" <[email protected]> says:
>
>> vserver1:~ # rmmod ipv6
>> ERROR: Module ipv6 is in use by ip6t_REJECT
>> vserver1:~ # rmmod ip6t_REJECT
>> ERROR: Module ip6t_REJECT is in use
>
> The ipv6 module cannot be unloaded once it has been
> loaded.
>
> I'm not sure what is happened with vmware.
>
> --yoshfuji

2006-11-03 19:58:38

by Stephen Hemminger

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

On Fri, 3 Nov 2006 20:53:09 +0100
"roland" <[email protected]> wrote:

> > The ipv6 module cannot be unloaded once it has been
> > loaded.
>
> sorry, i thought i could rmmod evey module which was insmod/modprobe'd
> before and i didn`t know that there are exceptions
>
> > I'm not sure what is happened with vmware.
>
> i think this is not completely related to vmware - but maybe this is being
> triggered more often by vmware ?
> http://www.google.de/search?hl=de&q=%22unregister_netdevice%3A+waiting+for+eth0+to+become+free
>
> it`s really strange, but after taking a look, vmware seems to recommend
> disabling ipv6 for _every_ linux based guest OS in general:
> http://pubs.vmware.com/guestnotes/wwhelp/wwhimpl/common/html/wwhelp.htm?context=gos_ww5_output&file=choose_install_guest_os.html
>
> since there are already running millions of linux based VMs in this world,
> i think this isn`t very good "promotion" for ipv6, if vmware recommending
> disabling it.
> ok, there are not that much people already needing ipv6 NOW, but the later
> they are running it and the later outstanding bugs being fixed, the harder
> it will be to convert from ipv4 to ipv6....
>
> roland
>
>

Vmware has there own pseudo ethernet device and unless you have the source for it.
It would be hard to tell if it correctly manages itself.


--
Stephen Hemminger <[email protected]>

2006-11-03 20:10:46

by YOSHIFUJI Hideaki

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

In article <01d001c6ff81$b4bb5dc0$962e8d52@aldipc> (at Fri, 3 Nov 2006 20:53:09 +0100), "roland" <[email protected]> says:

> > I'm not sure what is happened with vmware.
>
> i think this is not completely related to vmware - but maybe this is being
> triggered more often by vmware ?
> http://www.google.de/search?hl=de&q=%22unregister_netdevice%3A+waiting+for+eth0+to+become+free

I think all except for vmware related ones seem ancient
reports and I believe we have fixed them.

--yoshfuji

2006-11-03 20:31:07

by Roland

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

>Vmware has there own pseudo ethernet device and unless you have the source for it.
>It would be hard to tell if it correctly manages itself.

VMware is able to emulate three different network card types:

- AMD Am79C970A - PCnet LANCE PCI Ethernet Controller (linux pcnet32 driver)
- Intel E1000 (e1000 driver)
- VMXNET - VMware PCI Ethernet Adapter (vmxnet, vmware`s own driver)

so there are 3 different drivers being used inside the guest OS for networking virtual machines.

rumours tell, that the vmxnet driver is sort of a mess, but i have seen the unregister_netdevice problem with pcnet32 AND with vmxnet - and all of the vmware readme`s are telling:

"In many Linux distributions, if IPv6 is enabled, VMware Tools cannot be configured with vmware-config-tools.pl after installation. In this case, VMware Tools is unable to set the network device correctly for the virtual machine, and displays a message similar to
Unloading pcnet32 module
unregister_netdevice: waiting for eth0 to become free"

so - this is the native linux driver for pcnet32 which fails get unloaded _before_ the driver being replaced by the vmware specific one and the virtual nic being switched to the VMXNET adapter.....

anyway - i got that problem while shutting down a VM, not while installing vmware tools.

btw - just came across this posting from jesper juhl:
http://marc.theaimsgroup.com/?l=linux-kernel&m=115703768804826&w=2

roland




> -----Urspr?ngliche Nachricht-----
> Von: Stephen Hemminger <[email protected]>
> Gesendet: 03.11.06 20:57:54
> An: "roland" <[email protected]>
> CC: <[email protected]>, <[email protected]>, <[email protected]>
> Betreff: Re: unregister_netdevice: waiting for eth0 to become free


> On Fri, 3 Nov 2006 20:53:09 +0100
> "roland" <[email protected]> wrote:
>
> > > The ipv6 module cannot be unloaded once it has been
> > > loaded.
> >
> > sorry, i thought i could rmmod evey module which was insmod/modprobe'd
> > before and i didn`t know that there are exceptions
> >
> > > I'm not sure what is happened with vmware.
> >
> > i think this is not completely related to vmware - but maybe this is being
> > triggered more often by vmware ?
> > http://www.google.de/search?hl=de&q=%22unregister_netdevice%3A+waiting+for+eth0+to+become+free
> >
> > it`s really strange, but after taking a look, vmware seems to recommend
> > disabling ipv6 for _every_ linux based guest OS in general:
> > http://pubs.vmware.com/guestnotes/wwhelp/wwhimpl/common/html/wwhelp.htm?context=gos_ww5_output&file=choose_install_guest_os.html
> >
> > since there are already running millions of linux based VMs in this world,
> > i think this isn`t very good "promotion" for ipv6, if vmware recommending
> > disabling it.
> > ok, there are not that much people already needing ipv6 NOW, but the later
> > they are running it and the later outstanding bugs being fixed, the harder
> > it will be to convert from ipv4 to ipv6....
> >
> > roland
> >
> >
>
> Vmware has there own pseudo ethernet device and unless you have the source for it.
> It would be hard to tell if it correctly manages itself.
>
>
> --
> Stephen Hemminger <[email protected]>


______________________________________________________________________
XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club!
Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130

2006-11-03 21:04:57

by Stephen Hemminger

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

On Fri, 03 Nov 2006 21:31:01 +0100
[email protected] wrote:

> >Vmware has there own pseudo ethernet device and unless you have the source for it.
> >It would be hard to tell if it correctly manages itself.
>
> VMware is able to emulate three different network card types:
>
> - AMD Am79C970A - PCnet LANCE PCI Ethernet Controller (linux pcnet32 driver)
> - Intel E1000 (e1000 driver)
> - VMXNET - VMware PCI Ethernet Adapter (vmxnet, vmware`s own driver)
>
> so there are 3 different drivers being used inside the guest OS for networking virtual machines.
>
> rumours tell, that the vmxnet driver is sort of a mess, but i have seen the unregister_netdevice problem with pcnet32 AND with vmxnet - and all of the vmware readme`s are telling:
>
> "In many Linux distributions, if IPv6 is enabled, VMware Tools cannot be configured with vmware-config-tools.pl after installation. In this case, VMware Tools is unable to set the network device correctly for the virtual machine, and displays a message similar to
> Unloading pcnet32 module
> unregister_netdevice: waiting for eth0 to become free"
>
> so - this is the native linux driver for pcnet32 which fails get unloaded _before_ the driver being replaced by the vmware specific one and the virtual nic being switched to the VMXNET adapter.....
>
> anyway - i got that problem while shutting down a VM, not while installing vmware tools.
>
> btw - just came across this posting from jesper juhl:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=115703768804826&w=2
>
> roland

You are also looking at 2.4 code which is OLD and probably broken in the
device ref counting. Lots of work went into cleaning up the shutdown and device
ref counting for 2.6, and I'm not surprised if 2.4 has problems.

2006-11-03 21:42:07

by Roland

[permalink] [raw]
Subject: Re: unregister_netdevice: waiting for eth0 to become free

>You are also looking at 2.4 code which is OLD and probably broken in the
>device ref counting. Lots of work went into cleaning up the shutdown and
>device
>ref counting for 2.6, and I'm not surprised if 2.4 has problems.

thanks. from what i found on different postings, it seems that this issue
really has been adressed several times.
have seen it for 2.6 kernels though, vmware still recommending disabling
ipv6 for suse 10.1 , but maybe this is just for "historical reason".
furthermore jesper reported it for 2.6.18, but maybe that the problem now
happens under very rare circumstances.
probably worth mentioning here, that two probably related bugs are in "not
resolved" state at:
http://bugzilla.kernel.org/show_bug.cgi?id=6698 and
http://bugzilla.kernel.org/show_bug.cgi?id=6197

i will keep an eye on our systems and report if i can see this on any more
recent kernels.

thanks for your help!

roland

----- Original Message -----
From: "Stephen Hemminger" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>; <[email protected]>;
<[email protected]>; <[email protected]>;
<[email protected]>
Sent: Friday, November 03, 2006 10:04 PM
Subject: Re: unregister_netdevice: waiting for eth0 to become free


> On Fri, 03 Nov 2006 21:31:01 +0100
> [email protected] wrote:
>
>> >Vmware has there own pseudo ethernet device and unless you have the
>> >source for it.
>> >It would be hard to tell if it correctly manages itself.
>>
>> VMware is able to emulate three different network card types:
>>
>> - AMD Am79C970A - PCnet LANCE PCI Ethernet Controller (linux pcnet32
>> driver)
>> - Intel E1000 (e1000 driver)
>> - VMXNET - VMware PCI Ethernet Adapter (vmxnet, vmware`s own driver)
>>
>> so there are 3 different drivers being used inside the guest OS for
>> networking virtual machines.
>>
>> rumours tell, that the vmxnet driver is sort of a mess, but i have seen
>> the unregister_netdevice problem with pcnet32 AND with vmxnet - and all
>> of the vmware readme`s are telling:
>>
>> "In many Linux distributions, if IPv6 is enabled, VMware Tools cannot be
>> configured with vmware-config-tools.pl after installation. In this case,
>> VMware Tools is unable to set the network device correctly for the
>> virtual machine, and displays a message similar to
>> Unloading pcnet32 module
>> unregister_netdevice: waiting for eth0 to become free"
>>
>> so - this is the native linux driver for pcnet32 which fails get unloaded
>> _before_ the driver being replaced by the vmware specific one and the
>> virtual nic being switched to the VMXNET adapter.....
>>
>> anyway - i got that problem while shutting down a VM, not while
>> installing vmware tools.
>>
>> btw - just came across this posting from jesper juhl:
>> http://marc.theaimsgroup.com/?l=linux-kernel&m=115703768804826&w=2
>>
>> roland
>
> You are also looking at 2.4 code which is OLD and probably broken in the
> device ref counting. Lots of work went into cleaning up the shutdown and
> device
> ref counting for 2.6, and I'm not surprised if 2.4 has problems.