Multi-Process Correlation for Sockets¶
Where multiple processes communicate via sockets, debugging may involve following data between processes. If both sender and receiver are recorded using LiveRecorder, the send and receive operations can be correlated. When loaded in UDB it is then possible to jump from the location of data being received in one process to the point where it was sent from the other process.
Warning
Multi-Process Correlation for Sockets is an experimental feature which is subject to limitations and may be changed or removed without notice in future releases.
Recording multiple processes¶
To enable the additional logging required for Multi-Process Correlation for
Sockets to operate, the UNDO_experimental_mpc_sockets
environment
variable must be set when using LiveRecorder.
The --record-on program
option to
live-record can be useful to record multiple processes when they are
started from a common point, such as a launcher script.
The recordings must be gathered into a single directory in order for UDB to
locate them. All recordings must be named with a .undo
extension.
Working with multiple processes in UDB¶
Start UDB and load the recording which showed the failure.
Notify UDB about the other recordings, using uexperimental load-correlation.
Start debugging as normal. If the trail leads to some data which arrived via a socket, use uexperimental ugo sender to go to the point where that data was sent.
It is also possible to jump to specific times in other processes using ugo inferior, and to check the status of all the loaded recordings using info inferiors.
Limitations¶
Due to the experimental nature of Multi-Process Correlation for Sockets, some capabilities are not supported. Please contact Undo Support if these limitations affect your ability to use the feature.
Loading multiple recordings at once is memory-intensive, and you may experience slow replay or out-of-memory errors.
Correlation across IPv6 sockets is not supported.
Only TCP and UDP socket types are supported.
32-bit programs which use the old-style system call API (
socketcall
) are not supported.All the programs being recorded must be built for the same CPU architecture as the machine where UDB runs. There is no support for using the replay service to debug non-native architecture programs when using Multi-Process Correlation for Sockets.
uexperimental load-correlation DIRECTORY¶
Load correlation information from the recordings in the specified directory.
Files with names ending
.undo
are assumed to be recordings.
uexperimental ugo sender¶
Identify the most recent time in the current inferior where socket data was received, and jump to the inferior and time where that data was sent. The recording of the destination inferior is loaded if necessary.
If there are multiple corresponding locations, no jump is performed; instead the locations are listed with the commands to jump to each one.
uexperimental ugo receiver¶
Identify the most recent time in the current inferior where socket data was sent, and jump to the inferior and time where that data was received. The recording of the destination inferior is loaded if necessary.
If there are multiple corresponding locations, no jump is performed; instead the locations are listed with the commands to jump to each one.