Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Bijan Tabatabai <bijan311@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-trace-devel@vger.kernel.org, Bijan Tabatabai <bijan311@yahoo.com>
Subject: Re: [PATCH v3] trace-cmd: Stop recording when processes traced with -P exit
Date: Wed, 13 May 2020 20:25:46 -0500
Message-ID: <CAMvvPS5j1nGMiQKcayppfijkxjeyNQK0cUHq6LZAghVSLvA3mQ@mail.gmail.com> (raw)
In-Reply-To: <20200513161633.0ef67ea2@gandalf.local.home>

I just tried that and discovered an interesting problem.
After the first sleep ended, my computer completely locked up, and
after a few minutes I decided to reset my computer.
Then after rebooting, I checked out the master branch, recompiled, and
tried running the same set of commands again.
This time, my computer locked up shortly after I pressed Ctrl+C after
both sleeps exited.
I am running Ubuntu 20.04 with Ubuntu's version of the 5.4 kernel.

Is this a bug that has been reported before? If not, what is the
process for "officially" reporting it?

Thank,
Bijan

On Wed, May 13, 2020 at 3:16 PM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> On Wed, 13 May 2020 12:05:29 -0500
> Bijan Tabatabai <bijan311@gmail.com> wrote:
>
> > From: Bijan Tabatabai <bijan311@yahoo.com>
> >
> > When the -F flag is used in trace-cmd record, trace-cmd stops recording
> > when the executable it is tracing terminates.
> > This patch makes the -P flag act similarly.
> >
> > Signed-off-by: Bijan Tabatabai <bijan311@yahoo.com>
> > ---
> >  This patch has changed to use the pidfd interface to determine if a process
> >  has ended.
> >  It also has changed to work with the patch "trace-cmd: Handle filtered PIDs per
> >  ftarce instance" (5502bcef0f962cda).
> > ---
> >  tracecmd/include/trace-local.h |  2 +
> >  tracecmd/trace-record.c        | 84 ++++++++++++++++++++++++++++++++++
> >  2 files changed, 86 insertions(+)
> >
>
> Nice!
>
> Although I just tried it out and noticed that if I run the following
> command:
>
>  # sleep 20& sleep 50&
> [1] 2216
> [2] 2218
>  # trace-cmd record -e sched -P 2216 -B foo -e all -P 2218
>
> It will exit out after the first sleep (20 second) and before the second is
> done.
>
> It appears to exit as soon as the first process is finished. We should want
> to wait till the last one is finished.
>
> -- Steve

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 17:05 Bijan Tabatabai
2020-05-13 20:16 ` Steven Rostedt
2020-05-14  1:25   ` Bijan Tabatabai [this message]
2020-05-14  2:23     ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMvvPS5j1nGMiQKcayppfijkxjeyNQK0cUHq6LZAghVSLvA3mQ@mail.gmail.com \
    --to=bijan311@gmail.com \
    --cc=bijan311@yahoo.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org
	public-inbox-index linux-trace-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git