Bug 14403 - Qemu error messages not clear when command line is corrupted.
Summary: Qemu error messages not clear when command line is corrupted.
Status: NEW
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 3.3
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: 6.2
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-05-21 18:01 UTC by Jon Mason
Modified: 2026-10-29 15:22 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Mason 2021-05-21 18:01:42 UTC
From https://autobuilder.yoctoproject.org/typhoon/#/builders/109/builds/2385/steps/13/logs/stdio


WARNING: core-image-full-cmdline-1.0-r0 do_testimage: Failed to communicate with qemu monitor: Unexpected empty reply from server
WARNING: core-image-full-cmdline-1.0-r0 do_testimage: qemu-system ended unexpectedly
WARNING: core-image-sato-1.0-r0 do_testimage: Failed to communicate with qemu monitor: Unexpected empty reply from server
WARNING: core-image-sato-1.0-r0 do_testimage: qemu-system ended unexpectedly
WARNING: core-image-sato-sdk-1.0-r0 do_testimage: Failed to connect qemu monitor socket: [Errno 104] Connection reset by peer File: None
WARNING: core-image-sato-sdk-1.0-r0 do_testimage: qemu-system ended unexpectedly
ERROR: core-image-full-cmdline-1.0-r0 do_testimage: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_testimage(d)
     0003:
File: '/home/pokybuild/yocto-worker/qemux86-64-alt/build/meta/classes/testimage.bbclass', lineno: 136, function: do_testimage
     0132:    query-block
     0133:}
     0134:
     0135:python do_testimage() {
 *** 0136:    testimage_main(d)
     0137:}
     0138:
     0139:addtask testimage
     0140:do_testimage[nostamp] = "1"
File: '/home/pokybuild/yocto-worker/qemux86-64-alt/build/meta/classes/testimage.bbclass', lineno: 382, function: testimage_main
     0378:    orig_sigterm_handler = signal.signal(signal.SIGTERM, sigterm_exception)
     0379:    try:
     0380:        # We need to check if runqemu ends unexpectedly
     0381:        # or if the worker send us a SIGTERM
 *** 0382:        tc.target.start(params=d.getVar("TEST_QEMUPARAMS"), runqemuparams=d.getVar("TEST_RUNQEMUPARAMS"))
     0383:        import threading
     0384:        try:
     0385:            threading.Timer(int(d.getVar("TEST_OVERALL_TIMEOUT")), handle_test_timeout, (int(d.getVar("TEST_OVERALL_TIMEOUT")),)).start()
     0386:        except ValueError:
File: '/home/pokybuild/yocto-worker/qemux86-64-alt/build/meta/lib/oeqa/core/target/qemu.py', lineno: 77, function: start
     0073:            if self.runner.server_ip:
     0074:                self.server_ip = self.runner.server_ip
     0075:        else:
     0076:            self.stop()
 *** 0077:            raise RuntimeError("FAILED to start qemu - check the task log and the boot log")
     0078:
     0079:    def stop(self):
     0080:        self.runner.stop()
Exception: RuntimeError: FAILED to start qemu - check the task log and the boot log
Comment 1 Randy MacLeod 2021-05-27 14:43:17 UTC
Richard thinks that this was due to broken test code in the build, i.e. kvm clock related.

Let's use this bug to fix a reporting issue:

Qemu error messages not clear when command line is corrupted.
Comment 2 Richard Purdie 2021-05-27 14:44:51 UTC
This was triggered by a corrupted version of this change:

-QB_CPU_x86 = "-cpu IvyBridge -machine q35"
-QB_CPU_KVM_x86 = "-cpu IvyBridge -machine q35"
+QB_CPU_x86 = "-cpu IvyBridge,-kvmclock -machine q35"
+QB_CPU_KVM_x86 = "-cpu IvyBridge,-kvmclock -machine q35"
 
-QB_CPU_x86-64 = "-cpu IvyBridge -machine q35"
-QB_CPU_KVM_x86-64 = "-cpu IvyBridge -machine q35"
+QB_CPU_x86-64 = "-cpu IvyBridge,-kvmclock -machine q35"
+QB_CPU_KVM_x86-64 = "-cpu IvyBridge,-kvmclock -machine q35"
 
with IvyBridge-kvmclock missing the comma. We need better log output for broken commands like this.
Comment 3 Randy MacLeod 2026-06-12 13:30:55 UTC
Adding better error reporting is more of an enhancement, IMO.
It's less urgent so lower importance to Medium.