From: "孙世龙 sunshilong" <sunshilong369@gmail.com>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: kernelnewbies <Kernelnewbies@kernelnewbies.org>
Subject: Re: How can I investigate the cause of "watchdog: BUG: soft lockup"?
Date: Sat, 4 Jul 2020 15:51:08 +0800 [thread overview]
Message-ID: <CAAvDm6ZWWgzR9qha4JS5=CSR5Gxm5SgpYKiNAYh+rY7xJOEjuQ@mail.gmail.com> (raw)
In-Reply-To: <36373.1593837553@turing-police>
Hi, Valdis Klētnieks
Thank you for your generous help.
My understanding of this matter is on a different level with your help.
>>Jul 3 10:23:31 yx kernel: [ 1176.166058] watchdog: BUG: soft lockup -
>>CPU#0 stuck for 22s! [rt_cansend:1837]
>>Jul 3 10:23:31 yx kernel: [ 1176.166066] Modules linked in:
>>......
>>Jul 3 10:23:31 yx kernel: [ 1176.166252] Call Trace:
>>Jul 3 10:23:31 yx kernel: [ 1176.166261] _raw_spin_lock+0x20/0x30
>>Jul 3 10:23:31 yx kernel: [ 1176.166270] can_write+0x6c/0x2c0 [advcan]
>>
>You get into function can_write() in module advcan.
>That tries to take a spinlock, while something else already has it.
Can I draw the conclusion that continually acquiring the spinlock
causes the soft
lockup and the CPU has been stuck for 22s?
Can I think in this way?
Thank you for your attention to this matter.
Best Regards.
Valdis Klētnieks <valdis.kletnieks@vt.edu> 于2020年7月4日周六 下午12:39写道:
>
> > Could you please give me some hint on how to investigate the cause deeply?
>
> Shortening the call trace to the relevant lines:
>
> > Jul 3 10:23:31 yx kernel: [ 1176.166252] Call Trace:
> > Jul 3 10:23:31 yx kernel: [ 1176.166261] _raw_spin_lock+0x20/0x30
> > Jul 3 10:23:31 yx kernel: [ 1176.166270] can_write+0x6c/0x2c0 [advcan]
> > Jul 3 10:23:31 yx kernel: [ 1176.166292] __vfs_write+0x3a/0x190
>
> You get into function can_write() in module advcan.
>
> That tries to take a spinlock, while something else already has it.
>
> The spinlock call is (roughly) 15% of the way through the function can_write().
>
> The 'modules linked in' list includes "advcan(OE)".
>
> The 'O' tells us it's an out-of-tree module, which means you need to talk to
> whoever wrote the module and find out why it's hanging on a spin lock (most
> likely something else is failing to release it).
>
> And that's about as far as we can hint, since we don't have the source for your
> out-of-tree module. If the people who wrote it would clean it up and get it
> into the base Linux tree, then we'd all have access to it and be able to help
> in much greater detail.
>
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
next prev parent reply other threads:[~2020-07-04 7:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 2:20 How can I investigate the cause of "watchdog: BUG: soft lockup"? 孙世龙 sunshilong
2020-07-04 4:39 ` Valdis Klētnieks
2020-07-04 7:51 ` 孙世龙 sunshilong [this message]
2020-07-04 8:09 ` Valdis Klētnieks
2020-07-04 9:04 ` 孙世龙 sunshilong
2020-07-04 9:13 ` 孙世龙 sunshilong
2020-07-08 5:19 ` 孙世龙 sunshilong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAvDm6ZWWgzR9qha4JS5=CSR5Gxm5SgpYKiNAYh+rY7xJOEjuQ@mail.gmail.com' \
--to=sunshilong369@gmail.com \
--cc=Kernelnewbies@kernelnewbies.org \
--cc=valdis.kletnieks@vt.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).