<?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>15641</bug_id>
          
          <creation_ts>2024-11-05 15:34:38 +0000</creation_ts>
          <short_desc>BB_CONSOLELOG is overwritten on 2nd+ runs when using memory resident BitBake</short_desc>
          <delta_ts>2026-06-17 15:24:35 +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>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>6.1 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yoann Congal">yoann.congal</reporter>
          <assigned_to name="Antonin Godard">antonin.godard</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100112</commentid>
    <comment_count>0</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2024-11-05 15:34:38 +0000</bug_when>
    <thetext>When using &quot;memory resident BitBake&quot;, the BB_CONSOLELOG is read from config when the server starts but, on the runs after that, any BB_CONSOLELOG config will be overwritten by the value read at the server start.


How to reproduce:

In local.conf
  BB_SERVER_TIMEOUT = &quot;-1&quot;
  BB_CONSOLELOG = &quot;${LOG_DIR}/XXX.log&quot;

Ensure there is no resident bitbake server:
  bitbake --kill-server

Read BB_CONSOLELOG:
  bitbake-getvar BB_CONSOLELOG
  =&gt; XXX.log

Change BB_CONSOLELOG:
  BB_CONSOLELOG = &quot;${LOG_DIR}/YYY.log&quot;

Re-read BB_CONSOLELOG:
  bitbake-getvar BB_CONSOLELOG
  =&gt; XXX.log
# Here I was expecting YYY.log

Restart bitbake to &quot;fix&quot; this:
  bitbake --kill-server
  bitbake-getvar BB_CONSOLELOG
  =&gt; YYY.log


Note: this may be by design, the code is in
https://git.openembedded.org/bitbake/tree/lib/bb/cooker.py#n290:
        if consolelog:
            self.data.setVar(&quot;BB_CONSOLELOG&quot;, consolelog)

In any case, this behavior should be documented</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100123</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-11-07 15:37:32 +0000</bug_when>
    <thetext>This is by design so that failures, when disconnected, go somewhere.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102199</commentid>
    <comment_count>2</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2025-06-06 07:45:01 +0000</bug_when>
    <thetext>Bulk move of bugs I am assigned to from Milestone 5.2 to 5.3M1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105777</commentid>
    <comment_count>3</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-06-09 09:06:55 +0000</bug_when>
    <thetext>Yoann, I was reading this and was wondering how you actually start a &quot;memory resident BitBake&quot;. I tried starting bitbake with --server-only but it eventually dies. Is there a way to have the bitbake server run permanently?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105785</commentid>
    <comment_count>4</comment_count>
    <who name="Yoann Congal">yoann.congal</who>
    <bug_when>2026-06-09 12:18:14 +0000</bug_when>
    <thetext>(In reply to Antonin Godard from comment #3)
&gt; Yoann, I was reading this and was wondering how you actually start a &quot;memory
&gt; resident BitBake&quot;. I tried starting bitbake with --server-only but it
&gt; eventually dies. Is there a way to have the bitbake server run permanently?

I don&apos;t play with &quot;--server-only&quot;.
For me &quot;memory resident BitBake&quot; is a normal bitbake run with BB_SERVER_TIMEOUT != 0

Use &quot;-1&quot; for infinite timeout but I usually set it to 60 to save on parsing time in bitbake call sequence but not leave idle bb processes too long. 

See: https://docs.yoctoproject.org/ref-manual/variables.html#term-BB_SERVER_TIMEOUT</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105796</commentid>
    <comment_count>5</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-06-10 08:30:08 +0000</bug_when>
    <thetext>Hi Yoann, I see thanks, I was able to reproduce the issue. There&apos;s also the -T parameter for controlling the timeout FWIW. I just sent a patch to document this behavior :)
https://lore.kernel.org/r/20260610-bb-console-log-persistent-v1-1-5430d24061c3@bootlin.com</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105908</commentid>
    <comment_count>6</comment_count>
    <who name="Antonin Godard">antonin.godard</who>
    <bug_when>2026-06-17 15:24:35 +0000</bug_when>
    <thetext>Patch merged: https://git.openembedded.org/bitbake/commit/?id=b8bb48ed585d40ffa456744d74290d10fe186b85</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>