[pvrusb2] Random hang during 'modprobe -r pvrusb2'

devsk funtoos at yahoo.com
Sun Jul 25 01:52:13 CDT 2010


Mike,

It got stuck again today. This is with 2.6.34.1. Let me know what information to 
collect if I hit it again.

-devsk




________________________________
From: devsk <funtoos at yahoo.com>
To: Communications nexus for pvrusb2 driver <pvrusb2 at isely.net>
Sent: Sat, July 24, 2010 11:08:40 AM
Subject: Re: [pvrusb2] Random hang during 'modprobe -r pvrusb2'

Mike,

Unfortunately, I had to reboot the system. I did take the task dump with 'echo t 

> sysrq-trigger'. Do you want the whole of it or just pvrusb2 related? Let's 
start with all pvrusb2 tasks, I can paste the whole thing if needed.

And yes, its hard to reproduce but once it happens, the only option is to reboot 

the box. The device becomes unusable when this happens. Unplugging doesn't help.

The only process which accesses this device continuously is mythbackend. It was 
down when this happened.

It has happened in kernels earlier than 2.6.34 as well. Its just that I was 
thinking recent fixes for races would have gotten rid of it but apparently there 

is still a race lurking in there. Its definitely taken a long time (many months) 

to make a comeback. But then, I hardly ever remove the module manually.

Thanks,
-devsk

Jul 22 23:33:35 localhost kernel: [72916.826000] pvrusb2-conte S 
0000000101e5dec7     0  7391      2 0x00000000
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035f49b4e0 
0000000000000046 ffff88035e6be090 ffffffff8155e020
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff880300000000 
0000000000012000 0000000000012000 ffff8802167cbfd8
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035f49b4e0 
ffff8802167cbfd8 0000000000000000 0000000100000282
Jul 22 23:33:35 localhost kernel: [72916.826000] Call Trace:
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b842e3>] ? 
pvr2_context_thread_func+0x1cd/0x31a [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81045cd7>] ? 
autoremove_wake_function+0x0/0x2a
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b84116>] ? 
pvr2_context_thread_func+0x0/0x31a [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff8104591d>] ? 
kthread+0x75/0x7d
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81002c54>] ? 
kernel_thread_helper+0x4/0x10
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff810458a8>] ? 
kthread+0x0/0x7d
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81002c50>] ? 
kernel_thread_helper+0x0/0x10
Jul 22 23:33:35 localhost kernel: [72916.826000] pvrusb2_a     S 
ffff88035f49af00     0  7392      2 0x00000000
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035f49af00 
0000000000000046 ffffffffa0b7d21d ffff88035f49b4e0
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035e6be090 
0000000000012000 0000000000012000 ffff880215989fd8
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035f49af00 
ffff880215989fd8 0000000000000282 ffffffff813bce26
Jul 22 23:33:35 localhost kernel: [72916.826000] Call Trace:
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b7d21d>] ? 
pvr2_hdw_worker_poll+0x0/0x359 [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff813bce26>] ? 
mutex_lock+0xd/0x32
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b7d21d>] ? 
pvr2_hdw_worker_poll+0x0/0x359 [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff810427a1>] ? 
worker_thread+0xc3/0x1c2
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81045cd7>] ? 
autoremove_wake_function+0x0/0x2a
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff810426de>] ? 
worker_thread+0x0/0x1c2
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff8104591d>] ? 
kthread+0x75/0x7d
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81002c54>] ? 
kernel_thread_helper+0x4/0x10
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff810458a8>] ? 
kthread+0x0/0x7d
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81002c50>] ? 
kernel_thread_helper+0x0/0x10
Jul 22 23:33:35 localhost kernel: [72916.826000] modprobe      D 
0000000101e5deef     0 23597   3845 0x00000004
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035dcc5820 
0000000000000082 0000000000000004 ffff88035fc6d820
Jul 22 23:33:35 localhost kernel: [72916.826000]  0000000000000000 
0000000000012000 0000000000012000 ffff880215451fd8
Jul 22 23:33:35 localhost kernel: [72916.826000]  ffff88035dcc5820 
ffff880215451fd8 ffff880215451e54 0000000100000000
Jul 22 23:33:35 localhost kernel: [72916.826000] Call Trace:
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff813bc85c>] ? 
schedule_timeout+0x1d/0xb2
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff8102bdd0>] ? 
enqueue_task_fair+0x160/0x174
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff813bc6f6>] ? 
wait_for_common+0xca/0x140
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81030040>] ? 
default_wake_function+0x0/0xf
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81030032>] ? 
try_to_wake_up+0x213/0x221
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81045a43>] ? 
kthread_stop+0x32/0x51
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b840d2>] ? 
pvr2_context_global_done+0xb1/0xb8 [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81045cd7>] ? 
autoremove_wake_function+0x0/0x2a
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff8125f34f>] ? 
bus_remove_driver+0x94/0xa6
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffffa0b87f2c>] ? 
pvr_exit+0x2c/0x52 [pvrusb2]
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81056e39>] ? 
sys_delete_module+0x1d0/0x243
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81082f30>] ? 
do_munmap+0x2f6/0x318
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81082f96>] ? 
sys_munmap+0x44/0x50
Jul 22 23:33:35 localhost kernel: [72916.826000]  [<ffffffff81001f2b>] ? 
system_call_fastpath+0x16/0x1b




________________________________
From: Mike Isely <isely at isely.net>
To: Communications nexus for pvrusb2 driver <pvrusb2 at isely.net>
Sent: Fri, July 23, 2010 8:58:23 AM
Subject: Re: [pvrusb2] Random hang during 'modprobe -r pvrusb2'

On Thu, 22 Jul 2010, devsk wrote:

> Mike,
> 
> This is with 2.6.34.1 and latest driver snapshot:
> 
> [18693.055000] pvrusb2: 20100708 (from www.isely.net):Hauppauge WinTV-PVR-USB2 


> MPEG2 Encoder/Tuner
> 
> I did modprobe -r pvrusb2 and it hung.
> 
> This is what it shows in dmesg:
> 
> [32118.444000] usbcore: deregistering interface driver pvrusb2
> [32118.444000] pvrusb2: Device being rendered inoperable
> 
> Its still hung here. How can I collect more information for you to debug this 
> issue. Its very intermittent. So, since we have it hung there, this is our 
> chance to nail this bugger.

Getting that to always work correctly is not easy.  Lots of opportunity 
for race conditions, and I have seen some issues with this.  There were 
a round of bug fixes a few months ago that address race conditions on 
removal.

Given the sporadic nature of an issue like this it's going to be hard to 
nail down.  Some things that will help:

1. Being able to demonstrate that the problem is affected by kernel 
version, i.e. if it only happens under 2.6.34.1 or if you can also get 
it to fail under an earlier kernel.  Either way the answer to that may 
help narrow the search.

2. Did an application have the device node open at the time?  That's a 
big factor?

3. If after it jams, can you unplug the device and does that unjam the 
removal process?

Another fun race to try is to run an application which talks to the 
driver and then unplug the device WHILE this is running.  This should 
also work out OK.

  -Mike

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
_______________________________________________
pvrusb2 mailing list
pvrusb2 at isely.net
http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2



      
_______________________________________________
pvrusb2 mailing list
pvrusb2 at isely.net
http://www.isely.net/cgi-bin/mailman/listinfo/pvrusb2



      


More information about the pvrusb2 mailing list