mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: David Sharp <dhsharp@google.com>
Cc: linux-kernel@vger.kernel.org, mrubin@google.com,
	chavey@google.com, Gregory Haskins <gregory.haskins@gmail.com>
Subject: Re: [PATCH] trace-cmd: fix length calculation for padding events
Date: Thu, 26 Jan 2012 22:44:33 -0500	[thread overview]
Message-ID: <1327635873.22710.113.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1327633215-4013-1-git-send-email-dhsharp@google.com>

On Thu, 2012-01-26 at 19:00 -0800, David Sharp wrote:
> Padding events store size in bytes, not words. Usually this ends up pushing
> the parser off the current page, but occasionally not, and when not,
> it ends up desynchronizing the parser from the event stream. This would
> manifest as a lot of "ug!" messages from trace-cmd, and kernelshark
> crashing before displaying the UI.
> 

Nice! Funny, Gregory (Cc'd) sent me a trace.dat file that exhibited this
behavior. I was going to look into it tomorrow. I tried it with this
patch and it makes the bug go away.

Nice catch!  I wonder how long this has been around without notice?
Probably from day one.

-- Steve

> Signed-off-by: David Sharp <dhsharp@google.com>
> ---
>  trace-input.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/trace-input.c b/trace-input.c
> index e3157a7..b6af1e6 100644
> --- a/trace-input.c
> +++ b/trace-input.c
> @@ -1458,7 +1458,6 @@ translate_data(struct pevent *pevent,
>  	switch (type_len) {
>  	case RINGBUF_TYPE_PADDING:
>  		*length = data2host4(pevent, *ptr);
> -		*length *= 4;
>  		*ptr += *length;
>  		break;
>  



  reply	other threads:[~2012-01-27  3:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-27  3:00 David Sharp
2012-01-27  3:44 ` Steven Rostedt [this message]
2012-01-27 19:21   ` David Sharp
2012-01-27 19:31     ` 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=1327635873.22710.113.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=chavey@google.com \
    --cc=dhsharp@google.com \
    --cc=gregory.haskins@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrubin@google.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®