From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Sumit Gemini <sumit.gemini0@gmail.com>
Cc: Petr Mladek <pmladek@suse.com>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
sergey.senozhatsky@gmail.com, sergey.senozhatsky.work@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: Watchdog detected hard lockup.
Date: Thu, 18 May 2017 16:31:25 +0900 [thread overview]
Message-ID: <20170518073125.GA458@jagdpanzerIV.localdomain> (raw)
In-Reply-To: <CAD6qDH4cw1BSHpHoqzFGYkcxBJcFy=AjjoYuY1-a+HAwgDDY1g@mail.gmail.com>
Hello Sumit,
please Cc kernel mailing list.
Cc Petr, Peter, Steven, kernel-list
On (05/18/17 12:22), Sumit Gemini wrote:
> Hi Sergey,
>
> I read your comment on [1]https://lkml.org/lkml/2016/9/27/279. Here you were talking about using alt_printk instead of printk.
> I Got this crash, could this crash related to call printk recursively?
> Could you please tell me why i got this crash? Do you see any suspicious entry here?
>
> [2324956.184374] Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 1
> [2324956.184374] Pid: 0, comm: kworker/0:0 Tainted: P 3.1.10-gb20-default #1
> [2324956.184374] Call Trace:
> [2324956.184374] [<ffffffff81003add>] dump_trace+0x98/0x223
> [2324956.184374] [<ffffffff813dc659>] dump_stack+0x69/0x6f
> [2324956.184374] [<ffffffff813def08>] panic+0xa4/0x1b4
> [2324956.184374] [<ffffffff81094b48>] watchdog_overflow_callback+0x79/0x9e
> [2324956.184374] [<ffffffff810b66b5>] __perf_event_overflow+0xf9/0x185
> [2324956.184374] [<ffffffff81010a2c>] intel_pmu_handle_irq+0x15d/0x1be
> [2324956.184374] [<ffffffff813f375b>] perf_event_nmi_handler+0x3e/0x87
> [2324956.184374] [<ffffffff813f4c0f>] notifier_call_chain+0x2e/0x5b
> [2324956.184374] [<ffffffff813f4c76>] __atomic_notifier_call_chain+0x3a/0x4d
> [2324956.184374] [<ffffffff813f4cc1>] notify_die+0x2d/0x32
> [2324956.184374] [<ffffffff813f2bbb>] default_do_nmi+0x29/0x1b5
> [2324956.184374] [<ffffffff813f2eb7>] do_nmi+0x47/0x6f
> [2324956.184374] [<ffffffff813f2a30>] nmi+0x20/0x30
> [2324956.184374] [<ffffffff8106b725>] arch_local_irq_save+0x1/0x17
> [2324956.184374] [<ffffffff813f1e9b>] _raw_spin_lock_irqsave+0xf/0x39
> [2324956.184374] [<ffffffff8105d9b7>] down_trylock+0xb/0x29
> [2324956.184374] [<ffffffff810409c2>] console_trylock+0xf/0x47
> [2324956.184374] [<ffffffff81040dc9>] console_unlock+0x100/0x129
> [2324956.184374] [<ffffffff8104120b>] vprintk+0x348/0x394
> [2324956.184374] [<ffffffff813df06b>] printk+0x53/0x58
> [2324956.184374] [<ffffffff81359902>] ip_handle_martian_source+0x6d/0xf6
> [2324956.184374] [<ffffffff8135b980>] ip_route_input_slow+0x45d/0x462
> [2324956.184374] [<ffffffff8135c02f>] ip_route_input_common+0x217/0x231
> [2324956.184374] [<ffffffff8137e995>] arp_process+0x181/0x4ac
> [2324956.184374] [<ffffffff81337bf5>] __netif_receive_skb+0x317/0x36b
> [2324956.184374] [<ffffffff81337b44>] __netif_receive_skb+0x266/0x36b
> [2324956.184374] [<ffffffff81339722>] netif_receive_skb+0x7e/0x84
> [2324956.184374] [<ffffffff8133979e>] napi_skb_finish+0x1c/0x31
> [2324956.184374] [<ffffffffa02e1dee>] igb_clean_rx_irq+0x30d/0x39e [igb]
> [2324956.184374] [<ffffffffa02e1ecd>] igb_poll+0x4e/0x74 [igb]
> [2324956.184374] [<ffffffff81339c88>] net_rx_action+0x65/0x178
> [2324956.184374] [<ffffffff81045c73>] __do_softirq+0xb2/0x19d
> [2324956.184374] [<ffffffff813f9aac>] call_softirq+0x1c/0x30
> [2324956.184374] [<ffffffff81003931>] do_softirq+0x3c/0x7b
> [2324956.184374] [<ffffffff81045f98>] irq_exit+0x3c/0xac
> [2324956.184374] [<ffffffff81003655>] do_IRQ+0x82/0x98
> [2324956.184374] [<ffffffff813f24ee>] common_interrupt+0x6e/0x6e
> [2324956.184374] [<ffffffff8123f91d>] intel_idle+0xdd/0x104
> [2324956.184374] [<ffffffff8130b76b>] cpuidle_idle_call+0xdf/0x181
> [2324956.184374] [<ffffffff81001201>] cpu_idle+0x56/0xa9
>
> I shell be very greatful to you.
>
your CPU1 couldn't acquire console_sem spin_lock
down_trylock()
raw_spin_lock_irqsave(&sem->lock, flags);
and _probably_ looped on it with local IRQs disabled long enough to
disappoint the NMI watchdog, which eventually declared a hard lockup
condition. but I'm not entirely sure it stuck looping on sem->lock,
it could be the case that your net IRQ took too much time and by the
time NMI declared hard lockup we were just unlucky to execute
down_trylock().
on the other hand, the fact that you see
IRQ
ip_handle_martian_source()
printk()
console_unlock()
is already not really good. first of all, you had hit ip_route_input slow
path; second, you hit pr_warn()/pr_err or print_hex_dump(), so the kernel
was reporting you something abnormal. printk() invoked from IRQ context
managed to acquire the console_sem and spent some time printing the messages
to the serial console, console_unlock() in the call trace. which sometimes
can be a call for troubles. printk() can't always be safely called from
atomic contexts, just because of cases like this.
I don't know how big ->hard_header_len can be, but that print_hex_dump()
can take some extra time. if you also happened to have other printk messages
coming from other CPUs in the meantime, then CPU1 had have to spent even
more time in console_unlock() printing those messages; from IRQ handler.
hm, this doesn't look to me as a printk recursion, at least after a
quick look. either,
a) something was holding sem->lock, can't tell what exactly (unlikely)
or
b) your IRQ handler just happened to execute way too long. given that
there was printk()->console_unlock() and probably a hex dump of
skb, this is a more likely root cause.
-ss
next parent reply other threads:[~2017-05-18 7:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAD6qDH4cw1BSHpHoqzFGYkcxBJcFy=AjjoYuY1-a+HAwgDDY1g@mail.gmail.com>
2017-05-18 7:31 ` Sergey Senozhatsky [this message]
[not found] ` <CAD6qDH6e7HChVg0N8myc5g82ovWAbsqXTD5+=bT6b8ADv8MVYA@mail.gmail.com>
[not found] ` <CAD6qDH6r76dv6pucTpOOmq_GCi=Yt9mW1yTOHSMLitHVf3CqpQ@mail.gmail.com>
2017-05-24 8:26 ` Sergey Senozhatsky
2017-05-24 8:39 ` Sergey Senozhatsky
[not found] ` <CAD6qDH6zyP535vm4VQ+R0JFRXupvXsxj2xUmDKcd3=iJAfY1Dg@mail.gmail.com>
[not found] ` <20170524125907.GA463@jagdpanzerIV.localdomain>
[not found] ` <CAD6qDH6+G6WYdP8-aOhLk0VJV1QX1yXLD-dwxLk=o3ZLmG_-JQ@mail.gmail.com>
[not found] ` <20170525052952.GA386@jagdpanzerIV.localdomain>
[not found] ` <CAD6qDH6C2umiP-UOB2nkwawQO+1JBw8Xc+a0NFRCOZHTjnqmtQ@mail.gmail.com>
2017-05-25 5:50 ` Fwd: " Sergey Senozhatsky
2017-05-25 9:56 ` Petr Mladek
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=20170518073125.GA458@jagdpanzerIV.localdomain \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=sumit.gemini0@gmail.com \
/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
all inboxes | Powered by JetHome®