<?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>10270</bug_id>
          
          <creation_ts>2016-09-13 20:07:50 +0000</creation_ts>
          <short_desc>Raciness when invoking multiple instances of runqemu via testimage on the autobuilder</short_desc>
          <delta_ts>2016-09-15 04:11:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>2.2</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>Undecided</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joshua Lock">joshuagloe</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>liezhi.yang</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</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>66103</commentid>
    <comment_count>0</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2016-09-13 20:07:50 +0000</bug_when>
    <thetext>It looks like invoking -c testimage with multiple image targets at once results in a race as runqemu is invoked multiple times and tries to mkdir the qemu-tap-locks

WARNING: core-image-minimal-1.0-r0 do_testimage: Qemu ended unexpectedly, dump data from host is in /tmp/oe-saved-tests/201609131633_qemu
WARNING: core-image-sato-1.0-r0 do_testimage: Qemu ended unexpectedly, dump data from host is in /tmp/oe-saved-tests/201609131633_qemu
ERROR: core-image-minimal-1.0-r0 do_testimage: Function failed: do_testimage
ERROR: core-image-sato-1.0-r0 do_testimage: Function failed: do_testimage
ERROR: Logfile of failure stored in: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/temp/log.do_testimage.31726
Log data follows:
| DEBUG: Executing python function do_testimage
| NOTE: rootfs file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86/core-image-sato-qemux86.ext4
| NOTE: Qemu log file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/testimage/qemu_boot_log.20160913163326
| NOTE: SSH log file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/work/qemux86-poky-linux/core-image-sato/1.0-r0/testimage/ssh_target_log.20160913163326
| NOTE: Created listening socket for qemu serial console on: 127.0.0.1:35544
| NOTE: Created listening socket for qemu serial console on: 127.0.0.1:58297
| NOTE: Using kvm for runqemu
| NOTE: runqemu started, pid is 2629
| NOTE: waiting at most 60 seconds for qemu pid
| NOTE: runqemu exited with code 1
| NOTE: Output from runqemu:
| runqemu - INFO - MACHINE: qemux86
| runqemu - INFO - DEPLOY_DIR_IMAGE: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86
| runqemu - INFO - CONFFILE: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf
| runqemu - INFO - Continuing with the following parameters:
| 
| stty: &apos;standard input&apos;: Inappropriate ioctl for device
| Traceback (most recent call last):
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu&quot;, line 920, in &lt;module&gt;
|     ret = main()
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu&quot;, line 911, in main
|     config.setup_network()
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu&quot;, line 760, in setup_network
|     self.setup_tap()
|   File &quot;/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/scripts/runqemu&quot;, line 697, in setup_tap
|     os.mkdir(lockdir)
| FileExistsError: [Errno 17] File exists: &apos;/tmp/qemu-tap-locks&apos;
| KERNEL: [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86/bzImage]
| MACHINE: [qemux86]
| FSTYPE: [ext4]
| ROOTFS: [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86/core-image-sato-qemux86.ext4]
| CONFFILE: [/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-ipk/build/build/tmp/deploy/images/qemux86/core-image-sato-qemux86.qemuboot.conf]
| 
| 
| NOTE: Sending SIGTERM to runqemu
| WARNING: Qemu ended unexpectedly, dump data from host is in /tmp/oe-saved-tests/201609131633_qemu
| DEBUG: Python function do_testimage finished
| ERROR: Function failed: do_testimage
NOTE: recipe core-image-sato-1.0-r0: task do_testimage: Failed

This appears to be related to using pre-generated tapdevs

Full output at: https://autobuilder.yoctoproject.org/main/builders/nightly-ipk/builds/900/steps/Running%20Sanity%20Tests/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66130</commentid>
    <comment_count>1</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-09-14 09:51:18 +0000</bug_when>
    <thetext>http://cgit.openembedded.org/openembedded-core-contrib/commit/?h=rbt/rq&amp;id=15e39e64de8fb94a3e22f6580bc94be28f7ea54e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66179</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-09-15 04:11:40 +0000</bug_when>
    <thetext>Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=26e46e6d902a952fd884f61460ec11b8aca01917</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>