2017-11-07 20:33:16

by Richard Genoud

[permalink] [raw]
Subject: Re: Soft lockup in rt2x00usb_work_rxdone()

2017-11-07 9:53 GMT+01:00 Stanislaw Gruszka <[email protected]>:
> Hi
Hi !
>
> On Mon, Nov 06, 2017 at 04:57:09PM +0100, Richard Genoud wrote:
>> I get a soft lock-up while unbinding the USB driver on a TP-Link TL-WN727Nv3 (chipset 5370):
>>
>> # echo 1-2.2 > /sys/bus/usb/drivers/usb/unbind
>> watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [kworker/u2:3:308]
> ...
>> I can trigger this each time.
>
> I can not reproduce this on my system (I'm using 4.14.0-rc6, but I don't
> think it's an issue). I think the problem may be caused by usb
> host controler driver, which can be different on your system.
>
> Does ftrace work on your platform ? If so could you use ftrace
> to provide rt2x00 functions trace when the probllem happen ?
>
> 3 short articles how to configure and use ftrace are here:
> https://lwn.net/Articles/365835/
> https://lwn.net/Articles/366796/
> https://lwn.net/Articles/370423/
>
I tried with ftrace, but I don't think there's a way to dump the trace
when there's a soft lock-up
(I can't do anything after the unbind, even the heartbeat led stopped blinking).
I saw the /proc/sys/kernel/ftrace_dump_on_oops file, but there's no
/proc/sys/kernel/ftrace_dump_on_soft_lock-up file :)

Or I missed something in ftrace ?

Thanks !
Richard.

> Thanks
> Stanislaw

From 1583411428565936848@xxx Tue Nov 07 12:46:51 +0000 2017
X-GM-THRID: 1583337302329883239
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread


2017-11-07 12:13:04

by Stanislaw Gruszka

[permalink] [raw]
Subject: Re: Soft lockup in rt2x00usb_work_rxdone()


On Tue, Nov 07, 2017 at 11:06:39AM +0100, Richard Genoud wrote:
> > 3 short articles how to configure and use ftrace are here:
> > https://lwn.net/Articles/365835/
> > https://lwn.net/Articles/366796/
> > https://lwn.net/Articles/370423/
> >
> I tried with ftrace, but I don't think there's a way to dump the trace
> when there's a soft lock-up
> (I can't do anything after the unbind, even the heartbeat led stopped blinking).
> I saw the /proc/sys/kernel/ftrace_dump_on_oops file, but there's no
> /proc/sys/kernel/ftrace_dump_on_soft_lock-up file :)

You should configure function trace with rt2x* functions. After that
start tracing, unbind the device, then stop tracing and provide trace
output.

Thanks
Stanislaw

From 1583406270234660771@xxx Tue Nov 07 11:24:52 +0000 2017
X-GM-THRID: 1583337302329883239
X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread