All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: workqueue destruction BUG_ON
Date: Tue, 24 Aug 2010 12:24:06 +0200	[thread overview]
Message-ID: <4C739DC6.1040309@kernel.org> (raw)
In-Reply-To: <1282640156.3695.5.camel@jlt3.sipsolutions.net>

Hello,

On 08/24/2010 10:55 AM, Johannes Berg wrote:
> In our testing with iwlwifi, we keep running into this BUG_ON:
> 
> 	BUG_ON(cwq->nr_active);
> 
> in destroy_workqueue(). This is quite unhelpful, and since the code
> flushes the workqueue I really don't see how this could be happening,
> unless maybe there's cross-talk between this and other workqueues?

Flushing the workqueue doesn't guarantee that the workqueue stays
empty.  It just flushes the currently pending works.  If there are
requeueing works or something else is queueing new works, workqueue
won't be empty.  The check is new.  Previously, workqueue code didn't
check whether the workqueue is actually empty.  Now that the worklist
is shared, we need such check in place.  There was also a similar
report on ath9k.  I think it's most likely that something is queueing
works on a dying wokrqueue in the wireless common code.  I'll prep a
debug patch to print out some details.

Thanks.

-- 
tejun

  reply	other threads:[~2010-08-24 10:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  8:55 workqueue destruction BUG_ON Johannes Berg
2010-08-24 10:24 ` Tejun Heo [this message]
2010-08-24 10:37   ` Johannes Berg
2010-08-24 12:35     ` Tejun Heo
2010-08-24 13:04       ` Johannes Berg
2010-08-24 13:10       ` Johannes Berg
2010-08-24 13:07         ` Tejun Heo
2010-08-24 13:17           ` Johannes Berg
2010-08-24 13:15             ` Tejun Heo
2010-08-24 13:23               ` Johannes Berg
2010-08-24 14:56                 ` Tejun Heo
2010-08-24 15:52                   ` Johannes Berg
2010-08-24 15:47                     ` Tejun Heo
2010-08-24 15:56                       ` Johannes Berg
2010-08-24 13:19           ` Johannes Berg

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=4C739DC6.1040309@kernel.org \
    --to=tj@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.