From mboxrd@z Thu Jan 1 00:00:00 1970 From: jeromezhr@gmail.com (jerome zh) Date: Fri, 14 May 2010 21:27:55 +0800 Subject: [ltt-dev] Cannot destroy trace In-Reply-To: References: <20100511120011.GB17304@Krystal> Message-ID: 2010/5/11 jerome zh > 2010/5/11 Mathieu Desnoyers > >> * jerome zh (jeromezhr at gmail.com) wrote: >> > Hi all, >> > >> > I have modified the original lttng kernel patch to fit my RT-linux >> patched >> > 2.6.30 kernel. And IMHO the kernel now works fine. >> > Everything seems OK until I run "lttctl -D trace1", the process became >> > "blocking like"(I am not sure if it is blocked). >> > The last msg printed on the screen is "lttctl: Destroying trace". >> > Then I added some debug message into the liblttctl.c file. As a result, >> the >> > process was "blocked" while executing >> > *write(fd, op, strlen(op))* in function *lttctl_sendop()*. >> > >> > Any advice? Thanks in advance. >> >> Can you try with the following patch ? >> >> >> lttng fix rt kernel teardown deadlock >> >> LTTng has a teardown bug on RT (deadlock): >> >> Deleting a timer (sync) while holding the traces mutex, and the handler >> takes >> the same mutex, which leads to a deadlock. >> >> Fix this by taking a RCU read lock in the timer (instead of the >> RT-specific fix >> using the mutex), and by doing synchronize_rcu() in addition to >> synchronize_sched() upon updates. >> >> --- >> > > >> >> -- >> >> Mathieu Desnoyers >> Operating System Efficiency R&D Consultant >> EfficiOS Inc. >> http://www.efficios.com >> > > > Thanks! > I will try this patch and let you know if it works on my board. > > -- > Regards, > > Jerome > Hey Mathieu, The problem has been solved! Thanks! -- Regards, Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: jeromezhr@gmail.com (jerome zh) Date: Fri, 14 May 2010 21:27:55 +0800 Subject: [ltt-dev] Cannot destroy trace In-Reply-To: References: <20100511120011.GB17304@Krystal> Message-ID: Message-ID: <20100514132755.q_YxtshmpC8cwBFLc8o5oYzXbBViM2X0mleU3oUPVwU@z> 2010/5/11 jerome zh > 2010/5/11 Mathieu Desnoyers > >> * jerome zh (jeromezhr at gmail.com) wrote: >> > Hi all, >> > >> > I have modified the original lttng kernel patch to fit my RT-linux >> patched >> > 2.6.30 kernel. And IMHO the kernel now works fine. >> > Everything seems OK until I run "lttctl -D trace1", the process became >> > "blocking like"(I am not sure if it is blocked). >> > The last msg printed on the screen is "lttctl: Destroying trace". >> > Then I added some debug message into the liblttctl.c file. As a result, >> the >> > process was "blocked" while executing >> > *write(fd, op, strlen(op))* in function *lttctl_sendop()*. >> > >> > Any advice? Thanks in advance. >> >> Can you try with the following patch ? >> >> >> lttng fix rt kernel teardown deadlock >> >> LTTng has a teardown bug on RT (deadlock): >> >> Deleting a timer (sync) while holding the traces mutex, and the handler >> takes >> the same mutex, which leads to a deadlock. >> >> Fix this by taking a RCU read lock in the timer (instead of the >> RT-specific fix >> using the mutex), and by doing synchronize_rcu() in addition to >> synchronize_sched() upon updates. >> >> --- >> > > >> >> -- >> >> Mathieu Desnoyers >> Operating System Efficiency R&D Consultant >> EfficiOS Inc. >> http://www.efficios.com >> > > > Thanks! > I will try this patch and let you know if it works on my board. > > -- > Regards, > > Jerome > Hey Mathieu, The problem has been solved! Thanks! -- Regards, Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: jeromezhr@gmail.com (jerome zh) Date: Fri, 14 May 2010 21:27:55 +0800 Subject: [ltt-dev] Cannot destroy trace In-Reply-To: References: <20100511120011.GB17304@Krystal> Message-ID: Message-ID: <20100514132755.pm4WIq-qHKyixRNg_Nwd2sqGKnH9mi6OZof9QTAF3sI@z> 2010/5/11 jerome zh > 2010/5/11 Mathieu Desnoyers > >> * jerome zh (jeromezhr at gmail.com) wrote: >> > Hi all, >> > >> > I have modified the original lttng kernel patch to fit my RT-linux >> patched >> > 2.6.30 kernel. And IMHO the kernel now works fine. >> > Everything seems OK until I run "lttctl -D trace1", the process became >> > "blocking like"(I am not sure if it is blocked). >> > The last msg printed on the screen is "lttctl: Destroying trace". >> > Then I added some debug message into the liblttctl.c file. As a result, >> the >> > process was "blocked" while executing >> > *write(fd, op, strlen(op))* in function *lttctl_sendop()*. >> > >> > Any advice? Thanks in advance. >> >> Can you try with the following patch ? >> >> >> lttng fix rt kernel teardown deadlock >> >> LTTng has a teardown bug on RT (deadlock): >> >> Deleting a timer (sync) while holding the traces mutex, and the handler >> takes >> the same mutex, which leads to a deadlock. >> >> Fix this by taking a RCU read lock in the timer (instead of the >> RT-specific fix >> using the mutex), and by doing synchronize_rcu() in addition to >> synchronize_sched() upon updates. >> >> --- >> > > >> >> -- >> >> Mathieu Desnoyers >> Operating System Efficiency R&D Consultant >> EfficiOS Inc. >> http://www.efficios.com >> > > > Thanks! > I will try this patch and let you know if it works on my board. > > -- > Regards, > > Jerome > Hey Mathieu, The problem has been solved! Thanks! -- Regards, Jerome -------------- next part -------------- An HTML attachment was scrubbed... URL: