Skip to contentSkip to conversation

Should I do anything about this warning?

DISCUSSION Sagar Padhye 2 participants 3 messages Oct 8, 2014

lore
Share & tools
lore
#0 lore raw

Hi,
I am new at kernel programming. I have written a driver for a custom device, running on arm board. It works well (for last few months). I happen to look at kernel logs and I seen,

[231250.894334] ------------[ cut here ]------------
[231250.899146] WARNING: at kernel/workqueue.c:1953 process_one_work+0x398/0x52c()
[231250.906491] Modules linked in: bcmdhd cfg80211 <XYZ>
[231250.911885] [<c0016450>] (unwind_backtrace+0x0/0x144) from [<c05c04f0>] (dump_stack+0x20/0x24)
[231250.920672] [<c05c04f0>] (dump_stack+0x20/0x24) from [<c006c330>] (warn_slowpath_common+0x5c/0x74)
[231250.929757] [<c006c330>] (warn_slowpath_common+0x5c/0x74) from [<c006c374>] (warn_slowpath_null+0x2c/0x34)
[231250.939581] [<c006c374>] (warn_slowpath_null+0x2c/0x34) from [<c0088f08>] (process_one_work+0x398/0x52c)
[231250.949232] [<c0088f08>] (process_one_work+0x398/0x52c) from [<c00895c8>] (rescuer_thread+0x184/0x230)
[231250.958708] [<c00895c8>] (rescuer_thread+0x184/0x230) from [<c008dd60>] (kthread+0xac/0xb4)
[231250.967236] [<c008dd60>] (kthread+0xac/0xb4) from [<c000fd4c>] (kernel_thread_exit+0x0/0x8)
[231250.975755] ---[ end trace 9f9c2187c0bee21b ]---

The device is still working after this. No issues in operation. I am just sceptical about analyzing this issue? Do I need to check more? If yes how? with this trace?

Thanks,
Sagar

#1 lore raw
Quoted 6 lines · Sagar Padhye

I am new at kernel programming. I have written a driver for a custom device, running on arm board. It works well (for last few months). I happen to look at kernel logs and I seen,

[231250.899146] WARNING: at kernel/workqueue.c:1953 process_one_work+0x398/0x52c()

You triggered a warning in the code.

Quoted 4 lines

The device is still working after this. No issues in operation. I am just sceptical about analyzing this issue? Do I need to check more? If yes how? with this trace?

Yes, this indicates a potential problem.
You start my looking at line 1953 in kernel/workqueue.c, where you'll see which specific warning you're triggering.

It's probably this one:

Quoted 3 lines

/* ensure we're on the correct CPU */
WARN_ON_ONCE(!(pool->flags & POOL_DISASSOCIATED) &&

            raw_smp_processor_id() != pool->cpu);

Regards,
Kristof

#2 lore raw
Quoted 8 lines · Kristof Provost
Quoted 6 lines · Sagar Padhye

I am new at kernel programming. I have written a driver for a custom device, running on arm board. It works well (for last few months). I happen to look at kernel logs and I seen,

[231250.899146] WARNING: at kernel/workqueue.c:1953 process_one_work+0x398/0x52c()

You triggered a warning in the code.

Yes, I got that

Quoted 5 lines
Quoted 4 lines

The device is still working after this. No issues in operation. I am just sceptical about analyzing this issue? Do I need to check more? If yes how? with this trace?

Yes, this indicates a potential problem.

The issue is not reproducible. Haven't seen in over 6 months. And the module is working just fine after the log. Is there a way I can get more info on this e.g. more stacktrace that will end up in module's work function (if this occurs again)?

Quoted 7 lines

You start my looking at line 1953 in kernel/workqueue.c, where you'll see which specific warning you're triggering.

It's probably this one:

Quoted 3 lines

/* ensure we're on the correct CPU */
WARN_ON_ONCE(!(pool->flags & POOL_DISASSOCIATED) &&

            raw_smp_processor_id() != pool->cpu);

They are,
1952 WARN_ON_ONCE(!(worker->flags & (WORKER_UNBOUND | WORKER_REBIND)) &&
1953 raw_smp_processor_id() != gcwq->cpu);
But I am not sure what they signify :(

Thanks,
Sagar