<?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>14552</bug_id>
          
          <creation_ts>2021-09-16 15:16:29 +0000</creation_ts>
          <short_desc>Timeout reported as &quot;ERROR: Exit status is 9&quot; which is not very helpful</short_desc>
          <delta_ts>2022-01-21 22:15:25 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Ptest-runner</product>
          <component>ptest-runner</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>enhancement</bug_severity>
          <target_milestone>4.0 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Orling">tim.orling</reporter>
          <assigned_to name="Aníbal Limón">anibal</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>anibal</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>tvgamblin</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>91457</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-09-16 15:16:29 +0000</bug_when>
    <thetext>When a timeout occurs in a running test, what we see in the logs is:
&apos;ERROR: Exit status is 9&apos;

It would be helpful if ptest-runner2 actually reported the reason for the error status as timeout related (otherwise someone might erroneously think the exit code is coming from the ptest itself and not the ptest-runner).

See https://bugzilla.yoctoproject.org/show_bug.cgi?id=14258#c6
And the log: 
https://autobuilder.yoctoproject.org/typhoon/#/builders/82/builds/1998/steps/12/logs/stdio
         &apos;ERROR: Exit status is 9\n&apos;
         &apos;DURATION: 2904\n&apos;,
 &apos;strace&apos;: [&apos;kill_child.test&apos;]}

The code in question:
http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/tree/utils.c#n529

It seems that there is a different path to timeout that is not being trapped by:
http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/tree/utils.c#n533</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91462</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Orling">tim.orling</who>
    <bug_when>2021-09-16 15:49:58 +0000</bug_when>
    <thetext>Might be related:
https://lists.yoctoproject.org/g/yocto/message/54739
https://lists.yoctoproject.org/g/yocto/message/54740</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91463</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2021-09-16 16:03:02 +0000</bug_when>
    <thetext>I think so. Can you try the patches locally?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91518</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-09-23 14:35:36 +0000</bug_when>
    <thetext>Anibal, If you can do this great, if not, ping me and I&apos;ll take a look.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91609</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-09-28 22:41:56 +0000</bug_when>
    <thetext>I was tempted to use this library:
  http://libexplain.sourceforge.net/
  https://linux.die.net/man/3/explain_waitpid
but we probably shouldn&apos;t add complexity to ptest-runner.
What do you think Anibal?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91612</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2021-09-29 07:12:13 +0000</bug_when>
    <thetext>The library isn&apos;t going to help much. We know that error 9 is killing ptest on timeout, what we need is as much information as possible about why ptest got stuck.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91616</commentid>
    <comment_count>6</comment_count>
    <who name="Aníbal Limón">anibal</who>
    <bug_when>2021-09-29 16:02:44 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; The library isn&apos;t going to help much. We know that error 9 is killing ptest
&gt; on timeout, what we need is as much information as possible about why ptest
&gt; got stuck.

Yes I think the unique way is to see the logs and figure out why got stuck or reproduce the issue locally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92235</commentid>
    <comment_count>7</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-01-06 16:02:07 +0000</bug_when>
    <thetext>I think this has already been fixed?
https://git.yoctoproject.org/ptest-runner2/log/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92382</commentid>
    <comment_count>8</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2022-01-21 22:15:25 +0000</bug_when>
    <thetext>Fixed as described above.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>