<?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>100</bug_id>
          
          <creation_ts>2010-07-08 06:27:27 +0000</creation_ts>
          <short_desc>qemuarm and qemuppc images cannot shutdown entirely</short_desc>
          <delta_ts>2010-12-21 06:07:18 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>0.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>VERIFIED</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>0.9 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jiajun Xu">jiajun.xu</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>david.c.stewart</cc>
    
    <cc>jessica.zhang</cc>
    
    <cc>josh</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>mark.hatle</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>scott.a.garman</cc>
    
    <cc>sgw</cc>
    
    <cc>xianchao.zhang</cc>
    
    <cc>yongkang.you</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          <cf_verified>Program Management</cf_verified>
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>8940</commentid>
    <comment_count>0</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-07-08 06:27:27 +0000</bug_when>
    <thetext>Testing Env:    
Host: Ubuntu 10.04 LTS
Kernel: 2.6.32-21-generic-pae
Poky gitinfo(used to build qemu-native):
aa416b6133bd55b5ba4d2fb6f5faef274ba511a0 (git.pokylinux.org:poky-wr
+yocto-kernel-clean)
Qemuarm images (both sato &amp; sdk) from M1 build on autobuilder, http://autobuilder.pokylinux.org/milestone/20100708-1/.

When executing &quot;poweroff&quot; in qemuarm images, system goes into shutdown process. But qemu window and qemu process doesn&apos;t disappear after that. There is no extra error log on host and qemu.

The command used to start qemu:
###########
runqemu qemuarm ext3
/home/jxu49/test/M1-new/osel/zImage-2.6.34+r1+git0+63a07cb64ccc3ceae619d3298545d602ab5ecd38-r1-qemuarm-20100708044042.bin
/home/jxu49/test/M1-new/osel/poky-image-sato-qemuarm-20100708054323.rootfs.ext3

/home/jxu49/wr/poky-wr/build/tmp/sysroots/i686-linux/usr/bin/qemu-system-arm
-kernel
/home/jxu49/test/M1-new/osel/zImage-2.6.34+r1+git0+63a07cb64ccc3ceae619d3298545d602ab5ecd38-r1-qemuarm-20100708044042.bin
-net nic,vlan=0 -net
tap,vlan=0,ifname=tap0,script=/home/jxu49/wr/poky-wr/scripts/poky-qemu-ifup,downscript=/home/jxu49/wr/poky-wr/scripts/poky-qemu-ifdown
-M versatilepb -hda
/home/jxu49/test/M1-new/osel/poky-image-sato-qemuarm-20100708054323.rootfs.ext3
-no-reboot -show-cursor -usb -usbdevice wacom-tablet --append root=/dev/sda
console=ttyAMA0,115200 console=tty ip=192.168.7.2::192.168.7.1:255.255.255.0
mem=64M highres=off
###########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8944</commentid>
    <comment_count>1</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-07-11 22:38:36 +0000</bug_when>
    <thetext>I tested with images with latest M1 build,
http://autobuilder.pokylinux.org/milestone/20100710-1/. qemuppc image has the same issue also.

qemu stops after printing following message:
######
qemuppc login: md: stopping all md devices.
Shutdown: hda
Power down.
System Halted, OK to turn off power
######</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>8946</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2010-07-12 09:51:34 +0000</bug_when>
    <thetext>The message indicates that the Linux system DID shut down.  However, either Linux never signaled QEMU to terminate, or QEMU wasn&apos;t listening for the termination signal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9045</commentid>
    <comment_count>3</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-07-22 10:58:20 +0000</bug_when>
    <thetext>This is between the handoff between the kernel and qemu, and for ppc, it
may not be fixable without a medium sized hack to qemu. These will be fixed
post M2, when we have some dedicated time to look at them.

I don&apos;t see these as high defects, since it doesn&apos;t impact fundamental
operation of the target, and indeed we have many hardware platforms
that behave this same way.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9636</commentid>
    <comment_count>4</comment_count>
    <who name="xianchao zhang">xianchao.zhang</who>
    <bug_when>2010-09-07 19:54:41 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I tested with images with latest M1 build,
&gt; http://autobuilder.pokylinux.org/milestone/20100710-1/. qemuppc image has the
&gt; same issue also.
&gt; 
&gt; qemu stops after printing following message:
&gt; ######
&gt; qemuppc login: md: stopping all md devices.
&gt; Shutdown: hda
&gt; Power down.
&gt; System Halted, OK to turn off power
&gt; ######

I tested with images with latest M3 build,
http://autobuilder.pokylinux.org/milestone/20100905-1/
qemuppc image has the same issue too.

qemu stops after printing following message:

#############
The system is going down for system halt NOW!
root@qemuppc:~# md: stopping all md devices.
Shutdown: hdb
Shutdown: hda
Power down.
System Halted, OK to turn off power
##############</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9639</commentid>
    <comment_count>5</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-09-07 22:06:29 +0000</bug_when>
    <thetext>We&apos;ve got some new resources looking at this now. will update when we know more.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9805</commentid>
    <comment_count>6</comment_count>
    <who name="xianchao zhang">xianchao.zhang</who>
    <bug_when>2010-09-14 20:04:40 +0000</bug_when>
    <thetext>I tested with images with latest M3 build,
http://autobuilder.pokylinux.org/milestone/20100911-1/
qemuarm and qemuppc image have the same issue too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9808</commentid>
    <comment_count>7</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-09-14 23:09:52 +0000</bug_when>
    <thetext>M3 should be unchanged for this. We didn&apos;t do any fixes
for it. Although there are people looking into this at
the moment. So we should have fixes for M4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>9815</commentid>
    <comment_count>8</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2010-09-15 10:09:32 +0000</bug_when>
    <thetext>*** Bug 320 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10142</commentid>
    <comment_count>9</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-10-04 01:44:17 +0000</bug_when>
    <thetext>I believe this should now work for qemuppc. qemuarm still has the problem so leaving the bug open.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10153</commentid>
    <comment_count>10</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-04 13:21:35 +0000</bug_when>
    <thetext>qemuppc is fixed, please verify and provide an update</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10164</commentid>
    <comment_count>11</comment_count>
    <who name="Jiajun Xu">jiajun.xu</who>
    <bug_when>2010-10-05 07:00:05 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; qemuppc is fixed, please verify and provide an update

Xianchao,
Could you help try latest build and update the bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10408</commentid>
    <comment_count>12</comment_count>
    <who name="xianchao zhang">xianchao.zhang</who>
    <bug_when>2010-10-12 21:13:39 +0000</bug_when>
    <thetext>(In reply to comment #11)
&gt; (In reply to comment #10)
&gt; &gt; qemuppc is fixed, please verify and provide an update
&gt; 
&gt; Xianchao,
&gt; Could you help try latest build and update the bug?

This issue has not been fixed or not merged with the milestone build 10/11.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10448</commentid>
    <comment_count>13</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-10-13 13:06:14 +0000</bug_when>
    <thetext>can someone try &apos;reboot&apos; instead of shutdown ? This arm/powerpc boards
have h/w limitations that prevent shutdown and qemu emulates that. If you
issue &apos;reboot&apos; or &apos;shutdown -r now&apos;, what is the behaviour ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10464</commentid>
    <comment_count>14</comment_count>
    <who name="xianchao zhang">xianchao.zhang</who>
    <bug_when>2010-10-13 21:09:20 +0000</bug_when>
    <thetext>(In reply to comment #13)
&gt; can someone try &apos;reboot&apos; instead of shutdown ? This arm/powerpc boards
&gt; have h/w limitations that prevent shutdown and qemu emulates that. If you
&gt; issue &apos;reboot&apos; or &apos;shutdown -r now&apos;, what is the behaviour ?

If issue &apos;reboot&apos;, the system can shutdown both qemuarm and qemuppc, but &apos;shutdown -r now&apos; will cause system halt with the two arch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10491</commentid>
    <comment_count>15</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2010-10-14 08:21:02 +0000</bug_when>
    <thetext>The &apos;reboot&apos; working, and shutdown -r now (or halt) not working
is the expected behaviour. The ARM versatile h/w doesn&apos;t 
fault back to the boot monitor in our experience, and hence the
simulation has the same behaviour. This is much the same with
qemuppc, we could only hook up the restart behaviour.

Can we modify any scripts or wigets that were using shutdown or
halt to exit the simulation to use reboot, and call this one &apos;good 
enough&apos; for the simulated machines ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10507</commentid>
    <comment_count>16</comment_count>
    <who name="Scott Garman">scott.a.garman</who>
    <bug_when>2010-10-14 12:23:43 +0000</bug_when>
    <thetext>Commit 9a2ae44380a5ef81fb099075af99351db06a3252 makes the -no-reboot option to QEMU mandatory in our poky-qemu control scripts. I believe it is agreed that that should resolve this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10509</commentid>
    <comment_count>17</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2010-10-14 12:25:52 +0000</bug_when>
    <thetext>I agree that if reboot is working we can close this bug and that the automated testing infrastructure can use the reboot command. Scott has made sure qemu will terminate if the guest reboots in commit: http://git.pokylinux.org/cgit.cgi/poky/commit/?id=9a2ae44380a5ef81fb099075af99351db06a3252</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10715</commentid>
    <comment_count>18</comment_count>
    <who name="xianchao zhang">xianchao.zhang</who>
    <bug_when>2010-10-20 19:38:08 +0000</bug_when>
    <thetext>reboot can make qemu terminate both qemuarm and qemuppc with the milestone build 10/18</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>