Hi all,

Sometimes following error occurs in an UML when enabling the ethernet
device:

uml:~ # ifconfig eth0 up
SIOCSIFFLAGS: Device or resource busy

This happens when logging in to the uml via a telnet port. The problem
is that in this case the /dev/net/tun device remains attached to 3
proceses on the host:

host:~ # lsof /dev/net/tun
COMMAND    PID    USER   FD   TYPE DEVICE SIZE NODE NAME
in.telnet 7971 hillenr   24u   CHR 10,200      4874 /dev/net/tun
port-help 7972 hillenr   24u   CHR 10,200      4874 /dev/net/tun
linux     7974 hillenr   24u   CHR 10,200      4874 /dev/net/tun

When exiting the telnet session, these 3 processes are terminated and
"ifconfig eth0 up" on the uml works again.

Following is the complete scenario on how this problem can be
reproduced:

- After start of an uml instance, a number of processes are attached to
the /dev/net/tun device on the host:

host:~ # lsof /dev/net/tun
COMMAND  PID    USER   FD   TYPE DEVICE SIZE NODE NAME
linux   7621 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux   7627 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux   7628 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux   7629 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux   7630 hillenr   27u   CHR 10,200      4874 /dev/net/tun

- Now telnet to the uml port and log on. 3 additional processes are
created on the host, each attached to /dev/net/tun:

host:~ # lsof /dev/net/tun
COMMAND    PID    USER   FD   TYPE DEVICE SIZE NODE NAME
linux     7621 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     7627 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     7628 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     7629 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     7630 hillenr   27u   CHR 10,200      4874 /dev/net/tun
in.telnet 8496 hillenr   27u   CHR 10,200      4874 /dev/net/tun
port-help 8497 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     8499 hillenr   27u   CHR 10,200      4874 /dev/net/tun

- On the uml, take down eth0 with "ifconfig eth0 down". All uml
processes are now detached from /dev/net/tun, except the ones related to
the telnet session:

host:~ # lsof /dev/net/tun
COMMAND    PID    USER   FD   TYPE DEVICE SIZE NODE NAME
in.telnet 8496 hillenr   27u   CHR 10,200      4874 /dev/net/tun
port-help 8497 hillenr   27u   CHR 10,200      4874 /dev/net/tun
linux     8499 hillenr   27u   CHR 10,200      4874 /dev/net/tun

Now as long as the telnet session remains open, the status of eth0 can
not be manipulated anymore because of "device or recource busy".

I'm not sure if this is a bug on how the /dev/net/tun device is attached
to the various uml processes or if this is expected behaviour somehow.
Any ideas?


Thanks,

Robert



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to