[ltt-dev] Crash in lttv-0.12.12
Mathieu Desnoyers
compudj at krystal.dyndns.org
Fri May 15 08:42:47 EDT 2009
And here is the offending code :
eventhooks.c :
int before_execmode_hook_trap(void *hook_data, void *call_data)
if (tfc->tf->name != LTT_CHANNEL_KERNEL)
return 0;
minfo = marker_get_info_from_id(tfc->tf->mdata, e->event_id);
g_assert(minfo != NULL);
if (minfo->name == LTT_EVENT_TRAP_ENTRY
|| minfo->name == LTT_EVENT_PAGE_FAULT_ENTRY
|| minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY) {
trap = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
} else if (minfo->name == LTT_EVENT_TRAP_EXIT
|| minfo->name == LTT_EVENT_PAGE_FAULT_EXIT
|| minfo->name == LTT_EVENT_PAGE_FAULT_NOSEM_EXIT) {
trap = ts->cpu_states[cpu].last_trap;
} else
return 0;
guint trace_num = ts->parent.index;
/* Well, the process_out existed : we must get it in the process hash
* or add it, and draw its items.
*/
/* Add process to process list (if not present) */
guint pl_height = 0;
HashedResourceData *hashed_process_data = NULL;
ProcessList *process_list = resourceview_data->process_list;
hashed_process_data = resourcelist_obtain_trap(resourceview_data, trace_num, trap);
we end up calling resourcelist_obtain_trap() with a trap id of -1.
I bet the trace first has a trap exit event, without any prior trap
entry. Therefore, the last_trap is probably set to -1, which is used as
trap id.
I fixed it in LTTV 0.12.14. It seems to work fine for me now.
I also took care of fixing the irq and softirq code, which has the same
problem.
Mathieu
* Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> Hi Gregory,
>
> It's a bug in the resource view. I will put Pierre-Marc in CC, since he
> maintains this view.
>
> Thanks for the report,
>
> Mathieu
>
> * Gregory Haskins (gregory.haskins at gmail.com) wrote:
> > Hi Mathieu, ltt-devs,
> >
> > Found this on lttv-0.12.12 against 30-rc5-0.136 trace data when I try to
> > open the RV.
> >
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x00007ffff15048a2 in draw_closure ()
> > from /usr/lib64/lttv/plugins/libresourceview.so
> > Current language: auto; currently asm
> > (gdb) bt
> > #0 0x00007ffff15048a2 in draw_closure ()
> > from /usr/lib64/lttv/plugins/libresourceview.so
> > #1 0x00007ffff751de5d in g_hash_table_foreach ()
> > from /usr/lib64/libglib-2.0.so.0
> > #2 0x00007ffff1507776 in after_chunk ()
> > from /usr/lib64/lttv/plugins/libresourceview.so
> > #3 0x000000000040db97 in lttv_hooks_call ()
> > #4 0x00007ffff45f7739 in execute_events_requests ()
> > from /usr/lib64/liblttvwindow.so.0
> > #5 0x00007ffff752c0fb in g_main_context_dispatch ()
> > from /usr/lib64/libglib-2.0.so.0
> > #6 0x00007ffff752f8cd in ?? () from /usr/lib64/libglib-2.0.so.0
> > #7 0x00007ffff752fdfd in g_main_loop_run () from
> > /usr/lib64/libglib-2.0.so.0
> > #8 0x00007ffff6253a17 in gtk_main () from /usr/lib64/libgtk-x11-2.0.so.0
> > #9 0x00007ffff45f3666 in window_creation_hook ()
> > from /usr/lib64/liblttvwindow.so.0
> > #10 0x000000000040db97 in lttv_hooks_call ()
> > #11 0x000000000040c3c3 in main ()
> >
> > I uploaded the trace and coredump here:
> >
> > ftp://ftp.novell.com/dev/ghaskins/lttv-0.12.12-crash.tar.bz2
> >
> > and the binary I used can be found here:
> >
> > http://download.opensuse.org/repositories/home://ghaskins://lttng/openSUSE_11.1/x86_64/lttv-0.12.12-3.1.x86_64.rpm
> >
> > Note that this seems specific to this particular trace. RV opens fine
> > for most other traces I try.
> >
> > Let me know if there is anything I can do to help or provide more info.
> >
> > -Greg
> >
>
>
>
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
>
> --
> 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