<?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>14404</bug_id>
          
          <creation_ts>2021-05-21 18:11:18 +0000</creation_ts>
          <short_desc>&quot;Bitbake still alive&quot; for an extremely long time (arm host pthread issue?)</short_desc>
          <delta_ts>2022-02-03 15:59:48 +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>Scripts and Tools</component>
          <version>3.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>AB-INT</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>4.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jon Mason">jon.mason</reporter>
          <assigned_to name="Ross Burton">ross.burton</assigned_to>
          <cc>alexandre.belloni</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tvgamblin</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>90463</commentid>
    <comment_count>0</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2021-05-21 18:11:18 +0000</bug_when>
    <thetext>Multiple instances of bitbake running forever (until cancelled), with logs like:

Bitbake still alive (5000s)
Bitbake still alive (10000s)
Bitbake still alive (15000s)
Bitbake still alive (20000s)
Bitbake still alive (25000s)
Bitbake still alive (30000s)


Examples are:
https://autobuilder.yoctoproject.org/typhoon/#/builders/96/builds/1781/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/95/builds/1926/steps/13/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/95/builds/1916/steps/12/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/97/builds/2753/steps/12/logs/stdio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90495</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2021-05-27 14:48:06 +0000</bug_when>
    <thetext>First three AB reports are due to LTP hanging. Solved by disabling some LTP tests.

The fourth is due to the python global interpreter lock only on Arm builder.
Ross to check with some toolchain people he knows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>90496</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2021-05-27 14:48:56 +0000</bug_when>
    <thetext>RP did some digging:

Dumping state on this failure/lockup:

https://autobuilder.yoctoproject.org/typhoon/#/builders/97/builds/2753

Was locked up in eSDK testing of core-image-minimal in execution of
&quot;devtool sdk-install meta-extsdk-toolchain&quot;.

python was sitting in pthread_cond_wait()

no other processes, no active fds that were interesting.

In the end I broke the lock in gdb which resulted in:

NOTE: Starting bitbake server...
Loading cache...done.
Loaded 0 entries from dependency cache.
Parsing recipes...done.
Parsing of 825 .bb files complete (0 cached, 825 parsed). 1459 targets, 53 skipped, 0 masked, 0 errors.
INFO: meta-extsdk-toolchain is already installed
Fatal Python error: drop_gil: PyCOND_WAIT(gil-&gt;switch_cond) failed
Python runtime state: finalizing (tstate=0xaaab08055150)
Current thread 0x0000ffffb6bae010 (most recent call first):
  File &quot;/home/pokybuild/yocto-worker/qemuarm64-armhost/build/build/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/testsdkext/buildtools/sysroots/aarch64-pokysdk-linux/usr/lib/python3.9/_weakrefset.py&quot;, line 39 in _remove
Aborted (core dumped)


i.e. it was sitting waiting on the python GIL.

Looks like a pthread bug.

pthreads being used were:

/home/pokybuild/yocto-worker/qemuarm64-armhost/build/build/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/testsdkext/buildtools/sysroots/aarch64-pokysdk-linux/lib/libpthread.so.0

i.e. *our* pthreads (and our python3.9).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92460</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2022-02-03 15:59:48 +0000</bug_when>
    <thetext>Only seen once so closing for now.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>