summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-10 10:00:58 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 22:46:38 +0100
commitcb28cbbff45183171aa7f01c6122e3c7c35fadcc (patch)
treebe54de959237c2f2bfa5a9b5c9d55818ec95a21a
parent676d10c470b57fbace9018ed10d7c9e0011d961c (diff)
downloadpoky-cb28cbbff45183171aa7f01c6122e3c7c35fadcc.tar.gz
poky-cb28cbbff45183171aa7f01c6122e3c7c35fadcc.tar.bz2
poky-cb28cbbff45183171aa7f01c6122e3c7c35fadcc.zip
qemurunner: Add extra debug info when qemu fails to start
When qemu fails to start we're struggling to work out why. Add more debug info which can at least confirm/rule out various things. This code is only on the error handling path and more info shoudl help us debug issues. (From OE-Core rev: 797f7e0c3ff0610a4de321eaf82f84bca610624e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3001d0d8f3429e5ff0c37ea7192e85e7001cdb32) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 486d2bb893..41c6bb33d6 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -254,6 +254,15 @@ class QemuRunner:
if not self.is_alive():
self.logger.error("Qemu pid didn't appear in %s seconds (%s)" %
(self.runqemutime, time.strftime("%D %H:%M:%S")))
+
+ qemu_pid = None
+ if os.path.isfile(self.qemu_pidfile):
+ with open(self.qemu_pidfile, 'r') as f:
+ qemu_pid = f.read().strip()
+
+ self.logger.error("Status information, poll status: %s, pidfile exists: %s, pidfile contents %s, proc pid exists %s"
+ % (self.runqemu.poll(), os.path.isfile(self.qemu_pidfile), str(qemu_pid), os.path.exists("/proc/" + qemu_pid)))
+
# Dump all processes to help us to figure out what is going on...
ps = subprocess.Popen(['ps', 'axww', '-o', 'pid,ppid,command '], stdout=subprocess.PIPE).communicate()[0]
processes = ps.decode("utf-8")