<?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>15675</bug_id>
          
          <creation_ts>2024-11-28 14:59:43 +0000</creation_ts>
          <short_desc>qemurunner: format_exception() missing 2 required positional arguments</short_desc>
          <delta_ts>2025-01-15 10:27:35 +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>oeqa/runtime</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></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.2 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mathieu Dubois-Briand">mathieu.dubois-briand</reporter>
          <assigned_to name="Mathieu Dubois-Briand">mathieu.dubois-briand</assigned_to>
          <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>100298</commentid>
    <comment_count>0</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2024-11-28 14:59:43 +0000</bug_when>
    <thetext>LoggingThread exception handler fails to handle exceptions properly, with the following exception:

&gt;   File &quot;/srv/pokybuild/yocto-worker/qemux86-64-tc/build/meta/lib/oeqa/utils/qemurunner.py&quot;, line 750, in threadtarget
&gt;     self.logger.warning(&quot;Exception %s in logging thread&quot; % traceback.format_exception(e))
&gt; TypeError: format_exception() missing 2 required positional arguments: &apos;value&apos; and &apos;tb&apos;

https://valkyrie.yoctoproject.org/#/builders/66/builds/529/steps/12/logs/stdio

I believe this is because python 3.8 was used here, and this syntax for traceback.format_exception() is only supported since 3.10.

https://docs.python.org/3/library/traceback.html#traceback.format_exception

&gt; Since Python 3.10, instead of passing value and tb, an exception object can be passed as the first argument. If value and tb are provided, the first argument is ignored in order to provide backwards compatibility.

We will have to switch to the old syntax if we want to be compatible with python versions before 3.10.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100302</commentid>
    <comment_count>1</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2024-11-28 15:05:30 +0000</bug_when>
    <thetext>qemux86-64-tc ubuntu2004-vk-2 master-next completed at 2024-11-27T12:15:38Z
https://valkyrie.yoctoproject.org/#/builders/66/builds/529/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100642</commentid>
    <comment_count>2</comment_count>
    <who name="Mathieu Dubois-Briand">mathieu.dubois-briand</who>
    <bug_when>2025-01-15 10:27:35 +0000</bug_when>
    <thetext>Fixed by 5f9ecf5f210e qemurunner: Fix stack trace generation in exception handler</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>