<?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>13182</bug_id>
          
          <creation_ts>2019-02-15 02:19:36 +0000</creation_ts>
          <short_desc>Inconsistency detected by ld.so: dl-open.c: 274: dl_open_worker: Assertion xxx failed</short_desc>
          <delta_ts>2024-03-07 16:28:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>oe-selftest</component>
          <version>2.7</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>jatedev</cc>
    
    <cc>randy.macleod</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>83013</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2019-02-15 02:19:36 +0000</bug_when>
    <thetext>Sometimes I met the following failure.

2019-02-15 07:00:34,309 - oe-selftest - INFO - ======================================================================
2019-02-15 07:00:34,310 - oe-selftest - INFO - FAIL: test_bmap_long (wic.Wic2)
2019-02-15 07:00:34,310 - oe-selftest - INFO - ----------------------------------------------------------------------
2019-02-15 07:00:34,310 - oe-selftest - INFO - Traceback (most recent call last):
  File &quot;/buildarea5/chenqi/SWAT/poky/meta/lib/oeqa/core/decorator/__init__.py&quot;, line 32, in wrapped_f
    return func(*args, **kwargs)
  File &quot;/buildarea5/chenqi/SWAT/poky/meta/lib/oeqa/selftest/cases/wic.py&quot;, line 540, in test_bmap_long
    runCmd(cmd)
  File &quot;/buildarea5/chenqi/SWAT/poky/meta/lib/oeqa/utils/commands.py&quot;, line 194, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, exc_output))
AssertionError: Command &apos;wic create wictestdisk -e core-image-minimal --bmap -o /buildarea5/chenqi/SWAT/poky/build-selftest/wic-tmp/&apos; returned non-zero exit status 1:
INFO: Building wic-tools...

ERROR: Unable to start bitbake server (None)
ERROR: Server log for this session (/buildarea5/chenqi/SWAT/poky/build-selftest/bitbake-cookerdaemon.log):
--- Starting bitbake server pid 28374 at 2019-02-15 06:22:12.487122 ---
Entering server connection loop
Accepting [&lt;socket.socket fd=7, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0, laddr=bitbake.sock&gt;] ([])
[snip]
Inconsistency detected by ld.so: dl-open.c: 274: dl_open_worker: Assertion `_dl_debug_initialize (0, args-&gt;nsid)-&gt;r_state == RT_CONSISTENT&apos; failed!

The key error message is this dl-open.c assertion failure.

Please see some additional information here. Hope it would be helpful.
I googled and found the following commit in glibc:
commit ccdb048df457d581f6ac7ede8b0c7a593a891dfa
Author: Carlos O&apos;Donell &lt;carlos@systemhalted.org&gt;
Date:   Wed Jan 21 01:51:10 2015 -0500

    Fix recursive dlopen.
    
    The ability to recursively call dlopen is useful for malloc
    implementations that wish to load other dynamic modules that
    implement reentrant/AS-safe functions to use in their own
    implementation.
    
    Given that a user malloc implementation may be called by an
    ongoing dlopen to allocate memory the user malloc
    implementation interrupts dlopen and if it calls dlopen again
    that&apos;s a reentrant call.
    
    This patch fixes the issues with the ld.so.cache mapping
    and the _r_debug assertion which prevent this from working
    as expected.
    
    See:
    https://sourceware.org/ml/libc-alpha/2014-12/msg00446.html

The commit seems related. But our glibc has included this commit. And we are using glibc from uninative-tarball.

The current glibc&apos;s codes still have a _dl_debug_initialize assertion in dl_open_worker.
  /* It was already open.  */
  if (__glibc_unlikely (new-&gt;l_searchlist.r_list != NULL))
    {
      /* Let the user know about the opencount.  */
      if (__glibc_unlikely (GLRO(dl_debug_mask) &amp; DL_DEBUG_FILES))
        _dl_debug_printf (&quot;opening file=%s [%lu]; direct_opencount=%u\n\n&quot;,
                          new-&gt;l_name, new-&gt;l_ns, new-&gt;l_direct_opencount);

      /* If the user requested the object to be in the global namespace
         but it is not so far, add it now.  */
      if ((mode &amp; RTLD_GLOBAL) &amp;&amp; new-&gt;l_global == 0)
        (void) add_to_global (new);

      assert (_dl_debug_initialize (0, args-&gt;nsid)-&gt;r_state == RT_CONSISTENT);

      return;
    }</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83062</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-02-21 15:38:50 +0000</bug_when>
    <thetext>Qi, we&apos;ve left this defect with you. Can you summarize to the list and CC Khem who may have some ideas on how to proceed. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>85574</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2019-11-19 16:29:03 +0000</bug_when>
    <thetext>Seems to be a rare bug so it&apos;s not urgent. Set target to M3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92675</commentid>
    <comment_count>3</comment_count>
    <who name="Jate Sujjavanich">jatedev</who>
    <bug_when>2022-02-25 15:37:20 +0000</bug_when>
    <thetext>I saw this error message on dunfell 3.1.3. It seemed to go away after I changed some build settings, so I did not investigate further. It was intermittent.

The environment was ubuntu 16.04 under docker.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98426</commentid>
    <comment_count>4</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-03-07 16:28:42 +0000</bug_when>
    <thetext>Not seen in a long time. Obsolete.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>