From: Peter Zijlstra <peterz@infradead.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: jjherne@linux.vnet.ibm.com, Sasha Levin <sasha.levin@oracle.com>,
Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
Dave Jones <davej@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: workqueue: WARN at at kernel/workqueue.c:2176
Date: Fri, 16 May 2014 13:57:37 +0200 [thread overview]
Message-ID: <20140516115737.GP11096@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <53758B12.8060609@cn.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 3300 bytes --]
On Fri, May 16, 2014 at 11:50:42AM +0800, Lai Jiangshan wrote:
> Hi, Peter and other scheduler Gurus:
>
> When I was trying to test wq-VS-hotplug, I always hit a problem in scheduler
> with the following WARNING:
>
> [ 74.765519] WARNING: CPU: 1 PID: 13 at arch/x86/kernel/smp.c:124 native_smp_send_reschedule+0x2d/0x4b()
> [ 74.765520] Modules linked in: wq_hotplug(O) fuse cpufreq_ondemand ipv6 kvm_intel kvm uinput snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi e1000e snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer ptp iTCO_wdt iTCO_vendor_support lpc_ich snd mfd_core pps_core soundcore acpi_cpufreq i2c_i801 microcode wmi radeon ttm drm_kms_helper drm i2c_algo_bit i2c_core
> [ 74.765545] CPU: 1 PID: 13 Comm: migration/1 Tainted: G O 3.15.0-rc3+ #153
> [ 74.765546] Hardware name: LENOVO ThinkCentre M8200T/ , BIOS 5JKT51AUS 11/02/2010
> [ 74.765547] 000000000000007c ffff880236199c88 ffffffff814d7d2c 0000000000000000
> [ 74.765550] 0000000000000000 ffff880236199cc8 ffffffff8103add4 ffff880236199cb8
> [ 74.765552] ffffffff81023e1b ffff8802361861c0 0000000000000001 ffff88023fd92b40
> [ 74.765555] Call Trace:
> [ 74.765559] [<ffffffff814d7d2c>] dump_stack+0x51/0x75
> [ 74.765562] [<ffffffff8103add4>] warn_slowpath_common+0x81/0x9b
> [ 74.765564] [<ffffffff81023e1b>] ? native_smp_send_reschedule+0x2d/0x4b
> [ 74.765566] [<ffffffff8103ae08>] warn_slowpath_null+0x1a/0x1c
> [ 74.765568] [<ffffffff81023e1b>] native_smp_send_reschedule+0x2d/0x4b
> [ 74.765571] [<ffffffff8105c2ea>] smp_send_reschedule+0xa/0xc
> [ 74.765574] [<ffffffff8105fe46>] resched_task+0x5e/0x62
> [ 74.765576] [<ffffffff81060238>] check_preempt_curr+0x43/0x77
> [ 74.765578] [<ffffffff81060680>] __migrate_task+0xda/0x100
> [ 74.765580] [<ffffffff810606a6>] ? __migrate_task+0x100/0x100
> [ 74.765582] [<ffffffff810606c3>] migration_cpu_stop+0x1d/0x22
> [ 74.765585] [<ffffffff810a33c6>] cpu_stopper_thread+0x84/0x116
> [ 74.765587] [<ffffffff814d8642>] ? __schedule+0x559/0x581
> [ 74.765590] [<ffffffff814dae3c>] ? _raw_spin_lock_irqsave+0x12/0x3c
> [ 74.765592] [<ffffffff8105bd75>] ? __smpboot_create_thread+0x109/0x109
> [ 74.765594] [<ffffffff8105bf46>] smpboot_thread_fn+0x1d1/0x1d6
> [ 74.765598] [<ffffffff81056665>] kthread+0xad/0xb5
> [ 74.765600] [<ffffffff810565b8>] ? kthread_freezable_should_stop+0x41/0x41
> [ 74.765603] [<ffffffff814e0e2c>] ret_from_fork+0x7c/0xb0
> [ 74.765605] [<ffffffff810565b8>] ? kthread_freezable_should_stop+0x41/0x41
> [ 74.765607] ---[ end trace 662efb362b4e8ed0 ]---
>
> After debugging, I found the hotlug-in cpu is atctive but !online in this case.
> the problem was introduced by 5fbd036b.
> Some code assumes that any cpu in cpu_active_mask is also online, but 5fbd036b breaks
> this assumption, so the corresponding code with this assumption should be changed too.
>
This of course leaves the question how the workqueue code manages to
call set_cpu_allowed_ptr() on a cpu _before_ its online.
That too sounds fishy.. with the proposed patch the
set_cpus_allowed_ptr() will 'gracefully' fail, but calling it in the
first place is of course dubious too.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-05-16 11:58 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 18:58 Sasha Levin
2014-05-12 20:01 ` Tejun Heo
2014-05-13 2:19 ` Lai Jiangshan
2014-05-13 2:17 ` Sasha Levin
2014-05-14 16:52 ` Jason J. Herne
2014-05-16 3:50 ` Lai Jiangshan
2014-05-16 9:35 ` Peter Zijlstra
2014-05-16 9:56 ` Lai Jiangshan
2014-05-16 10:29 ` Peter Zijlstra
2014-05-16 10:15 ` Peter Zijlstra
2014-05-16 10:16 ` Peter Zijlstra
2014-05-16 10:39 ` Peter Zijlstra
2014-05-16 11:57 ` Peter Zijlstra [this message]
2014-05-16 12:08 ` Tejun Heo
2014-05-16 12:14 ` Thomas Gleixner
2014-05-16 12:16 ` Tejun Heo
2014-05-16 16:18 ` Lai Jiangshan
2014-05-16 16:29 ` Peter Zijlstra
2014-05-27 14:18 ` Jason J. Herne
2014-05-27 14:26 ` Peter Zijlstra
2014-05-29 16:23 ` Jason J. Herne
2014-06-03 11:24 ` Lai Jiangshan
2014-06-03 12:45 ` Lai Jiangshan
2014-06-03 14:28 ` Peter Zijlstra
2014-06-04 1:47 ` Lai Jiangshan
2014-06-03 14:16 ` Peter Zijlstra
2014-06-04 2:27 ` Lai Jiangshan
2014-06-04 6:49 ` Peter Zijlstra
2014-06-04 8:25 ` Lai Jiangshan
2014-06-04 9:39 ` Peter Zijlstra
2014-06-05 10:54 ` Lai Jiangshan
2014-06-05 15:22 ` Jason J. Herne
2014-06-06 12:39 ` Jason J. Herne
2014-06-06 13:36 ` Peter Zijlstra
2014-06-08 2:50 ` Lai Jiangshan
2014-09-01 3:04 ` Lai Jiangshan
2014-09-03 15:15 ` Peter Zijlstra
2014-09-04 2:22 ` Lai Jiangshan
2014-09-04 6:39 ` Peter Zijlstra
2014-06-09 14:01 ` Jason J. Herne
2014-06-10 1:21 ` Lai Jiangshan
2014-06-16 1:30 ` Lai Jiangshan
2014-09-09 14:52 ` [tip:sched/core] sched: Migrate waking tasks tip-bot for Lai Jiangshan
2014-09-10 7:38 ` Kirill Tkhai
2014-09-10 7:53 ` Peter Zijlstra
2014-06-04 2:28 ` workqueue: WARN at at kernel/workqueue.c:2176 Lai Jiangshan
2014-06-04 6:48 ` Peter Zijlstra
2014-05-19 13:07 ` [tip:sched/core] sched: Fix hotplug vs set_cpus_allowed_ptr() tip-bot for Lai Jiangshan
2014-05-22 12:26 ` [tip:sched/core] sched: Fix hotplug vs. set_cpus_allowed_ptr() tip-bot for Lai Jiangshan
2014-05-22 22:02 ` Srivatsa S. Bhat
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=20140516115737.GP11096@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=davej@redhat.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sasha.levin@oracle.com \
--cc=tglx@linutronix.de \
--cc=tj@kernel.org \
/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