<?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>12555</bug_id>
          
          <creation_ts>2018-02-15 23:21:31 +0000</creation_ts>
          <short_desc>Toaster will not shut down due to extra PID from Django</short_desc>
          <delta_ts>2018-04-15 00:25:10 +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>Toaster</product>
          <component>toaster</component>
          <version>2.4.1</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>2.5 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Reyna">david.reyna</reporter>
          <assigned_to name="David Reyna">david.reyna</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>stanciux.mihail</cc>
          
          <qa_contact name="Toaster default assignee">toaster</qa_contact>
          <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>79469</commentid>
    <comment_count>0</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-02-15 23:21:31 +0000</bug_when>
    <thetext>1) Django has a habit of creating an extra PID which Toaster cannot capture, and which leads to dangling processes and memory leaks.

The solution is to use the &quot;--noreload&quot; option for &quot;runserver&quot;.

2) Toaster has a typo in the shutdown code that causes an infinite loop if the PIDs cannot be killed with a simple &quot;-0&quot;.

  while kill -0 $pid 2&gt;/dev/null; do
    kill -SIGTERM -$pid 2&gt;/dev/null
------------------^
    sleep 1
  done

Removing the extra &quot;-&quot; results in safe and sane shutdowns.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80255</commentid>
    <comment_count>1</comment_count>
    <who name="David Reyna">david.reyna</who>
    <bug_when>2018-04-15 00:25:10 +0000</bug_when>
    <thetext> (Bitbake rev: 256990943075e89cb9aee2bc6488344b6783e07b)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>