strace for troubleshooting inter process communication
1
vote
1
answer
1312
views
I have output captured by following command:
strace -f -e trace=process,socketpair,open,close,dup,dup2,read,write -o rsync.log rsync -avcz --progress src/ dst/
it is a bit long so I've uploaded it here . I understand basic format of strace
output, for example following line:
1399 open("/lib/x86_64-linux-gnu/libpopt.so.0", O_RDONLY|O_CLOEXEC) = 3
Means that:
1. 1399
is PID of process
2. open(const char *pathname, int flags);
is system call with
particular arguments (taken from man 2 open
)
3. 3
is the return value, a file descriptor in this particular case (taken from
man 2 open
)
According to this thread:
> rsync
spawns two processes/threads to do the copy, and there's one
> stream data between the processes, and another from the receiving
> process to the target file.
>
> Using something like `strace -e
> trace=process,socketpair,open,read,write` would show some threads
> spawned off, the socket pair being created between them, and different
> threads opening the input and output files.
Can I somehow parse strace
output to being able confirm statements from mentioned thread and see what happens under the hood, even if I'm not very familiar with inter process communication? I'm especially interested in data passing between processes/threads (how much data were passed from process1 to process2? where does the process2 wrote the received data?)
I've also seen lines like this one in log but I do not know how to correctly interpret them:
1399 ) = 0
1400 ) = 0
Asked by Wakan Tanka
(825 rep)
Jun 22, 2016, 01:57 PM
Last activity: Jun 13, 2023, 01:08 PM
Last activity: Jun 13, 2023, 01:08 PM