Skip to contentSkip to conversation

QEmu Script Error Checking

DISCUSSION Jack Mitchell 4 participants 7 messages Oct 11, 2011 – Oct 13, 2011

lore
Share & tools
lore
#0 lore raw

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Cheers,
Jack.

#1 lore raw
Quoted 9 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

run-qemu-internal shows errors in that log. Did you try to figure out why these errors are spewing.

Quoted 7 lines

Cheers,
Jack.
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#2 lore raw
In reply to Jack Mitchell
Quoted 8 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Hi Jack,

Since qemu is being run from a parent shell script (runqemu), if qemu were to crash, I would think the parent shell script would continue on and destroy the tap device normally. Might you be killing the runqemu process instead of qemu itself?

I'm not sure if there is a way we could reliably force a cleanup of tap devices when runqemu starts, because we need to support the case where multiple instances of qemu sessions are running simultaneously (each with their own tap device). Off the top of my head I think this would make the state of tap devices non-deterministic.

Furthermore, we support a mode where an administrator can set up one or more tap devices, allowing the runqemu user to not need sudo privileges. So checking for the case where a tap device exists but no qemu process is running wouldn't work.

Scott

Signature · 3 lines
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center
#3 lore raw
Quoted 12 lines · Scott Garman
Quoted 8 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Hi Jack,

Quoted 8 lines

Since qemu is being run from a parent shell script (runqemu), if qemu were to crash, I would think the parent shell script would continue on and destroy the tap device normally. Might you be killing the runqemu process instead of qemu itself?

I'm not sure if there is a way we could reliably force a cleanup of tap devices when runqemu starts, because we need to support the case where multiple instances of qemu sessions are running simultaneously (each with their own tap device). Off the top of my head I think this would make the state of tap devices non-deterministic.

Furthermore, we support a mode where an administrator can set up one or more tap devices, allowing the runqemu user to not need sudo privileges. So checking for the case where a tap device exists but no qemu process is running wouldn't work.

Scott

Ok, thank you for the information Scott. I think I found the issue today which is causing the QEmu script to terminate pre-maturely.

I am using the eclipse-poky master branch as my eclipse plugin and it threw an error today when I tried to debug - which coincided with the QEmu and terminal window terminating. The errror I recieved was:

!SESSION 2011-10-12 09:22:49.135 ----------------------------------------------- eclipse.buildId=I20110613-1736
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data /home/developer/jackdaw/../runtime-EclipseApplication -dev file:/home/developer/jackdaw/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.cdt.debug.mi.core 4 42 2011-10-12 09:24:47.192
!MESSAGE Internal Error
!STACK 0
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: Inferior terminated[]
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.getMIShareds(SharedLibraryManager.java:123)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.updateState(SharedLibraryManager.java:188)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.update(SharedLibraryManager.java:136)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.processSuspendedEvent(EventManager.java:326)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.update(EventManager.java:100)
at java.util.Observable.notifyObservers(Observable.java:159)
at
org.eclipse.cdt.debug.mi.core.MISession.notifyObservers(MISession.java:791)
at org.eclipse.cdt.debug.mi.core.EventThread.run(EventThread.java:46)

Which looks like a CDT bug or the interfacing with CDT. I could file a bug report if you think it is related to the poky-eclipse plugin?

Cheers,
Jack.

#4 lore raw

Hi Jack,

When and how did you trigger the error. It looks more like a CDT issue than a Yocto issue, but can you tell us more what exactly you were doing with Yocto plug-in while this crash happened? So you mean when you click on the debug, it caused qemu crashes? Or the qemu crashed 1st. then you got the eclipse error msg.

Thanks,
Jessica

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jack Mitchell
Sent: Wednesday, October 12, 2011 3:12 AM
To: [email protected]
Subject: Re: [yocto] QEmu Script Error Checking

Quoted 23 lines · Scott Garman
Quoted 8 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Hi Jack,

Since qemu is being run from a parent shell script (runqemu), if qemu were to crash, I would think the parent shell script would continue on and destroy the tap device normally. Might you be killing the runqemu process instead of qemu itself?

I'm not sure if there is a way we could reliably force a cleanup of tap devices when runqemu starts, because we need to support the case where multiple instances of qemu sessions are running simultaneously (each with their own tap device). Off the top of my head I think this would make the state of tap devices non-deterministic.

Quoted 7 lines

Furthermore, we support a mode where an administrator can set up one or more tap devices, allowing the runqemu user to not need sudo privileges. So checking for the case where a tap device exists but no qemu process is running wouldn't work.

Scott

Ok, thank you for the information Scott. I think I found the issue today which is causing the QEmu script to terminate pre-maturely.

I am using the eclipse-poky master branch as my eclipse plugin and it threw an error today when I tried to debug - which coincided with the QEmu and terminal window terminating. The errror I recieved was:

!SESSION 2011-10-12 09:22:49.135
-----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data

/home/developer/jackdaw/../runtime-EclipseApplication -dev file:/home/developer/jackdaw/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.cdt.debug.mi.core 4 42 2011-10-12 09:24:47.192
!MESSAGE Internal Error
!STACK 0
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: Inferior terminated[]
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.getMIShareds(SharedLibraryManager.java:123)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.updateState(SharedLibraryManager.java:188)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.update(SharedLibraryManager.java:136)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.processSuspendedEvent(EventManager.java:326)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.update(EventManager.java:100)
at java.util.Observable.notifyObservers(Observable.java:159)
at
org.eclipse.cdt.debug.mi.core.MISession.notifyObservers(MISession.java:791)
at org.eclipse.cdt.debug.mi.core.EventThread.run(EventThread.java:46)

Which looks like a CDT bug or the interfacing with CDT. I could file a bug report if you think it is related to the poky-eclipse plugin?

Cheers,
Jack.
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

#5 lore raw
Quoted 84 lines · Jessica

Hi Jack,

When and how did you trigger the error. It looks more like a CDT issue than a Yocto issue, but can you tell us more what exactly you were doing with Yocto plug-in while this crash happened? So you mean when you click on the debug, it caused qemu crashes? Or the qemu crashed 1st. then you got the eclipse error msg.

Thanks,
Jessica

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jack Mitchell
Sent: Wednesday, October 12, 2011 3:12 AM
To: [email protected]
Subject: Re: [yocto] QEmu Script Error Checking

Quoted 22 lines · Scott Garman
Quoted 8 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Hi Jack,

Since qemu is being run from a parent shell script (runqemu), if qemu were to crash, I would think the parent shell script would continue on and destroy the tap device normally. Might you be killing the runqemu process instead of qemu itself?

I'm not sure if there is a way we could reliably force a cleanup of tap devices when runqemu starts, because we need to support the case where multiple instances of qemu sessions are running simultaneously (each with their own tap device). Off the top of my head I think this would make the state of tap devices non-deterministic.

Quoted 7 lines

Furthermore, we support a mode where an administrator can set up one or more tap devices, allowing the runqemu user to not need sudo privileges. So checking for the case where a tap device exists but no qemu process is running wouldn't work.

Scott

Ok, thank you for the information Scott. I think I found the issue today which is causing the QEmu script to terminate pre-maturely.

I am using the eclipse-poky master branch as my eclipse plugin and it threw an error today when I tried to debug - which coincided with the QEmu and terminal window terminating. The errror I recieved was:

!SESSION 2011-10-12 09:22:49.135
-----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data

/home/developer/jackdaw/../runtime-EclipseApplication -dev file:/home/developer/jackdaw/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.cdt.debug.mi.core 4 42 2011-10-12 09:24:47.192
!MESSAGE Internal Error
!STACK 0
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: Inferior terminated[]
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.getMIShareds(SharedLibraryManager.java:123)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.updateState(SharedLibraryManager.java:188)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.update(SharedLibraryManager.java:136)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.processSuspendedEvent(EventManager.java:326)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.update(EventManager.java:100)
at java.util.Observable.notifyObservers(Observable.java:159)
at
org.eclipse.cdt.debug.mi.core.MISession.notifyObservers(MISession.java:791)
at org.eclipse.cdt.debug.mi.core.EventThread.run(EventThread.java:46)

Which looks like a CDT bug or the interfacing with CDT. I could file a bug report if you think it is related to the poky-eclipse plugin?

Quoted 6 lines

Cheers,
Jack.
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Jessica,

I have attached another error log which seems to be more verbose when I had this issue earlier today. Some of the errors seem to propogate from my code but there are also some CDT errors in there. The log is located here: http://pastebin.com/JHuE838B

Regards,
Jack

#6 lore raw

Hi Jack,

What is your target architecture? There's a known issue (bug 1489) that tcf-agent may segfault on qemux86, but it's never caused the whole qemu to crash. One way to work around your issue is before your do the remote debugging, can you bring up a terminal in qemu to make sure the tcf-agent is up and running, if it's not, you can manually bring it up then do the remote debug.

Thanks,
Jessica

-----Original Message-----
From: Jack Mitchell [mailto:[email protected]]
Sent: Thursday, October 13, 2011 5:39 AM
To: Zhang, Jessica
Cc: [email protected]
Subject: Re: [yocto] QEmu Script Error Checking

Quoted 84 lines · Jessica

Hi Jack,

When and how did you trigger the error. It looks more like a CDT issue than a Yocto issue, but can you tell us more what exactly you were doing with Yocto plug-in while this crash happened? So you mean when you click on the debug, it caused qemu crashes? Or the qemu crashed 1st. then you got the eclipse error msg.

Thanks,
Jessica

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Jack Mitchell
Sent: Wednesday, October 12, 2011 3:12 AM
To: [email protected]
Subject: Re: [yocto] QEmu Script Error Checking

Quoted 22 lines · Scott Garman
Quoted 8 lines · Jack Mitchell

I have run into the following issue where the tap device is in use due to the QEmu machine unexpectedly crashing. The error I recieve is here:

http://i.imgur.com/5t9U1.png (appologies for the screenshot but it wouldn't let me copy the text)

Is there any leaway for more robust error checking or a way to forcibly destroy the tap node to allow a new one to be created?

Hi Jack,

Since qemu is being run from a parent shell script (runqemu), if qemu were to crash, I would think the parent shell script would continue on and destroy the tap device normally. Might you be killing the runqemu process instead of qemu itself?

I'm not sure if there is a way we could reliably force a cleanup of tap devices when runqemu starts, because we need to support the case where multiple instances of qemu sessions are running simultaneously (each with their own tap device). Off the top of my head I think this would make the state of tap devices non-deterministic.

Quoted 7 lines

Furthermore, we support a mode where an administrator can set up one or more tap devices, allowing the runqemu user to not need sudo privileges. So checking for the case where a tap device exists but no qemu process is running wouldn't work.

Scott

Ok, thank you for the information Scott. I think I found the issue today which is causing the QEmu script to terminate pre-maturely.

I am using the eclipse-poky master branch as my eclipse plugin and it threw an error today when I tried to debug - which coincided with the QEmu and terminal window terminating. The errror I recieved was:

!SESSION 2011-10-12 09:22:49.135
-----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.6.0_22
java.vendor=Sun Microsystems Inc.

BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_GB
Framework arguments:  -product org.eclipse.sdk.ide
Command-line arguments:  -product org.eclipse.sdk.ide -data

/home/developer/jackdaw/../runtime-EclipseApplication -dev file:/home/developer/jackdaw/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -os linux -ws gtk -arch x86_64 -consoleLog

!ENTRY org.eclipse.cdt.debug.mi.core 4 42 2011-10-12 09:24:47.192
!MESSAGE Internal Error
!STACK 0
org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException: Inferior terminated[]
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.getMIShareds(SharedLibraryManager.java:123)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.updateState(SharedLibraryManager.java:188)
at
org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager.update(SharedLibraryManager.java:136)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.processSuspendedEvent(EventManager.java:326)
at
org.eclipse.cdt.debug.mi.core.cdi.EventManager.update(EventManager.java:100)
at java.util.Observable.notifyObservers(Observable.java:159)
at
org.eclipse.cdt.debug.mi.core.MISession.notifyObservers(MISession.java:791)
at org.eclipse.cdt.debug.mi.core.EventThread.run(EventThread.java:46)

Which looks like a CDT bug or the interfacing with CDT. I could file a bug report if you think it is related to the poky-eclipse plugin?

Quoted 6 lines

Cheers,
Jack.
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Jessica,

I have attached another error log which seems to be more verbose when I had this issue earlier today. Some of the errors seem to propogate from my code but there are also some CDT errors in there. The log is located
here: http://pastebin.com/JHuE838B

Regards,
Jack