On 5.4.2010 15:00, Bob Copeland wrote: > On Sun, Apr 4, 2010 at 11:06 AM, Jiri Moravec <jim.l...@gmail.com> wrote: >> On 29.3.2010 04:26, Bob Copeland wrote: >>> I'm not sure what lock this is, can you do: >>> >>> gdb cfg80211.ko >>> gdb> l *(wiphy_unregister+0x9d) >>> >> >> Yes I can and did, but lack any experience with gdb: >> >> ~ # gdb /lib/modules/2.6.32.10/kernel/net/wireless/cfg80211.ko >> GNU gdb 6.8 >> Copyright (C) 2008 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-pc-linux-gnu"... >> (no debugging symbols found) >> (gdb) l *(wiphy_unregister+0x9d) >> No symbol table is loaded. Use the "file" command. >> (gdb) > > Ok, you need CONFIG_DEBUG_INFO (and - although I don't know if > it is strictly required on x86_64, CONFIG_FRAME_POINTER couldn't > hurt). This is the most straightforward way of finding the bug, > if it is easily repeatable: recompile the kernel with those > options, reproduce, and save the oops. Then redo the gdb > command with the new offset. > > The other way is to post the 'Code:...' section of the previous > oops along with the disassembly of your cfg80211.ko (via > objdump -S), then find the matching location in the objdump > output. This tack is a lot more difficult though.
[ 361.016033] INFO: task modprobe:2861 blocked for more than 120 seconds. [ 361.016036] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 361.016038] modprobe D ffff88002820f930 0 2861 2597 0x00000000 [ 361.016042] BUG: using smp_processor_id() in preemptible [00000000] code: khungtaskd/420 [ 361.016048] caller is show_stack_log_lvl+0x32/0x1a0 [ 361.016051] Pid: 420, comm: khungtaskd Not tainted 2.6.32.11 #2 [ 361.016052] Call Trace: [ 361.016058] [<ffffffff812e66c0>] debug_smp_processor_id+0xd0/0xf0 [ 361.016061] [<ffffffff81014862>] show_stack_log_lvl+0x32/0x1a0 [ 361.016065] [<ffffffff81656bb6>] ? printk+0x3c/0x3e [ 361.016067] [<ffffffff81015ec7>] show_stack+0x17/0x20 [ 361.016070] [<ffffffff8104e662>] sched_show_task+0x92/0xf0 [ 361.016074] [<ffffffff810a423a>] watchdog+0x1ea/0x220 [ 361.016077] [<ffffffff810a4050>] ? watchdog+0x0/0x220 [ 361.016080] [<ffffffff810760de>] kthread+0x8e/0xa0 [ 361.016083] [<ffffffff810123da>] child_rip+0xa/0x20 [ 361.016086] [<ffffffff81076050>] ? kthread+0x0/0xa0 [ 361.016088] [<ffffffff810123d0>] ? child_rip+0x0/0x20 [ 361.016090] ffff88012c397ce8 0000000000000082 0000000000000000 ffffffff816597fd [ 361.016093] ffff88012c397c38 ffffffff81659a97 ffff88012c397c58 0000000000000000 [ 361.016096] 00000000fffe27df ffff88012c396000 ffff88012e557b20 ffff88012c397fd8 [ 361.016099] Call Trace: [ 361.016102] [<ffffffff816597fd>] ? _spin_lock_irq+0x1d/0x40 [ 361.016104] [<ffffffff81659a97>] ? _spin_unlock_irq+0x17/0x40 [ 361.016113] [<ffffffffa000f68d>] wiphy_unregister+0x9d/0x1c0 [cfg80211] [ 361.016116] [<ffffffff810764a0>] ? autoremove_wake_function+0x0/0x40 [ 361.016123] [<ffffffffa0056189>] ieee80211_unregister_hw+0xa9/0xf0 [mac80211] [ 361.016128] [<ffffffffa00975cc>] ath5k_pci_remove+0x32/0xd7 [ath5k] [ 361.016131] [<ffffffff812f7b5f>] pci_device_remove+0x2f/0x60 [ 361.016134] [<ffffffff8141195a>] __device_release_driver+0x6a/0xd0 [ 361.016137] [<ffffffff81411a80>] driver_detach+0xc0/0xd0 [ 361.016140] [<ffffffff814109af>] bus_remove_driver+0x7f/0xd0 [ 361.016143] [<ffffffff81412069>] driver_unregister+0x59/0x90 [ 361.016145] [<ffffffff812f7dff>] pci_unregister_driver+0x3f/0xb0 [ 361.016149] [<ffffffffa0097598>] exit_ath5k_pci+0x10/0x12 [ath5k] [ 361.016152] [<ffffffff8108c3a0>] sys_delete_module+0x1b0/0x270 [ 361.016156] [<ffffffff812de0d5>] ? __up_write+0xe5/0x150 [ 361.016159] [<ffffffff8107a6f9>] ? up_write+0x9/0x10 [ 361.016162] [<ffffffff81011342>] system_call_fastpath+0x16/0x1b [ 481.016028] INFO: task modprobe:2861 blocked for more than 120 seconds. [ 481.016031] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 481.016033] modprobe D ffff88002820f930 0 2861 2597 0x00000000 [ 481.016038] BUG: using smp_processor_id() in preemptible [00000000] code: khungtaskd/420 [ 481.016043] caller is show_stack_log_lvl+0x32/0x1a0 [ 481.016046] Pid: 420, comm: khungtaskd Not tainted 2.6.32.11 #2 [ 481.016048] Call Trace: [ 481.016054] [<ffffffff812e66c0>] debug_smp_processor_id+0xd0/0xf0 [ 481.016057] [<ffffffff81014862>] show_stack_log_lvl+0x32/0x1a0 [ 481.016061] [<ffffffff81656bb6>] ? printk+0x3c/0x3e [ 481.016063] [<ffffffff81015ec7>] show_stack+0x17/0x20 [ 481.016066] [<ffffffff8104e662>] sched_show_task+0x92/0xf0 [ 481.016070] [<ffffffff810a423a>] watchdog+0x1ea/0x220 [ 481.016073] [<ffffffff810a4050>] ? watchdog+0x0/0x220 [ 481.016076] [<ffffffff810760de>] kthread+0x8e/0xa0 [ 481.016079] [<ffffffff810123da>] child_rip+0xa/0x20 [ 481.016082] [<ffffffff81076050>] ? kthread+0x0/0xa0 [ 481.016084] [<ffffffff810123d0>] ? child_rip+0x0/0x20 [ 481.016086] ffff88012c397ce8 0000000000000082 0000000000000000 ffffffff816597fd [ 481.016090] ffff88012c397c38 ffffffff81659a97 ffff88012c397c58 0000000000000000 [ 481.016092] 00000000fffe27df ffff88012c396000 ffff88012e557b20 ffff88012c397fd8 [ 481.016095] Call Trace: [ 481.016098] [<ffffffff816597fd>] ? _spin_lock_irq+0x1d/0x40 [ 481.016101] [<ffffffff81659a97>] ? _spin_unlock_irq+0x17/0x40 [ 481.016110] [<ffffffffa000f68d>] wiphy_unregister+0x9d/0x1c0 [cfg80211] [ 481.016113] [<ffffffff810764a0>] ? autoremove_wake_function+0x0/0x40 [ 481.016119] [<ffffffffa0056189>] ieee80211_unregister_hw+0xa9/0xf0 [mac80211] [ 481.016124] [<ffffffffa00975cc>] ath5k_pci_remove+0x32/0xd7 [ath5k] [ 481.016128] [<ffffffff812f7b5f>] pci_device_remove+0x2f/0x60 [ 481.016131] [<ffffffff8141195a>] __device_release_driver+0x6a/0xd0 [ 481.016134] [<ffffffff81411a80>] driver_detach+0xc0/0xd0 [ 481.016138] [<ffffffff814109af>] bus_remove_driver+0x7f/0xd0 [ 481.016140] [<ffffffff81412069>] driver_unregister+0x59/0x90 [ 481.016143] [<ffffffff812f7dff>] pci_unregister_driver+0x3f/0xb0 [ 481.016146] [<ffffffffa0097598>] exit_ath5k_pci+0x10/0x12 [ath5k] [ 481.016150] [<ffffffff8108c3a0>] sys_delete_module+0x1b0/0x270 [ 481.016153] [<ffffffff812de0d5>] ? __up_write+0xe5/0x150 [ 481.016156] [<ffffffff8107a6f9>] ? up_write+0x9/0x10 [ 481.016160] [<ffffffff81011342>] system_call_fastpath+0x16/0x1b ~ # gdb /lib/modules/2.6.32.11/kernel/net/wireless/cfg80211.ko GNU gdb 6.8 Copyright (C) 2008 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-pc-linux-gnu"... (gdb) l *(wiphy_unregister+0x9d/0x1c0) 0x620 is in wiphy_unregister (net/wireless/core.c:522). 517 rfkill_pause_polling(rdev->rfkill); 518 } 519 EXPORT_SYMBOL(wiphy_rfkill_stop_polling); 520 521 void wiphy_unregister(struct wiphy *wiphy) 522 { 523 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 524 525 rfkill_unregister(rdev->rfkill); 526 (gdb) l *(wiphy_unregister+0x9d) 0x6bd is in wiphy_unregister (net/wireless/core.c:530). 525 rfkill_unregister(rdev->rfkill); 526 527 /* protect the device list */ 528 mutex_lock(&cfg80211_mutex); 529 530 wait_event(rdev->dev_wait, ({ 531 int __count; 532 mutex_lock(&rdev->devlist_mtx); 533 __count = rdev->opencount; 534 mutex_unlock(&rdev->devlist_mtx); (gdb) quit _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel