<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12493</bug_id>
          
          <creation_ts>2018-01-17 16:24:17 +0000</creation_ts>
          <short_desc>Confusing output when qemu fails to run.</short_desc>
          <delta_ts>2018-07-27 02:46:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Runtime Testing</product>
          <component>general</component>
          <version>2.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.6 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>liezhi.yang</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79108</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-01-17 16:24:17 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/main/builders/nightly-x86/builds/1277/steps/Running%20Sanity%20Tests/logs/stdio shows confusing output from qemurunner.py:

NOTE: recipe core-image-sato-sdk-1.0-r0: task do_testimage: Failed
ERROR: Task (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86/build/meta/recipes-sato/images/core-image-sato-sdk.bb:do_testimage) failed with exit code &apos;1&apos;
ERROR: core-image-minimal-1.0-r0 do_testimage: Didn&apos;t receive a console connection from qemu. Here is the qemu command line used:
powerpc-poky-linux-gcc -mno-spe -fuse-ld=bfd -ffile-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source=/kernel-source/ -Wp,-MD,arch/powerpc/mm/.mmap.o.d -nostdinc -isystem /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work/qemuppc-poky-linux/linux-yocto/4.9.65+gitAUTOINC+4553798a3e_5174e51fa0-r0/recipe-sysroot-native/usr/bin/powerpc-poky-linux/../../lib/powerpc-poky-linux/gcc/powerpc-poky-linux/7.2.0/include -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc/include -I./arch/powerpc/include/generated/uapi -I./arch/powerpc/include/generated -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/include -I./include -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc/include/uapi -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/include/uapi -I./include/generated/uapi -include /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/include/linux/kconfig.h -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc/mm -Iarch/powerpc/mm -D__KERNEL__ -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -msoft-float -pipe -I/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc -ffixed-r2 -mmultiple -mno-altivec -mno-vsx -mno-spe -mspe=no -funit-at-a-time -fno-dwarf2-cfi-asm -mno-string -mcpu=powerpc -mno-sched-epilog -Wa,-maltivec -mbig-endian -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fno-stack-protector -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -g -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror -DKBUILD_BASENAME=&quot;mmap&quot; -DKBUILD_MODNAME=&quot;mmap&quot; -c -o arch/powerpc/mm/mmap.o /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ppc-lsb/build/build/tmp/work-shared/qemuppc/kernel-source/arch/powerpc/mm/mmap.c 
and output from runqemu:
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-autobuilder/yocto-worker/nightly-x86/build/build/tmp/work/x86_64-linux/qemu-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/qemu-system-i386 -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-autobuilder/yocto-worker/nightly-x86/build/build/tmp/deploy/images/qemux86/core-image-minimal-qemux86.ext4,if=virtio,format=raw -vga vmware -show-cursor -usb -device usb-tablet -device virtio-rng-pci  -serial tcp:127.0.0.1:38655 -pidfile pidfile_23574  -cpu pentium2 -enable-kvm -m 256 -serial tcp:127.0.0.1:39061 -snapshot -kernel /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86/build/build/tmp/deploy/images/qemux86/bzImage--4.12.18+git0+b66a4f9730_558fe84d69-r0.2-qemux86-20180116144236.bin -append &apos;root=/dev/vda rw highres=off  clocksource=kvm-clock hpet=disable noapic nolapic 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&apos;

runqemu - ERROR - Failed to run qemu: ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
qemu-system-i386: failed to initialize KVM: Cannot allocate memory

runqemu - INFO - Releasing lockfile for tap device &apos;tap0&apos;

I suspect that qemu exits immediately (or quickly) yet the timeout doesn&apos;t notice and the pid was recycled so the commandline is a ppc compile command instead. We should fix it to detect early exits from qemu and not display confusing commandlines.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81194</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2018-07-27 02:42:20 +0000</bug_when>
    <thetext>Fixed on master branch:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c68e4c6e3eb612bb7afd9d7f1e9a6dc295d44346</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81196</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2018-07-27 02:45:22 +0000</bug_when>
    <thetext>Fixed on master branch:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=c467bc856963d701e5a7d63f6e85e1361244489a</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81197</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2018-07-27 02:46:51 +0000</bug_when>
    <thetext>Please ignore c68e4c6e3eb612bb7afd9d7f1e9a6dc295d44346, it should be c467bc856963d701e5a7d63f6e85e1361244489a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>