<?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>14341</bug_id>
          
          <creation_ts>2021-04-07 18:23:21 +0000</creation_ts>
          <short_desc>BitbakePrTests.test_stopping_prservice_message fails</short_desc>
          <delta_ts>2024-03-05 16:01:54 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</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 AB-HAVE-PLAN</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>5.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alejandro">alejandro</reporter>
          <assigned_to name="Yoann Congal">yoann.congal</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yoann.congal</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>89885</commentid>
    <comment_count>0</comment_count>
    <who name="Alejandro">alejandro</who>
    <bug_when>2021-04-07 18:23:21 +0000</bug_when>
    <thetext>The PR server stop command was unsuccessful since the pid tmp file doesnt exist:

AssertionError: Command &apos;bitbake-prserv --host localhost --port 34207 --loglevel=DEBUG --stop&apos; returned non-zero exit status 1:
Traceback (most recent call last):
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/bin/bitbake-prserv&quot;, line 53, in &lt;module&gt;
    ret = main()
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/bin/bitbake-prserv&quot;, line 46, in main
    ret=prserv.serv.stop_daemon(options.host, options.port)
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/prserv/serv.py&quot;, line 426, in stop_daemon
    raise e
  File &quot;/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/prserv/serv.py&quot;, line 421, in stop_daemon
    os.remove(pidfile)
FileNotFoundError: [Errno 2] No such file or directory: &apos;/tmp/PRServer_127.0.0.1_34207.pid&apos;
Waiting for pr-server to exit.
Sending SIGTERM to pr-server.

More details at:
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/2002/steps/14/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89902</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-04-08 14:55:21 +0000</bug_when>
    <thetext>Looks like a shutdown race condition.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>91805</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-10-21 14:58:20 +0000</bug_when>
    <thetext>We think this is a race that we should keep looking for an fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>97151</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2023-10-30 15:37:32 +0000</bug_when>
    <thetext>Build move to 5.0 -- ../Randy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98265</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-02-22 16:19:43 +0000</bug_when>
    <thetext>Transcribing Richard&apos;s comment during the triage meeting:
https://git.yoctoproject.org/poky/tree/bitbake/lib/prserv/serv.py#n265:
        if os.path.exists(pidfile):
            os.remove(pidfile)
=&gt; pidfile might be removed by the exiting process between those 2 lines and trigger the FileNotFoundError exception

A fix might be to encase the os.remove in a try/except to ignore silently this case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98365</commentid>
    <comment_count>5</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-02-29 21:58:10 +0000</bug_when>
    <thetext>Patch sent : https://lists.openembedded.org/g/bitbake-devel/message/15981</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98377</commentid>
    <comment_count>6</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-03-05 15:55:52 +0000</bug_when>
    <thetext>Fix merged : https://git.yoctoproject.org/poky/commit/bitbake?id=ef88dee4f77ca95ec79e62d08fc0a01e83528e11&amp;h=master</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>