Project

General

Profile

Actions

Bug #1110

closed

Fork() test 12 from Linux Test Project fails when traced with userspace events; events are miscounted

Added by Ricardo Nabinger Sanchez almost 7 years ago. Updated almost 7 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
05/22/2017
Due date:
% Done:

0%

Estimated time:

Description

While tracing fork12 test from LTP, the test failed unexpectedly.

LTTng-ust master as of d9ab33856fd7bef5b598c9b6a47309b3bf9b06f2.

Steps to reproduce:

git clone https://github.com/linux-test-project/ltp.git
cd ltp
make autotools
./configure
make

Then, when running as root, the test will abort if the problem is triggered:

lttng create
lttng enable-channel -u chan_ust
lttng enable-channel -k chan_kernel
lttng add-context -u -t vpid -t ip -t procname -t vtid -c chan_ust
lttng enable-event -u -a -c chan_ust
lttng enable-event -k -c chan_kernel --syscall --all
lttng start
LD_PRELOAD=liblttng-ust-dl.so:liblttng-ust-fork.so:liblttng-ust-fd.so ./fork12

After forcibly stopping the test (^C), errors are reported and events could be miscounted when issuing lttng stop:

[warning] 9223372037047268318 events discarded, please refer to the documentation on channel configuration.

When running with blocking, the test still fails but the counting seems possible (events could have been indeed lost during PID starvation, which is what this test does):

ltp/testcases/kernel/syscalls/fork# LTTNG_UST_BLOCKING_RETRY_TIMEOUT=-1 LD_PRELOAD=liblttng-ust-fd.so:liblttng-ust-fork.so:liblttng-ust-dl.so:liblttng-ust-libc-wrapper.so ./fork12
fork12      0  TINFO  :  Forking as many kids as possible
fork12      0  TINFO  :  Number of processes forked is 10717
fork12      1  TPASS  :  fork() eventually failed with 11: Resource temporarily unavailable
  (system pauses for a while after creating forking-havoc; test seems to get stuck, so a ^C is sent)
^Cfork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      2  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      2  TBROK  :  fork12.c:132: Remaining cases broken
fork12      3  TBROK  :  fork12.c:132: Remaining cases broken
fork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      2  TBROK  :  fork12.c:132: Remaining cases broken
fork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      2  TBROK  :  fork12.c:132: Remaining cases broken
fork12      1  TBROK  :  fork12.c:132: Unexpected signal 2 received.
fork12      2  TBROK  :  fork12.c:132: Remaining cases broken
fork12      2  TBROK  :  fork12.c:132: Remaining cases broken
(many more...)

When stopping collection:

[warning] 184368 events discarded, please refer to the documentation on channel configuration.

Actions

Also available in: Atom PDF