* Yannick Brosseau ([email protected]) wrote: > The SIGKILL part fail on my computer. >
On mine too. Nils, it looks like 0.13 introduced this regression (the short life-span process). I suspect it might be an interaction between your tweak to get online pids and this test-case that triggers the problem. Can you look into that ? In any case, the sessiond design will solve this by adding synchronization between the app constructor and sessiond. It might not come for a few weeks still, so we might want to disable the test and put a big comment in the test list telling that the problem is known, that we are working on it, and giving the ETA. Thanks, Mathieu > Here's the ust-consumerd.log > > libust[7359/7395]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7396]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7395]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7397]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7397]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7393]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7393]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7398]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7400]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7398]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > libust[7359/7399]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7394]: Warning: unable to connect to process, it probably > died before we were able to connect (in connect_buffer() at > libustconsumer.c:321) > libust[7359/7394]: Error: failed to connect to buffer (in > consumer_thread() at libustconsumer.c:578) > > > On 2011-05-17 10:50, Nils Carlson wrote: > > and merged. > > > > /Nils > > > > On 05/17/2011 03:48 PM, Mathieu Desnoyers wrote: > >> * Nils Carlson ([email protected]) wrote: > >>> A fast-exit test-case that just writes one marker and exits, > >>> tests that the consumer daemon maps the buffers before the > >>> program exits. Exiting is tested both by normal return > >>> and by commiting suicide (SIGKILL to self). > >>> > >>> Signed-off-by: Nils Carlson<[email protected]> > >> Thanks! > >> > >> Acked-by: Mathieu Desnoyers<[email protected]> > >> > >>> --- > >>> .gitignore | 1 + > >>> configure.ac | 1 + > >>> tests/Makefile.am | 2 +- > >>> tests/exit-fast/Makefile.am | 5 ++++ > >>> tests/exit-fast/exit-fast.c | 39 > >>> +++++++++++++++++++++++++++++++++++ > >>> tests/exit-fast/exit-fast.sh | 46 > >>> ++++++++++++++++++++++++++++++++++++++++++ > >>> tests/runtests | 2 + > >>> 7 files changed, 95 insertions(+), 1 deletions(-) > >>> create mode 100644 tests/exit-fast/Makefile.am > >>> create mode 100644 tests/exit-fast/exit-fast.c > >>> create mode 100755 tests/exit-fast/exit-fast.sh > >>> > >>> diff --git a/.gitignore b/.gitignore > >>> index 4bc3814..5d1d9cd 100644 > >>> --- a/.gitignore > >>> +++ b/.gitignore > >>> @@ -40,3 +40,4 @@ tests/test-nevents/prog > >>> tests/trace_event/trace_event_test > >>> tests/tracepoint/benchmark/tracepoint_benchmark > >>> tests/tracepoint/tracepoint_test > >>> +tests/exit-fast/exit-fast > >>> diff --git a/configure.ac b/configure.ac > >>> index 1f3cb33..00df0c0 100644 > >>> --- a/configure.ac > >>> +++ b/configure.ac > >>> @@ -165,6 +165,7 @@ AC_CONFIG_FILES([ > >>> tests/tracepoint/benchmark/Makefile > >>> tests/register_test/Makefile > >>> tests/libustctl_function_tests/Makefile > >>> + tests/exit-fast/Makefile > >>> libustinstr-malloc/Makefile > >>> libustfork/Makefile > >>> libustconsumer/Makefile > >>> diff --git a/tests/Makefile.am b/tests/Makefile.am > >>> index e4e06ce..43fb203 100644 > >>> --- a/tests/Makefile.am > >>> +++ b/tests/Makefile.am > >>> @@ -1,4 +1,4 @@ > >>> -SUBDIRS = . hello hello2 basic basic_long fork simple_include > >>> snprintf test-nevents test-libustinstr-malloc dlopen > >>> same_line_marker trace_event register_test tracepoint > >>> libustctl_function_tests > >>> +SUBDIRS = . hello hello2 basic basic_long fork simple_include > >>> snprintf test-nevents test-libustinstr-malloc dlopen > >>> same_line_marker trace_event register_test tracepoint > >>> libustctl_function_tests exit-fast > >>> > >>> dist_noinst_SCRIPTS = test_loop runtests trace_matches > >>> > >>> diff --git a/tests/exit-fast/Makefile.am b/tests/exit-fast/Makefile.am > >>> new file mode 100644 > >>> index 0000000..d34fbc2 > >>> --- /dev/null > >>> +++ b/tests/exit-fast/Makefile.am > >>> @@ -0,0 +1,5 @@ > >>> +AM_CPPFLAGS = -I$(top_srcdir)/include > >>> + > >>> +noinst_PROGRAMS = exit-fast > >>> +exit_fast_SOURCES = exit-fast.c > >>> +exit_fast_LDADD = $(top_builddir)/libust/libust.la > >>> $(top_builddir)/libust-initializer.o > >>> diff --git a/tests/exit-fast/exit-fast.c b/tests/exit-fast/exit-fast.c > >>> new file mode 100644 > >>> index 0000000..84bb0c5 > >>> --- /dev/null > >>> +++ b/tests/exit-fast/exit-fast.c > >>> @@ -0,0 +1,39 @@ > >>> +/* Copyright (C) 2011 Nils Carlson > >>> + * > >>> + * This library is free software; you can redistribute it and/or > >>> + * modify it under the terms of the GNU Lesser General Public > >>> + * License as published by the Free Software Foundation; either > >>> + * version 2.1 of the License, or (at your option) any later version. > >>> + * > >>> + * This library is distributed in the hope that it will be useful, > >>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of > >>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > >>> + * Lesser General Public License for more details. > >>> + * > >>> + * You should have received a copy of the GNU Lesser General Public > >>> + * License along with this library; if not, write to the Free Software > >>> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > >>> 02110-1301 USA > >>> + */ > >>> + > >>> +/* This test generates a single event and exits. > >>> + */ > >>> + > >>> +#include<signal.h> > >>> +#include<string.h> > >>> +#include<ust/ust.h> > >>> + > >>> +int main(int argc, char *argv[]) > >>> +{ > >>> + int suicide = 0; > >>> + > >>> + if (argc> 1&& !strcmp(argv[1], "suicide")) { > >>> + suicide = 1; > >>> + } > >>> + > >>> + ust_marker(fast, "%d", 0xf330); > >>> + > >>> + if (suicide) { > >>> + kill(getpid(), SIGKILL); > >>> + } > >>> + return 0; > >>> +} > >>> diff --git a/tests/exit-fast/exit-fast.sh > >>> b/tests/exit-fast/exit-fast.sh > >>> new file mode 100755 > >>> index 0000000..d10af57 > >>> --- /dev/null > >>> +++ b/tests/exit-fast/exit-fast.sh > >>> @@ -0,0 +1,46 @@ > >>> +#!/bin/bash > >>> +# > >>> +# Copyright 2011 Ericsson AB > >>> +# > >>> +# This file is part of the UST test-suite. > >>> +# > >>> +# The UST test-suite is free software: you can redistribute it > >>> and/or modify > >>> +# it under the terms of the GNU General Public License as > >>> published by > >>> +# the Free Software Foundation, either version 2 of the License, or > >>> +# (at your option) any later version. > >>> +# > >>> +# The UST test-suite is distributed in the hope that it will be > >>> useful, > >>> +# but WITHOUT ANY WARRANTY; without even the implied warranty of > >>> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > >>> +# GNU General Public License for more details. > >>> +# > >>> +# You should have received a copy of the GNU General Public License > >>> +# along with the UST test-suite. If not, > >>> see<http://www.gnu.org/licenses/>. > >>> + > >>> +TESTDIR=$(dirname $0)/.. > >>> + > >>> +source $TESTDIR/test_functions.sh > >>> +source $TESTDIR/tap.sh > >>> + > >>> +starttest "Exit-Fast" > >>> + > >>> +plan_tests 6 > >>> +USTTRACE="$TESTDIR/../usttrace" > >>> + > >>> +diag "#" > >>> +diag "First run, normal exit" > >>> +diag "#" > >>> + > >>> +okx $USTTRACE -L $TESTDIR/exit-fast/exit-fast > >>> +trace_loc=$($USTTRACE -W) > >>> +trace_matches -N "fast" -n 1 "^ust.fast:" $trace_loc > >>> +check_trace_logs "$trace_loc" > >>> + > >>> +diag "#" > >>> +diag "Re-running, killing process" > >>> +diag "#" > >>> + > >>> +okx $USTTRACE -L $TESTDIR/exit-fast/exit-fast suicide > >>> +trace_loc=$($USTTRACE -W) > >>> +trace_matches -N "fast" -n 1 "^ust.fast:" $trace_loc > >>> +check_trace_logs "$trace_loc" > >>> diff --git a/tests/runtests b/tests/runtests > >>> index f686249..36ad12d 100755 > >>> --- a/tests/runtests > >>> +++ b/tests/runtests > >>> @@ -48,6 +48,8 @@ simple_harness_run > >>> same_line_marker/same_line_marker.sh > >>> > >>> simple_harness_run libustctl_function_tests/libustctl_function_tests > >>> > >>> +simple_harness_run exit-fast/exit-fast.sh > >>> + > >>> echo "************************************" > >>> if [[ $tests_failed -eq 0 ]]; then > >>> echo "$0: All passed" > >>> -- > >>> 1.7.2.5 > >>> > >>> > >>> _______________________________________________ > >>> ltt-dev mailing list > >>> [email protected] > >>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > >>> > > > > > > _______________________________________________ > > ltt-dev mailing list > > [email protected] > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > > > _______________________________________________ > ltt-dev mailing list > [email protected] > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev > -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
