Containerized Dynamic Linker for Safe Shared Library Unloading

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing RPC frameworks face segmentation faults when unloading shared libraries, which can impact the stability and reliability of microservices-based applications.

Innovation Solution

The implementation of a containerized dynamic linker/loader (libld.so) and a target shared library, managed by a dynamic link interceptor module, allows for safe unloading of shared libraries by creating and destroying containers, thereby avoiding segmentation faults.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If shared libraries are unloaded in existing RPC frameworks, then resource cleanup is achieved, but segmentation faults occur causing system instability

Engineering Contradiction:
Improvesystem stabilityVSAvoidsegmentation faults
Core Design Contradiction:
ReliabilityVSObject-generated harmful factors

Solution Approach 1:

The system is divided into isolated container environments, where each container holds a copy of the dynamic linker and shared libraries. This segmentation allows independent unloading of libraries within containers without affecting the host system, preventing segmentation faults from propagating and ensuring system stability during resource cleanup operations

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Containers act as intermediary layers between the host application and the shared libraries. The dynamic link interceptor module manages these container intermediaries, allowing safe unloading of libraries through the container boundary while preventing harmful segmentation faults from reaching the host system

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If containers are created and destroyed for each library unload, then segmentation faults are avoided, but system complexity increases

Engineering Contradiction:
Improveerror preventionVSAvoidcontainer management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The container infrastructure is designed as a universal, reusable component that can be created and destroyed multiple times for different library unloading operations. The dynamic link interceptor module provides multi-functional capabilities by managing container lifecycles, intercepting library unload requests, and coordinating resource cleanup across multiple operations, thereby managing complexity through standardized interfaces

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS12020043B2Using containers to clean runtime resources when unloading a shared library
Publication Date: 2024.06.25 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US12020043B2 patent drawing
  • US12020043B2 patent drawing
  • US12020043B2 patent drawing

AI summary

Embodiments of the invention include a computer-implemented method that includes accessing, using a processor, a loader library; using the processor to generate a mock library comprising a mock version of the loader library; using the processor to containerize the loader library; and using the processor to unload the loader library.