<?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>7138</bug_id>
          
          <creation_ts>2015-01-14 10:09:16 +0000</creation_ts>
          <short_desc>bitbake -e with knotty spins if stdout is paginated</short_desc>
          <delta_ts>2015-01-23 14:26:22 +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>BitBake</product>
          <component>bitbake</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>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Magnus Olsson">magnus</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</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>47900</commentid>
    <comment_count>0</comment_count>
    <who name="Magnus Olsson">magnus</who>
    <bug_when>2015-01-14 10:09:16 +0000</bug_when>
    <thetext>I often use &quot;bitbake -e core-image-minimal | less&quot; to interactively grep for variable values etc. 

While &apos;less&apos; is blocking stdout, bitbake will use 100% CPU on one core until I scroll to the end of output (or quit &apos;less&apos; to break the pipe).

This is not a big deal, but if you like me keep one of these less-invokations running while writing recipes (to review variables), the CPU fan on my laptop will go nuts.

I use bitbake 1.22, but I was also able to reproduce this on bitbake master (1ea658dcdfde5465d3ecdb97550e0a66cb8b122e as of writing, 2015-01-14).

I expect bitbake with knotty UI to behave like other console programs, such as:

   python -c &apos;while True: print(&quot;foo&quot;)&apos;  | less

.. which consumes no CPU while being blocked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48156</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-21 16:39:12 +0000</bug_when>
    <thetext>Some notes on this. If you specify bitbake -t xmlrpc, the system doesn&apos;t show the problem. Its therefore something to do with the process backend.

It appears the cooker is trying to send an event to the client and the client is blocked sending data to the terminal. This leads to the event queue using a processor.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48161</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-21 17:44:34 +0000</bug_when>
    <thetext>I think I found the problem, a bogus fd in a select call. Patch on the bitbake list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48226</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-01-23 14:26:22 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=793f2f2e69cf3e4ef57a13f07538226b082cf868</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>