mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	tangchen@cn.fujitsu.com, rafael@kernel.org
Subject: Re: mod_delayed_work()  explosion due to  874bbfe6
Date: Wed, 3 Feb 2016 11:32:29 -0500	[thread overview]
Message-ID: <20160203163229.GF14091@mtj.duckdns.org> (raw)
In-Reply-To: <1454424264.11183.46.camel@gmail.com>

On Tue, Feb 02, 2016 at 03:44:24PM +0100, Mike Galbraith wrote:
> Scenario: CPU168 calls mod_delayed_work(), is taken offline before the
> timer expires.  Due to 874bbfe6, dwork->cpu is the now offline CPU168
> vs the previous WORK_CPU_UNBOUND, timer fires on CPU131, it tries to
> __queue_work() with cpu == the now offline CPU168, gets to...
> 
>         } else
>                 pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu));
> 
> ... and goes boom.
> 
> <snippet>
> crash> p numa_node | grep 168
>   [168]: ffff8c03fdf0e328
> crash> rd ffff8c03fdf0e328
> ffff8c03fdf0e328:  00000000ffffffff                    ........
> 
> Thus, pwq becomes 000000000. Then, as the result of reference to
> pwq->pool, NULL reference occurs at (*PANIC).
> </snippet>
> 
> What if anything is supposed to prevent this?

(cc'ing 

So, the root problem here is cpu <-> node mapping flipping across cpu
on/offlining which is unnecessary and causes other issues too.  It's
being worked on for quite a while now.

 http://lkml.kernel.org/g/1453702100-2597-1-git-send-email-tangchen@cn.fujitsu.com

I'll create a bandaid patch for now so that wq falls back to dfl_wq on
negative node.

Thanks.

-- 
tejun

  parent reply	other threads:[~2016-02-03 16:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 14:44 Mike Galbraith
2016-02-03 14:37 ` Michal Hocko
2016-02-03 16:32 ` Tejun Heo [this message]
2016-02-03 18:54 ` [PATCH wq/for-4.5-fixes] workqueue: handle NUMA_NO_NODE for unbound pool_workqueue lookup Tejun Heo
2016-02-03 18:55   ` Tejun Heo
2016-02-04  3:15     ` Mike Galbraith
2016-02-03 19:12   ` Thomas Gleixner
2016-02-03 19:28     ` Tejun Heo
2016-02-04  2:12       ` Mike Galbraith
2016-02-04  8:40   ` Michal Hocko
2016-02-10 15:55   ` Tejun Heo
2016-02-15 17:33     ` Michal Hocko
2016-02-15 18:21       ` Tejun Heo
2016-02-15 20:54         ` Michal Hocko
2016-02-15 21:02           ` Tejun Heo

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=20160203163229.GF14091@mtj.duckdns.org \
    --to=tj@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tangchen@cn.fujitsu.com \
    --cc=umgwanakikbuti@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

Powered by JetHome