[ltt-dev] Kernel crashes when creating a trace
Mathieu Desnoyers
mathieu.desnoyers at polymtl.ca
Mon Nov 16 23:46:53 EST 2009
* Mathieu Desnoyers (mathieu.desnoyers at polymtl.ca) wrote:
> * Ashwin Tanugula (ashwin.tanugula at broadcom.com) wrote:
> > Hi Matheiu,
> >
> > I tested with the "return 1;" at the beginning of trace_clock_async_tsc_read
> >
> > I am able to generate the trace, but I cannot view it. (tried it many times, even tried hybrid mode and flight mode)
> >
> > Here is what I am using
> >
> > lttv lttv-0.12.20-12112009
> > ltt-control ltt-control-0.75-15112009
> > ltt-patch patch-2.6.31.6-lttng-0.170
> >
> > I am getting the following error(s)
> >
>
> OK, I think I found the problem. Can you re-try this with lttng 0.172,
> lttv 0.12.21 ?
>
And can you try with this patch on top of 0.172 for the MIPS32 trace
clock ?
mips trace clock fix order
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
---
arch/mips/kernel/trace-clock.c | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
Index: linux-2.6-lttng/arch/mips/kernel/trace-clock.c
===================================================================
--- linux-2.6-lttng.orig/arch/mips/kernel/trace-clock.c 2009-11-16 23:35:55.000000000 -0500
+++ linux-2.6-lttng/arch/mips/kernel/trace-clock.c 2009-11-16 23:45:17.000000000 -0500
@@ -138,15 +138,15 @@ void get_trace_clock(void)
{
int cpu;
- get_synthetic_tsc();
spin_lock(&async_tsc_lock);
- if (async_tsc_refcount++ || tsc_is_sync())
- goto end;
-
- async_tsc_enabled = 1;
- for_each_online_cpu(cpu)
- enable_trace_clock(cpu);
-end:
+ if (async_tsc_refcount++ || tsc_is_sync()) {
+ get_synthetic_tsc();
+ } else {
+ async_tsc_enabled = 1;
+ get_synthetic_tsc();
+ for_each_online_cpu(cpu)
+ enable_trace_clock(cpu);
+ }
spin_unlock(&async_tsc_lock);
}
EXPORT_SYMBOL_GPL(get_trace_clock);
@@ -157,15 +157,14 @@ void put_trace_clock(void)
spin_lock(&async_tsc_lock);
WARN_ON(async_tsc_refcount <= 0);
- if (async_tsc_refcount != 1 || !async_tsc_enabled)
- goto end;
-
- for_each_online_cpu(cpu)
- disable_trace_clock(cpu);
- async_tsc_enabled = 0;
-end:
+ if (async_tsc_refcount != 1 || !async_tsc_enabled) {
+ put_synthetic_tsc();
+ } else {
+ for_each_online_cpu(cpu)
+ disable_trace_clock(cpu);
+ async_tsc_enabled = 0;
+ }
async_tsc_refcount--;
spin_unlock(&async_tsc_lock);
- put_synthetic_tsc();
}
EXPORT_SYMBOL_GPL(put_trace_clock);
> Thanks,
>
> Mathieu
>
> > 1)
> >
> > $ lttv-gui -t tmp/trace1
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event udpv4_rcv_extended: kernel 32, LTTV 28
> > aborting...
> > /usr/local/bin/lttv-gui: line 10: 13467 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> >
> > 2)
> >
> > $ lttv-gui -t trace3
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> > trace3: No such file or directory
> >
> > ** (lttv.real:13427): WARNING **: cannot open trace trace3
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event udpv4_rcv_extended: kernel 32, LTTV 28
> > aborting...
> > /usr/local/bin/lttv-gui: line 10: 13427 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> > 3)
> >
> > $ lttv/lttv/lttv-gui -t trace1
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 4, LTTV 0
> > aborting...
> > lttv/lttv/lttv-gui: line 10: 11485 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> > 4)
> > $ lttv-gui -t trace1
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 4, LTTV 0
> > aborting...
> > /usr/local/bin/lttv-gui: line 10: 13102 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> > 5)
> > $ lttv-gui -t trace2
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 8, LTTV 0
> > aborting...
> > /usr/local/bin/lttv-gui: line 10: 13137 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> > 6)
> > $ lttv-gui -t trace3
> > Xlib: extension "RANDR" missing on display ":0.0".
> > ** Message: statistics viewer : background computation data ready.
> >
> > ** ERROR **: Kernel/LTTV event size differs for event (null): kernel 8, LTTV 0
> > aborting...
> > /usr/local/bin/lttv-gui: line 10: 13143 Aborted (core dumped) $LTTV_CMD.real -m lttvwindow -m guievents -m guifilter -m guicontrolflow -m resourceview -m guistatistics -m guitracecontrol $*
> >
> >
> > Thanks,
> > Ashwin
> >
> > -----Original Message-----
> > From: Mathieu Desnoyers [mailto:mathieu.desnoyers at polymtl.ca]
> > Sent: Monday, November 16, 2009 10:36 AM
> > To: Ashwin Tanugula
> > Cc: ltt-dev at lists.casi.polymtl.ca
> > Subject: Re: Kernel crashes when creating a trace
> >
> > Hi Ashwin,
> >
> > I spent the last 3 days stress-testing lttng with concurrent:
> >
> > - cpu hotplug
> > - trace start/stop
> > - marker armall/disarmall
> >
> > For minutes and fixed all the problems I encountered.
> >
> > The reason why I had a hard time reproducing your error scenario was that the right timing occurs on UP systems.
> >
> > All the fixes are integrated in LTTng 0.170. I am very confident that things will work fine now. Please keep testing with the "return 1;" for the MIPS trace clock, at it is not fixed yet.
> >
> > Thanks,
> >
> > Mathieu
> >
> >
> >
>
> --
> Mathieu Desnoyers
> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
More information about the lttng-dev
mailing list