User Thread Core Dump via u_fork Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing fork-and-kill method for generating core dumps in computer systems is limited when applied to multithreaded processes, as it only captures the registers of the calling thread, leaving the registers of other threads unavailable in the core dump.
Innovation Solution
The implementation of a user thread management module that provides a u_fork function to create a new child process with all user threads, allowing for a core dump that includes all threads by modifying the thread-and-kill method to use fork instead of u_fork, ensuring all user threads are presented in the core dump.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If the traditional fork-and-kill method is used to generate core dumps, then the process can be monitored without terminating it, but only the registers of the calling thread are captured, leaving other threads' registers unavailable
Solution Approach 1:
The patent segments the thread management by introducing a separate user thread management module that independently handles thread copying. The u_fork function creates a child process with all user threads by copying thread structures from the parent process, ensuring complete thread state capture while maintaining the non-blocking monitoring capability
Solution Approach 2:
The patent uses copying to replicate all user threads in the child process. The u_fork function copies thread structures, registers, and execution states from the parent process to the child process, enabling complete capture of multithreaded state information in the core dump without terminating the original process
2Loss of information
If the u_fork function is used to create a child process with all user threads, then complete thread state capture is achieved, but the device complexity increases due to the user thread management module
Solution Approach 1:
The user thread management module performs multiple functions: it manages user threads, creates child processes with all threads via u_fork, and enables complete core dump capture. By consolidating these functions into a single module, the patent reduces overall system complexity while achieving comprehensive thread state capture
Data Source
AI summary
In a computer system, a memory dump of a multi-threaded process can be created to contain information on all the threads without terminating the process, if the process uses user threads.


