Bug 13106

Summary: Occasional timeouts when selftest starts qemu
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Armin Kuster <akuster>
Component: coreAssignee: Ross Burton <ross.burton>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: meta.mr.watcher, meta.watcher, randy.macleod
Version: 2.6   
Target Milestone: 2.7 M4   
Hardware: x86   
OS: Multiple   
URL: http://errors.yoctoproject.org/Errors/Build/74271/
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Armin Kuster 2018-12-26 23:20:04 UTC
ERROR: Command . ./oe-init-build-env; ${SCRIPTSDIR}/checkvnc; DISPLAY=:1 oe-selftest --skip-tests distrodata.Distrodata.test_checkpkg -j 15 failed with exit code 1, see errors above. (1545846294.5: 4186.2)


thud does not have the new checkpkg if I am reading this right.( maybe I am getting confused)

or checkpkg make sense for Master, not a stable branch if I am interpreting this correctly. thinking in terms of AUH changes RP make to master.
Comment 1 Ross Burton 2019-01-03 15:42:32 UTC
That checkpkg mention is an exclusion, ignore that.

2018-12-26 17:44:49,900 - oe-selftest - INFO - FAIL: runqemu.RunqemuTests.test_boot_recipe_image (subunit.RemotedTestCase)
...
AssertionError: False is not true : Failed: runqemu nographic core-image-minimal, INFO: rootfs file: 
...
DEBUG: Waiting at most 1000 seconds for login banner (12/26/18 16:58:48)
DEBUG: Connection from 127.0.0.1:58672
DEBUG: Reached login banner in 87.00987339019775 seconds (12/26/18 17:00:15)
DEBUG: Couldn't login into serial console as root using blank password

The image didn't boot.
Comment 2 Richard Purdie 2019-01-03 15:46:15 UTC
Actual failure: 2018-12-26 17:44:49,900 - oe-selftest - INFO - ======================================================================
2018-12-26 17:44:49,900 - oe-selftest - INFO - FAIL: runqemu.RunqemuTests.test_boot_recipe_image (subunit.RemotedTestCase)
2018-12-26 17:44:49,901 - oe-selftest - INFO - ----------------------------------------------------------------------
2018-12-26 17:44:49,901 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f
    return func(*args, **kwargs)
  File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 70, in test_boot_recipe_image
    self.assertTrue(qemu.runner.logged, "Failed: %s, %s" % (cmd, f.read()))
  File "/usr/lib/python3.6/unittest/case.py", line 682, in assertTrue
    raise self.failureException(msg)
AssertionError: False is not true : Failed: runqemu nographic core-image-minimal, INFO: rootfs file: 
INFO: Qemu log file: /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-29505/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testimage/qemu_boot_log.20181226165840
INFO: SSH log file: /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-29505/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/testimage/ssh_target_log.20181226165840
DEBUG: Created listening socket for qemu serial console on: 127.0.0.1:40649
DEBUG: Created listening socket for qemu serial console on: 127.0.0.1:59033
DEBUG: launchcmd=runqemu nographic core-image-minimal tcpserial=59033 bootparams="console=tty1 console=ttyS0,115200n8 printk.time=1" qemuparams="-serial tcp:127.0.0.1:40649 -pidfile pidfile_29505"
DEBUG: runqemu started, pid is 5404
DEBUG: waiting at most 120 seconds for qemu pid (12/26/18 16:58:44)
DEBUG: qemu started in 3.504581928253174 seconds - qemu procces pid is 6755 (12/26/18 16:58:48)
DEBUG: Target IP: None
DEBUG: Server IP: None
DEBUG: Starting logging thread
DEBUG: Starting thread event loop
DEBUG: Connection request received
DEBUG: Setting connection established event
DEBUG: Output from runqemu:
runqemu - INFO - Running bitbake -e...
runqemu - INFO - Continuing with the following parameters:

runqemu - INFO - Using preconfigured tap device tap0
runqemu - INFO - If this is not intended, touch /tmp/qemu-tap-locks/tap0.skip to make runqemu skip tap0.
runqemu - INFO - Network configuration: 192.168.7.2::192.168.7.1:255.255.255.0
runqemu - INFO - Running /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-29505/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-x86_64 -device virtio-net-pci,netdev=net0,mac=52:54:00:12:34:02 -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -drive file=/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-29505/tmp/deploy/images/qemux86-64/core-image-minimal-qemux86-64.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -device usb-tablet -device virtio-rng-pci  -nographic -serial tcp:127.0.0.1:40649 -pidfile pidfile_29505  -cpu core2duo -m 256 -serial tcp:127.0.0.1:59033 -kernel /home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/build-st-29505/tmp/deploy/images/qemux86-64/bzImage--4.18.21+git0+8f4a98c938_9eddc793f9-r0.2-qemux86-64-20181226163340.bin -append 'root=/dev/vda rw highres=off  console=ttyS0 mem=256M ip=192.168.7.2::192.168.7.1:255.255.255.0 vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1 console=tty1 console=ttyS0,115200n8 printk.time=1'

QEMU 3.0.0 monitor - type 'help' for more information
(qemu) 
DEBUG: Waiting at most 1000 seconds for login banner (12/26/18 16:58:48)
DEBUG: Connection from 127.0.0.1:58672
DEBUG: Reached login banner in 87.00987339019775 seconds (12/26/18 17:00:15)
DEBUG: Couldn't login into serial console as root using blank password

----------------------------------------------------------------------
Comment 3 Ross Burton 2019-01-03 15:50:25 UTC
Making this the canonical bug for the problem where selftest's qemu can timeout.  Robert has two patches: one to enable KVM, and another to increase the timeout.
Comment 4 Ross Burton 2019-05-09 15:42:07 UTC
All fixed now.