Actions
Bug #741
closedPossible regression: tracing forking processes
Start date:
02/26/2014
Due date:
% Done:
0%
Estimated time:
Description
Found this problem while investigating bug #598. It seems that applications that call "fork" are not traced.
See the following reproduction steps based on the lttng-tools/tests/regression/ust/fork/ test.
This patch must be applied to make sure the "fork" executable waits on "fork2".
[~/src/lttng-tools]$ ldd ./tests/regression/ust/fork/fork linux-vdso.so.1 (0x00007fff8beb2000) liblttng-ust-fork.so.0 => /usr/lib/liblttng-ust-fork.so.0 (0x00007f2c5cb4a000) liblttng-ust.so.0 => /usr/lib/liblttng-ust.so.0 (0x00007f2c5c900000) liblttng-ust-tracepoint.so.0 => /usr/lib/liblttng-ust-tracepoint.so.0 (0x00007f2c5c6e7000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f2c5c4df000) liburcu-bp.so.3 => /usr/lib/liburcu-bp.so.3 (0x00007f2c5c2d8000) liburcu-cds.so.3 => /usr/lib/liburcu-cds.so.3 (0x00007f2c5c0d1000) liburcu-common.so.3 => /usr/lib/liburcu-common.so.3 (0x00007f2c5bece000) libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f2c5bcca000) libpopt.so.0 => /usr/lib/libpopt.so.0 (0x00007f2c5babe000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f2c5b8a1000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f2c5b4f9000) /lib64/ld-linux-x86-64.so.2 (0x00007f2c5cd4c000) [~/src/lttng-tools]$ lttng create fork_test Spawning a session daemon Session fork_test created. Traces will be written in /home/jgalar/lttng-traces/fork_test-20140226-110021 [~/src/lttng-tools]$ lttng enable-event -u -a All UST events are enabled in channel channel0 [~/src/lttng-tools]$ lttng start Tracing started for session fork_test [~/src/lttng-tools]$ ./tests/regression/ust/fork/fork tests/regression/ust/fork/fork2 parent_pid 26641 child_pid 26673 IN FORK2 [~/src/lttng-tools]$ lttng stop Waiting for data availability. Tracing stopped for session fork_test [~/src/lttng-tools]$ lttng destroy Session fork_test destroyed [~/src/lttng-tools]$ babeltrace ~/lttng-traces/fork_test-20140226-110021/ [~/src/lttng-tools]$ echo $? 0
The resulting trace is empty, yet the metadata contains all of fork and fork2's events.
Updated by David Goulet over 10 years ago
- Status changed from New to Invalid
Cleaning issue with latest libraries/daemon, this can't be reproduce on my side and confirmed by jgalar that it was indeed an issue of cleaning up and recompiling the toolchain.
Introduced by commit: 4bc5e7c56ff8e70ac916717ad790e322deb40570
Actions