Created attachment 26302 [details] Logs, before kernel panic Kernel panic at system start. gdb kernel/build/vmlinux bug/vmcore GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-unknown-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/andrej/kernel/build/vmlinux...done. warning: exec file is newer than core file. [New Thread 2867] #0 set_wq_data (cwq=0xffff8800af9b0100, work=0xffffffff818738e0) at /home/andrej/kernel/linux/kernel/workqueue.c:225 225 BUG_ON(!work_pending(work)); (gdb) bt #0 set_wq_data (cwq=0xffff8800af9b0100, work=0xffffffff818738e0) at /home/andrej/kernel/linux/kernel/workqueue.c:225 #1 insert_work (cwq=0xffff8800af9b0100, work=0xffffffff818738e0) at /home/andrej/kernel/linux/kernel/workqueue.c:243 #2 __queue_work (cwq=0xffff8800af9b0100, work=0xffffffff818738e0) at /home/andrej/kernel/linux/kernel/workqueue.c:260 #3 0xffffffff8106591a in delayed_work_timer_fn (__data=<value optimized out>) at /home/andrej/kernel/linux/kernel/workqueue.c:316 #4 0xffffffff8105ea62 in __run_timers (h=<value optimized out>) at /home/andrej/kernel/linux/kernel/timer.c:1026 #5 run_timer_softirq (h=<value optimized out>) at /home/andrej/kernel/linux/kernel/timer.c:1218 #6 0xffffffff81059913 in __do_softirq () at /home/andrej/kernel/linux/kernel/softirq.c:219 #7 0xffffffff810288ea in ?? () at /home/andrej/kernel/linux/arch/x86/kernel/entry_64.S:1226 #8 0xffffffff8181ff58 in ?? () #9 0xffffffff8181ff78 in ?? () #10 0xffffffff8102a36d in do_softirq () at /home/andrej/kernel/linux/arch/x86/kernel/irq_64.c:80 Backtrace stopped: frame did not save the PC
Created attachment 26303 [details] achook This is my tool, which cause kernel panic, if run from udevd at system start. If i run this tool after system booted, no kernel panic occur.
How do you know that do_dbs_timer() caused this?
I have this problem, when udev run achook and no AC there. Udev rule: SUBSYSTEM!="power_supply",GOTO=achook_end KERNEL=="AC0",GOTO=achook_run KERNEL=="ACAD",GOTO=achook_run GOTO=achook_end LABEL=achook_run RUN+="BINDIR/achook" LABEL=achook_end
Created attachment 26340 [details] full dmesg from kdump Full dmesg from kdump
back trace from 2.6.34-rc7: [New Thread 1902] #0 __list_del (h=<value optimized out>) at /home/andrej/kernel/linux/include/linux/list.h:92 92 next->prev = prev; (gdb) bt #0 __list_del (h=<value optimized out>) at /home/andrej/kernel/linux/include/linux/list.h:92 #1 detach_timer (h=<value optimized out>) at /home/andrej/kernel/linux/kernel/timer.c:596 #2 __run_timers (h=<value optimized out>) at /home/andrej/kernel/linux/kernel/timer.c:998 #3 run_timer_softirq (h=<value optimized out>) at /home/andrej/kernel/linux/kernel/timer.c:1218 #4 0xffffffff81059913 in __do_softirq () at /home/andrej/kernel/linux/kernel/softirq.c:219 #5 0xffffffff810288ea in ?? () at /home/andrej/kernel/linux/arch/x86/kernel/entry_64.S:1226 #6 0xffffffff8181ff58 in ?? () #7 0xffffffff8181ff78 in ?? () #8 0xffffffff8102a36d in do_softirq () at /home/andrej/kernel/linux/arch/x86/kernel/irq_64.c:80 Backtrace stopped: frame did not save the PC
> How do you know that do_dbs_timer() caused this? With gdb: print worh->run (something like this)
Created attachment 26344 [details] [PATCH] [CPUFREQ] fix race condition in store_scaling_governor There is a race condition in store_scaling_governor (drivers/cpufreq/cpufreq.c) if switch scaling governor very fast. I wrapped store_scaling_governor with mutex lock cpufreq_governor_mutex. I will send my patch to the mailing list.
Created attachment 26377 [details] [CPUFREQ] Revert "[CPUFREQ] remove rwsem lock from CPUFREQ_GOV_STOP call (second call site)"
The bug is still there in 2.6.35-rc4 :(
Created attachment 27026 [details] test for the bug run and see, if you had the bug.
Comment on attachment 27026 [details] test for the bug fix mime
Please dont' run a bugzilla thread and a linux-kernel thread in parallel. It makes it really hard. Nobody looks in bugzilla so it's best to stick to the email thread. I have cpufreq-revert-remove-rwsem-lock-from-cpufreq_gov_stop-call-second-call-site.patch queued under my "cpufreq, needed in 2.6.35" category. cpufreq maintainership seems kinda dead. I'll take care of it, somehow.