Bug 344 - qemu command is often locked recently because tap0 still exists after successfully shutdown
Summary: qemu command is often locked recently because tap0 still exists after success...
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 0.9
Hardware: x86 Multiple
: High major
Target Milestone: 0.9 M4
Assignee: Scott Garman
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2010-09-20 19:57 UTC by liping Ke
Modified: 2010-12-28 23:24 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified: Program Management
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description liping Ke 2010-09-20 19:57:28 UTC
After I shutdown a qemu (ppc, for example), everything is fine.
But if I restart a new qemu, the command is locked. I checked that tap0 is still there. If I ctl+c, it will use another ipaddress and go on.

But if I tried ty poky-qemu-ifdown tap0, it will say 
TUNSETIFF: Device or resource buzy.

It's very annoying... Since I have to restart the machine to get a cleaner environment. Anybody know how to solve this problem?

Thanks & Regards,
criping
Comment 1 Jessica 2010-09-20 20:02:41 UTC
fall into general bucket as qemu scripts consolidation and clean up, one more use case to test against
Comment 2 Dongxiao Xu 2010-09-20 20:03:29 UTC
manually kill the qemu process by "kill pid" can solve the problem. 

This bug is similar as BUG 294.
Comment 3 liping Ke 2010-09-20 20:06:30 UTC
O, kill pid does not work well.
I kill all qemu related, still does not work. Since I can't pulldown tap0...
Comment 4 Jessica 2010-09-20 20:08:31 UTC
The ideal behavior should be we have a tap dev pool, if user quit qemu, the associated tap device should be freed and next time a new qemu is running, it'll try to associate with the next available tap device if non available, the qemu script will exit will errors no available tap device.  So the key issue that Scott needs to work on is to cleanly disassociate qemu with tap when exit qemu.
Comment 5 Scott Garman 2010-10-07 14:18:25 UTC
This was fixed in the refactoring leading up to commit 0f973ed66551cdd1112ee9df42df5603835b8384. poky-qemu is now the only script for running qemu instances.
Comment 6 Scott Garman 2010-12-13 08:39:59 UTC
Verified 2010-12-13