[ltt-dev] Kernel crashes when creating a trace

Mathieu Desnoyers mathieu.desnoyers at polymtl.ca
Thu Nov 12 23:24:53 EST 2009


* Ashwin Tanugula (ashwin.tanugula at broadcom.com) wrote:
> Hi Mathieu,
>  
> >Can you also try with a return 1; at the beginning of
> 
> >trace_clock_async_tsc_read ?
> 
> I added "return 1;" to trace_clock_async_tsc_read and removed it from get_trace_clock and put_trace_clock functions.
> 
> And, it does not hang, but the kernel crashes when I try to stop tracing and destroy the channels.
> 
> Here is the what I have in the script. (debugfs is mounted)
> 
[...]
         ...
> Call Trace:
> [<80237684>] ltt_chanbuf_free+0x50/0x2cc
> [<802491a8>] kref_put+0xdc/0x128
> [<80237958>] ltt_chanbuf_release_read+0x58/0x124
> [<8023a864>] ltt_release+0x20/0x34
> [<800c6cdc>] __fput+0xec/0x21c
> [<800c253c>] filp_close+0x5c/0xa4
> [<800c40f0>] sys_close+0xc8/0x1a4
> [<8000339c>] stack_done+0x20/0x3c
> 

Ah ! good. I've seen something like this on my laptop last week, but
could not reproduce it. I pinpointed the cause of this error by adding
some ssleep() to ltt_chanbuf_free to enlarge the race window.

Can you try this fix ?

lttng fix relay vfs

Fix file close bug: should not delete structures there.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at polymtl.ca>
---
 ltt/ltt-relay-vfs.c |    3 ---
 1 file changed, 3 deletions(-)

Index: linux-2.6-lttng/ltt/ltt-relay-vfs.c
===================================================================
--- linux-2.6-lttng.orig/ltt/ltt-relay-vfs.c	2009-11-12 23:19:10.000000000 -0500
+++ linux-2.6-lttng/ltt/ltt-relay-vfs.c	2009-11-12 23:19:36.000000000 -0500
@@ -55,10 +55,7 @@ end:
 static int ltt_release(struct inode *inode, struct file *file)
 {
 	struct ltt_chanbuf *buf = inode->i_private;
-	struct ltt_chan *chan = container_of(buf->a.chan, struct ltt_chan, a);
 
-	ltt_ascii_remove(chan);
-	debugfs_remove(buf->a.dentry);
 	ltt_chanbuf_release_read(buf);
 
 	return 0;


-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68




More information about the lttng-dev mailing list