[Bug dynamic-link/29600] New: dlmopen hangs after loading certain libraries

al_95 at outlook dot it sourceware-bugzilla@sourceware.org
Thu Sep 22 14:33:12 GMT 2022


https://sourceware.org/bugzilla/show_bug.cgi?id=29600

            Bug ID: 29600
           Summary: dlmopen hangs after loading certain libraries
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: al_95 at outlook dot it
  Target Milestone: ---

Created attachment 14351
  --> https://sourceware.org/bugzilla/attachment.cgi?id=14351&action=edit
dlmopen test

Hi.
I discovered a regression bug in dlmopen introduced with the fix to bug 29528.
Certain libraries seem to leave the dynamic loader namespaces in an
inconsistent state, causing all subsequent dlmopen calls to hang.
The hang happens at the for loop inside the _dl_debug_initialize function in
dl-open.c, when it iterates through the namespaces linked list.

This issue happens only after loading certain libraries, but not others.
I attached a small program that exhibits this issue on my pc.
After libcurl is loaded (and unloaded) any following call to dlmopen will
freeze.
Moving the order around doesn't change much, except when libcurl is loaded
first, then somehow everything works.
A few other libraries I tested that cause this behavior are libstdc++,
libavcodec and libssl, but there are probably more.

The issue appeared with commit 924e4f3eaa502ce82fccf8537f021a796d158771 (and
the correlated d0e357ff45a75553dee3b17ed7d303bfa544f6fe) and is still present
in the latest commit (de477abcaaabb1f9815cb63876637a47a95e7ac1).

According to the messages in bug 29528, the changes were also applied to
version 2.35 and 2.34, so it's possible those are broken too.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list