<?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>10312</bug_id>
          
          <creation_ts>2016-09-21 06:45:24 +0000</creation_ts>
          <short_desc>Failed to execute child process &quot;oe-gnome-terminal-phonehome&quot; (No such file or directory)</short_desc>
          <delta_ts>2017-11-16 16:20:07 +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>OE-Core</product>
          <component>core</component>
          <version>2.3</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</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ming Liu">liu.ming50</reporter>
          <assigned_to name="Ming Liu">liu.ming50</assigned_to>
          <cc>jon.richardson</cc>
    
    <cc>juro.bystricky</cc>
    
    <cc>kai.kang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>philschenker</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</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>66398</commentid>
    <comment_count>0</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-21 06:45:24 +0000</bug_when>
    <thetext>A flaw was found on my Ubuntu 14.04.5 LTS, on which that gnome-terminal is the default terminal, when I run any of the tasks:
bitbake busybox -c menuconfig/devshell/devpyshell
bitbake virtual/kernel -c menuconfig/devshell/devpyshell

I got a error as follows:
&quot;Failed to execute child process &quot;oe-gnome-terminal-phonehome&quot; (No such file or directory)&quot;

Seems the environment of the process calling Popen is not passed to the child process, this behaviour is a known issue in Python bug tracker:
http://bugs.python.org/issue8557

I think it could be fixed by using an absolute path instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66399</commentid>
    <comment_count>1</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-21 06:50:15 +0000</bug_when>
    <thetext>Patch sent to ML: http://lists.openembedded.org/pipermail/openembedded-core/2016-August/125276.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66494</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2016-09-22 14:52:20 +0000</bug_when>
    <thetext>Ming, Richard wants to know why this would be broken on 14.04 but not on 16.04 which he uses. Can you explain that? Also, no one else is reporting this bug so we&apos;re a little suspicious that it&apos;s a valid bug and not a problem limited to your system. Can anyone else reproduce this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66538</commentid>
    <comment_count>3</comment_count>
    <who name="Ming Liu">liu.ming50</who>
    <bug_when>2016-09-23 07:43:23 +0000</bug_when>
    <thetext>Just did a quick search in OE mail list, seems I am not the only one seeing this problem, Slater Joseph also had reported a similar one:
http://lists.openembedded.org/pipermail/openembedded-core/2016-July/124215.html

I have not managed to test it on other machines except my Ubuntu 14.04, but I have done a python3 test, like the follows:
......
peter-liu@peterliu-Precision-M4800:~/$ virtualenv /tmp/zzz
New python executable in /tmp/zzz/bin/python
Installing setuptools, pip...done.

peter-liu@peterliu-Precision-M4800:~/$ python3
Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
[GCC 4.8.4] on linux
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; from subprocess import *
&gt;&gt;&gt; p = Popen([&apos;python&apos;, &apos;-c&apos;, &apos;import sys;print(sys.executable)&apos;], shell=True, stdin=PIPE,stdout=PIPE,stderr=PIPE, env={&apos;PATH&apos;:&apos;/tmp/zzz/bin&apos;})
&gt;&gt;&gt; stdout,stderr = p.communicate(None)
&gt;&gt;&gt; print(stdout)
b&apos;&apos;
&gt;&gt;&gt; print(stderr)
b&apos;&apos;
&gt;&gt;&gt; p = Popen([&apos;python&apos;, &apos;-c&apos;, &apos;import sys;print(sys.executable)&apos;], stdin=PIPE,stdout=PIPE,stderr=PIPE, env={&apos;PATH&apos;:&apos;/tmp/zzz/bin&apos;})
&gt;&gt;&gt; stdout,stderr = p.communicate(None)
&gt;&gt;&gt; print(stdout)
b&apos;/tmp/zzz/bin/python\n&apos;
&gt;&gt;&gt; print(stderr)
b&apos;&apos;
&gt;&gt;&gt; 
......

So seems python would not pass environment to subprocess executes if shell=True is set?

I think my patch is kinda shoring up the oe terminal class to fit all hosts settings, and harmless, am I right?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68952</commentid>
    <comment_count>4</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-12-08 16:39:49 +0000</bug_when>
    <thetext>Probably worth checking if this occurs on a fresh Ubuntu 14.04 install as well.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73014</commentid>
    <comment_count>5</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-05-03 18:05:30 +0000</bug_when>
    <thetext>Many people at our site are seeing this error. We&apos;ve applied Ming&apos;s fix and it works for us. I&apos;m not sure why some users see it and some don&apos;t. On my Ubuntu 14.04.5 LTS install I don&apos;t see the issue but several other people do. Has this been accepted or is more verification needed to accept the fix?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73020</commentid>
    <comment_count>6</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2017-05-03 20:01:07 +0000</bug_when>
    <thetext>I use Ubuntu 14.04 in a container, everything works fine for me. 
Can you please try the following?

$ which oe-gnome-terminal-phonehome

On my system oe-gnome-terminal-phonehome is found:
/workdir/poky/scripts/oe-gnome-terminal-phonehome

BTW, are you using &quot;poky&quot;?
What is the output of your $PATH?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73026</commentid>
    <comment_count>7</comment_count>
    <who name="Jonathan Richardson">jon.richardson</who>
    <bug_when>2017-05-04 00:01:54 +0000</bug_when>
    <thetext>Yes we&apos;re using poky. 

$ which oe-gnome-terminal-phonehome
/home/jonathar/work/yocto/project/poky/scripts/oe-gnome-terminal-phonehome

$ echo $PATH
/home/jonathar/work/yocto/project/poky/scripts:/home/jonathar/work/yocto/project/poky/bitbake/bin:/home/jonathar/bin:/home/jonathar/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77332</commentid>
    <comment_count>8</comment_count>
    <who name="">philschenker</who>
    <bug_when>2017-10-04 09:24:10 +0000</bug_when>
    <thetext>I also stumbled upon this bug. I have a fresh installation of Ubuntu 14.04.5 LTS.
Mings solution worked for me.

pschenker@yocto-vm:~/yocto/poky/build$ echo $PATH
/home/pschenker/yocto/poky/scripts:/home/pschenker/yocto/poky/bitbake/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin

pschenker@yocto-vm:~/yocto/poky/build$ which oe-gnome-terminal-phonehome 
/home/pschenker/yocto/poky/scripts/oe-gnome-terminal-phonehome

pschenker@yocto-vm:~/yocto/poky/build$ python --version
Python 2.7.6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77560</commentid>
    <comment_count>9</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2017-10-13 00:35:28 +0000</bug_when>
    <thetext>I&apos;m not getting to this defect so I&apos;ve assigned it to Kai.
Once we get the 2.4 release out the door in a week or two, can you take the attached patch and get it into master, then backported to 2.4/2.3 please? If anyone else wants to send the attached patch to the oe-core list, please go ahead and just make note of that here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77561</commentid>
    <comment_count>10</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2017-10-13 00:56:48 +0000</bug_when>
    <thetext>(In reply to comment #9)
&gt; I&apos;m not getting to this defect so I&apos;ve assigned it to Kai.
&gt; Once we get the 2.4 release out the door in a week or two, can you take the
&gt; attached patch and get it into master, then backported to 2.4/2.3 please? If
&gt; anyone else wants to send the attached patch to the oe-core list, please go
&gt; ahead and just make note of that here.

Got it. I&apos;ll do it right after 2.4 release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77563</commentid>
    <comment_count>11</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2017-10-13 06:07:50 +0000</bug_when>
    <thetext>Ming Liu will take over this defect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78257</commentid>
    <comment_count>12</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-11-16 16:20:07 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c6987478313b12cbd174c816bc07cf27f727f091</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>