Re: kernel BUG at kernel/workqueue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Thanks for the reply.
So the BUG_ON means that it is known prior that a could raise in this codelines.
Correct me if am wrong. In that case, there would a patch to fix this, guessing.

--Sri

On Wed, May 25, 2011 at 11:15 PM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi...

On Wed, May 25, 2011 at 16:32, sri <bskmohan@xxxxxxxxx> wrote:
> kernel BUG at kernel/workqueue.c:113!

from http://lxr.linux.no/#linux+v2.6.18/kernel/workqueue.c, lines around 113:
int fastcall queue_work(struct workqueue_struct *wq, struct work_struct *work)
Â107{
Â108 Â Â Â Âint ret = 0, cpu = get_cpu();
Â109
Â110 Â Â Â Âif (!test_and_set_bit(0, &work->pending)) {
Â111 Â Â Â Â Â Â Â Âif (unlikely(is_single_threaded(wq)))
Â112 Â Â Â Â Â Â Â Â Â Â Â Âcpu = singlethread_cpu;
Â113 Â Â Â Â Â Â Â ÂBUG_ON(!list_empty(&work->entry));
Â114 Â Â Â Â Â Â Â Â__queue_work(per_cpu_ptr(wq->cpu_wq, cpu), work);
Â115 Â Â Â Â Â Â Â Âret = 1;
Â116 Â Â Â Â}
Â117 Â Â Â Âput_cpu();
Â118 Â Â Â Âreturn ret;
Â119}

So, if I interpret it correctly, that BUG_ON line means that if
work->entry is not empty or null, then it is a bug.

Not sure what causes that, but it could be simply due to failure of
"work" initialization (as work_struct) somewhere...


--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



--
--
ÂKrishna Mohan B
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux