[RFC PATCH 0/3] implement dlmopen hooks for gdb

Conan Huang (conhuang) conhuang@cisco.com
Thu Jul 2 13:54:49 GMT 2020


The only crash we saw was the promotion of RTLD_GLOBAL flag in secondary 
namespace.  Apart from that we didn't notice any other crashes or dlsym failures.

However, we did noticed a design limitation with static TLS. Where shared objects
with static TLS can quickly use up static TLS block reserved by the loader. This
usually isn't a problem since only a few core libraries have static TLS and they are
not dlopened. However, during each dlmopen these core libraries like libc are
loaded and its static TLS uses up valuable space in static TLS block.  Resulting to:

	libc.so.6: cannot allocate memory in static TLS block

We are currently looking at how this can be enhanced. Maybe you guys already 
have discussions around this issue.


On 2020-06-26, 9:11 PM, "Daniel Walker (danielwa)" <danielwa@cisco.com> wrote:

    On Fri, Jun 26, 2020 at 11:30:12PM +0200, Florian Weimer wrote:
    > * Daniel Walker via Libc-alpha:
    > 
    > > Also included in this are a couple of fixes which went along with the
    > > original implementation.
    > 
    > Have you seen crashes as the result of dlopen or dlsym failures in
    > secondary namespaces?

    ++ Conan

    Conan has done the most work on this, and I think he's working on it in terms of
    the product usage. I neglected to include him on this cover email. I've added
    him to this email hopefully he can respond.

    Daniel



More information about the Libc-alpha mailing list