From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Cc: Myron Stowe <myron.stowe@hp.com>, Jens Axboe <axboe@kernel.dk>
Subject: workqueue deadlock
Date: Wed, 6 Dec 2006 17:26:14 -0700 [thread overview]
Message-ID: <200612061726.14587.bjorn.helgaas@hp.com> (raw)
I'm seeing a workqueue-related deadlock. This is on an ia64
box running SLES10, but it looks like the same problem should
be possible in current upstream on any architecture.
Here are the two tasks involved:
events/4:
schedule
__down
__lock_cpu_hotplug
lock_cpu_hotplug
flush_workqueue
kblockd_flush
blk_sync_queue
cfq_shutdown_timer_wq
cfq_exit_queue
elevator_exit
blk_cleanup_queue
scsi_free_queue
scsi_device_dev_release_usercontext
run_workqueue
loadkeys:
schedule
flush_cpu_workqueue
flush_workqueue
flush_scheduled_work
release_dev
tty_release
loadkeys is holding the cpu_hotplug lock (acquired in flush_workqueue())
and waiting in flush_cpu_workqueue() until the cpu_workqueue drains.
But events/4 is responsible for draining it, and it is blocked waiting
to acquire the cpu_hotplug lock.
In current upstream, the cpu_hotplug lock has been replaced with
workqueue_mutex, but it looks to me like the same deadlock is still
possible.
Is there some rule that workqueue functions shouldn't try to
flush a workqueue? Or should flush_workqueue() be smarter by
releasing the workqueue_mutex once in a while?
next reply other threads:[~2006-12-07 0:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-07 0:26 Bjorn Helgaas [this message]
2006-12-07 6:17 ` Srivatsa Vaddagiri
2006-12-07 6:45 ` Srivatsa Vaddagiri
2006-12-07 18:51 ` Andrew Morton
2006-12-07 19:37 ` Andrew Morton
2006-12-08 2:53 ` Srivatsa Vaddagiri
2006-12-08 4:54 ` Andrew Morton
2006-12-08 7:58 ` Srivatsa Vaddagiri
2006-12-09 10:26 ` Ingo Molnar
2006-12-09 19:47 ` Andrew Morton
2006-12-10 8:26 ` Ingo Molnar
2006-12-10 8:43 ` Andrew Morton
2006-12-10 11:49 ` Ingo Molnar
2006-12-10 12:16 ` Andrew Morton
2006-12-10 12:19 ` Ingo Molnar
2006-12-10 12:34 ` Andrew Morton
2006-12-11 6:09 ` Ingo Molnar
2006-12-10 14:18 ` Rafael J. Wysocki
2006-12-11 6:52 ` Dipankar Sarma
2006-12-11 16:34 ` Rafael J. Wysocki
2006-12-11 5:45 ` Srivatsa Vaddagiri
2006-12-11 6:03 ` Andrew Morton
2006-12-11 4:58 ` Srivatsa Vaddagiri
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=200612061726.14587.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=myron.stowe@hp.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®