Re: workqueue destruction BUG_ON

From: Johannes Berg
Date: Tue Aug 24 2010 - 08:47:54 EST


Hi,

> > 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.

True.

> 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 think in my iwlwifi case it's actually destroying the iwlwifi
workqueue (not sure why it even exists though).

> I'll prep a
> debug patch to print out some details.

That'd be helpful, thanks!

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/