Containerized Dynamic Linker for Safe Shared Library Unloading
Find Innovative SolutionsGenerate 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
Engineering Contradiction Analysis
1Reliability
If shared libraries are unloaded in existing RPC frameworks, then resource cleanup is achieved, but segmentation faults occur causing system instability
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
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
2Reliability
If containers are created and destroyed for each library unload, then segmentation faults are avoided, but system complexity increases
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
Data Source
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.


