<?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>15138</bug_id>
          
          <creation_ts>2023-06-08 13:03:51 +0000</creation_ts>
          <short_desc>AB-INT: qemux86/x86-64 hangs intermittently</short_desc>
          <delta_ts>2023-07-20 14:53:06 +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>unspecified</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>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexandre Belloni">alexandre.belloni</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>bruce.ashfield</cc>
    
    <cc>paulg</cc>
    
    <cc>randy.macleod</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>95652</commentid>
    <comment_count>0</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-08 13:03:51 +0000</bug_when>
    <thetext>qemu seems to hang since the switch to kernel 6.1. We though the stable upgrades fixed it but this is still happening.

https://autobuilder.yoctoproject.org/typhoon/#/builders/72/builds/7249/steps/15/logs/stdio

qa-extras2 fedora38-ty-4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95653</commentid>
    <comment_count>1</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-08 13:04:45 +0000</bug_when>
    <thetext>The last line before the hang is often:

[    0.267040] Freeing SMP alternatives memory: 52K</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95654</commentid>
    <comment_count>2</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-08 13:13:56 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/5249/steps/14/logs/stdio

oe-selftest-debian debian11-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95660</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-06-08 14:50:27 +0000</bug_when>
    <thetext>Probably came in with 6.1.26 and onwards.
Updates to 6.1.30/31 didn&apos;t help.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95684</commentid>
    <comment_count>4</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-08 21:30:17 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/81/builds/5121/steps/13/logs/stdio

qemux86-64-ptest ubuntu1804-ty-3


https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/5287/steps/14/logs/stdio

oe-selftest-ubuntu ubuntu2004-ty-1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95701</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Gortmaker">paulg</who>
    <bug_when>2023-06-10 23:59:25 +0000</bug_when>
    <thetext>So, I can&apos;t recall exactly, but stuff I was sent like this caught my attention:

[    0.307298] Freeing SMP alternatives memory: 52K
[   19.910999] smpboot: CPU0: Intel Xeon E3-12xx v2 (Ivy Bridge) (family: 0x6, model: 0x3a, stepping: 0x9)

My immediate reaction was &quot;What the heck was it doing for 18+ seconds?!?&quot;

And so I&apos;ll own some of the blame of pointing people at possible changing of code for on-lining CPUs that comes *after* the &quot;Freeing&quot; message.

But if we ignore e-mail and go to the AB log, and expand our context backwards in time to where CPU mitigations start and take a wider view....

[    0.274003] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.275004] Spectre V2 : Mitigation: Retpolines
[    0.276000] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    0.277000] Spectre V2 : Spectre v2 / SpectreRSB : Filling RSB on VMEXIT
[    0.278002] Speculative Store Bypass: Vulnerable
[    0.279002] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    0.280001] MMIO Stale Data: Unknown: No mitigations
[    0.281006] SRBDS: Unknown: Dependent on hypervisor status
[    0.307298] Freeing SMP alternatives memory: 52K
[   19.910999] smpboot: CPU0: Intel Xeon E3-12xx v2 (Ivy Bridge) (family: 0x6, model: 0x3a, stepping: 0x9)

Do you see it?  I was focused on the evidence of the forest fire and not looking for the spark that started it.

Look closely. Pretty much every step is done in 0.001 -- but then SRDBS fires, and wham-o.  It goes from 0.281 to 0.307 - which is like a 25x+ increase.

I can&apos;t directly compare to my stuff, because I always boot bare-metal with &quot;mitigations=off&quot;.  The SRBDS workarounds have been mainline long before v6.1 so we can&apos;t directly blame that.

We aren&apos;t really interested in testing all those mitigations from a Yocto perspective, and we&apos;ve already tried turning SMP off, so I&apos;d suggest AB turning mitigations off with the boot arg.  Permanently - even if they don&apos;t solve this AB hang quirk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95712</commentid>
    <comment_count>6</comment_count>
    <who name="Alexandre Belloni">alexandre.belloni</who>
    <bug_when>2023-06-14 08:31:12 +0000</bug_when>
    <thetext>https://autobuilder.yoctoproject.org/typhoon/#/builders/86/builds/5326/steps/14/logs/stdio

oe-selftest-fedora fedora37-ty-3

https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/5283/steps/14/logs/stdio

oe-selftest-debian debian11-ty-3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95742</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Gortmaker">paulg</who>
    <bug_when>2023-06-16 14:39:28 +0000</bug_when>
    <thetext>For the paper trail, we believe the backport of e9523a0d81 to various stable releases is the root cause:

https://lkml.org/lkml/2023/6/13/1460
https://lore.kernel.org/all/23fb8ad7-beb0-ae1c-fa5a-a682a57f79b0@grsecurity.net/

Proposed fix:

https://lore.kernel.org/all/20230615091830.RxMV2xf_@linutronix.de/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95745</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Gortmaker">paulg</who>
    <bug_when>2023-06-16 19:37:13 +0000</bug_when>
    <thetext>https://lists.openembedded.org/g/openembedded-core/message/182829</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95999</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-07-20 14:53:06 +0000</bug_when>
    <thetext>Fixed by: 
https://git.openembedded.org/openembedded-core/commit/?id=73b7f36e51de

73b7f36e51de linux-yocto/6.1: fix intermittent x86 boot hangs</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>