* Re: PCTV 290e - assorted problems
@ 2011-08-15 0:05 Chris Rankin
2011-08-15 8:39 ` Steve Kerrison
0 siblings, 1 reply; 3+ messages in thread
From: Chris Rankin @ 2011-08-15 0:05 UTC (permalink / raw)
To: linux-media
>> INFO: task khubd:1100 blocked for more than 120 seconds.
>> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
>> khubd D 0000000000000000 0 1100 2 0x00000000
>> ffff8801a694e930 0000000000000046 ffff8801a691ffd8 ffffffff8162b020
>> 0000000000010280 ffff8801a691ffd8 0000000000004000 0000000000010280
>> ffff8801a691ffd8 ffff8801a694e930 0000000000010280 ffff8801a691e000
>> Call Trace:
>> [<ffffffff8128580e>] ? apic_timer_interrupt+0xe/0x20
>> [<ffffffff8113ffff>] ? memscan+0x3/0x18
>> [<ffffffff8128354e>] ? __mutex_lock_slowpath+0x15c/0x295
>> [<ffffffff81283690>] ? mutex_lock+0x9/0x18
>> [<ffffffffa06af671>] ? dvb_init+0x99/0xcc8 [em28xx_dvb]
>> [<ffffffffa067d459>] ? em28xx_init_extension+0x35/0x53 [em28xx]
>> [<ffffffffa067b938>] ? em28xx_usb_probe+0x827/0x8df [em28xx]
>
> I think it crashes before it even goes to PCTV 290e specific part. I
> suspect it is bug somewhere in em28xx driver.
The scenario that triggers this crash is:
a) Plug the 290e in, and allow it to initialise correctly
b) Use xine to watch any DVB-T channel successfully
c) Try switching to previously-tuned DVB-T2 channel; this makes xine hang.
d) Kill xine
e) Physically replug adapter
em28xx re-initialisation will now fail:
...
tda18271: performing RF tracking filter calibration
tda18271: RF tracking filter calibration complete
usb 4-1: USB disconnect, device number 3
em28xx #0: disconnecting em28xx #0 video
em28xx #0: V4L2 device video1 deregistered
tda18271 7-0060: destroying instance
usb 4-1: new high speed USB device number 4 using ehci_hcd
em28xx: New device PCTV Systems PCTV 290e @ 480 Mbps (2013:024f, interface 0, class 0)
em28xx #0: chip ID is em28174
em28xx #0: Identified as PCTV nanoStick T2 290e (card=78)
Registered IR keymap rc-pinnacle-pctv-hd
input: em28xx IR (em28xx #0) as /devices/pci0000:00/0000:00:1d.7/usb4/4-1/rc/rc1/input8
rc1: em28xx IR (em28xx #0) as /devices/pci0000:00/0000:00:1d.7/usb4/4-1/rc/rc1
em28xx #0: v4l2 driver version 0.1.2
em28xx #0: V4L2 video device registered as video1
INFO: task khubd:1217 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
khubd D 0000000000000000 0 1217 2 0x00000000
ffff8801a7081ef0 0000000000000046 ffff8801a69a9fd8 ffffffff8162b020
0000000000010280 ffff8801a69a9fd8 0000000000004000 0000000000010280
ffff8801a69a9fd8 ffff8801a7081ef0 0000000000010280 ffff8801a69a8000
Call Trace:
[<ffffffff8128580e>] ? apic_timer_interrupt+0xe/0x20
[<ffffffff8113ffff>] ? memscan+0x3/0x18
[<ffffffff8128354e>] ? __mutex_lock_slowpath+0x15c/0x295
[<ffffffff81283690>] ? mutex_lock+0x9/0x18
[<ffffffffa0694671>] ? dvb_init+0x99/0xcc8 [em28xx_dvb]
[<ffffffffa0662459>] ? em28xx_init_extension+0x35/0x53 [em28xx]
[<ffffffffa0660938>] ? em28xx_usb_probe+0x827/0x8df [em28xx]
Cheers,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PCTV 290e - assorted problems
2011-08-15 0:05 PCTV 290e - assorted problems Chris Rankin
@ 2011-08-15 8:39 ` Steve Kerrison
2011-08-16 0:58 ` Possible cause of replug lockup in em28xx-dvb Chris Rankin
0 siblings, 1 reply; 3+ messages in thread
From: Steve Kerrison @ 2011-08-15 8:39 UTC (permalink / raw)
To: Chris Rankin; +Cc: linux-media@vger.kernel.org
That is most likely the em28xx locking bug. It'll happen when you plug a
second em28xx device in, or plug one in for a second time. The steps
you've shown include that process. Try doing `rmmod em28xx-dvb` before
re-plugging the device. If that 'cures' it, you're a victim of the same
problem.
I'm not overtly familiar with the interactions of em28xx with the rest
of the kernel & userland and why the bug manifests, but it is on my list
of things to (try to) fix, although I'm hoping somebody more able than
me figures it out first :)
Regards,
--
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/
On Sun, 2011-08-14 at 17:05 -0700, Chris Rankin wrote:
> >> INFO: task khubd:1100 blocked for more than 120 seconds.
> >> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> >> khubd D 0000000000000000 0 1100 2 0x00000000
> >> ffff8801a694e930 0000000000000046 ffff8801a691ffd8 ffffffff8162b020
> >> 0000000000010280 ffff8801a691ffd8 0000000000004000 0000000000010280
> >> ffff8801a691ffd8 ffff8801a694e930 0000000000010280 ffff8801a691e000
> >> Call Trace:
> >> [<ffffffff8128580e>] ? apic_timer_interrupt+0xe/0x20
> >> [<ffffffff8113ffff>] ? memscan+0x3/0x18
> >> [<ffffffff8128354e>] ? __mutex_lock_slowpath+0x15c/0x295
> >> [<ffffffff81283690>] ? mutex_lock+0x9/0x18
> >> [<ffffffffa06af671>] ? dvb_init+0x99/0xcc8 [em28xx_dvb]
> >> [<ffffffffa067d459>] ? em28xx_init_extension+0x35/0x53 [em28xx]
> >> [<ffffffffa067b938>] ? em28xx_usb_probe+0x827/0x8df [em28xx]
> >
> > I think it crashes before it even goes to PCTV 290e specific part. I
> > suspect it is bug somewhere in em28xx driver.
>
> The scenario that triggers this crash is:
> a) Plug the 290e in, and allow it to initialise correctly
> b) Use xine to watch any DVB-T channel successfully
> c) Try switching to previously-tuned DVB-T2 channel; this makes xine hang.
> d) Kill xine
> e) Physically replug adapter
>
> em28xx re-initialisation will now fail:
>
> ...
> tda18271: performing RF tracking filter calibration
> tda18271: RF tracking filter calibration complete
> usb 4-1: USB disconnect, device number 3
> em28xx #0: disconnecting em28xx #0 video
> em28xx #0: V4L2 device video1 deregistered
> tda18271 7-0060: destroying instance
> usb 4-1: new high speed USB device number 4 using ehci_hcd
> em28xx: New device PCTV Systems PCTV 290e @ 480 Mbps (2013:024f, interface 0, class 0)
> em28xx #0: chip ID is em28174
> em28xx #0: Identified as PCTV nanoStick T2 290e (card=78)
> Registered IR keymap rc-pinnacle-pctv-hd
> input: em28xx IR (em28xx #0) as /devices/pci0000:00/0000:00:1d.7/usb4/4-1/rc/rc1/input8
> rc1: em28xx IR (em28xx #0) as /devices/pci0000:00/0000:00:1d.7/usb4/4-1/rc/rc1
> em28xx #0: v4l2 driver version 0.1.2
> em28xx #0: V4L2 video device registered as video1
> INFO: task khubd:1217 blocked for more than 120 seconds.
> "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
> khubd D 0000000000000000 0 1217 2 0x00000000
> ffff8801a7081ef0 0000000000000046 ffff8801a69a9fd8 ffffffff8162b020
> 0000000000010280 ffff8801a69a9fd8 0000000000004000 0000000000010280
> ffff8801a69a9fd8 ffff8801a7081ef0 0000000000010280 ffff8801a69a8000
> Call Trace:
> [<ffffffff8128580e>] ? apic_timer_interrupt+0xe/0x20
> [<ffffffff8113ffff>] ? memscan+0x3/0x18
> [<ffffffff8128354e>] ? __mutex_lock_slowpath+0x15c/0x295
> [<ffffffff81283690>] ? mutex_lock+0x9/0x18
> [<ffffffffa0694671>] ? dvb_init+0x99/0xcc8 [em28xx_dvb]
> [<ffffffffa0662459>] ? em28xx_init_extension+0x35/0x53 [em28xx]
> [<ffffffffa0660938>] ? em28xx_usb_probe+0x827/0x8df [em28xx]
>
> Cheers,
> Chris
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Possible cause of replug lockup in em28xx-dvb
2011-08-15 8:39 ` Steve Kerrison
@ 2011-08-16 0:58 ` Chris Rankin
0 siblings, 0 replies; 3+ messages in thread
From: Chris Rankin @ 2011-08-16 0:58 UTC (permalink / raw)
To: steve, linux-media
Hi,
I've been "plugging away" at the locking issue in the em28xx / em28xx-dvb
modules, and I think I've found the reason. Basically, we're trying to acquire
the dev->lock mutex again in dvb_init() when we've already acquired it in
em28xx_init_dev().
The exact sequence is:
em28xx_init_dev()
- em28xx_init_extension()
-- ops->init(dev) function for each extension
where ops->init = dvb_init() for the em28xx-dvb extension. However, if you
remove the em28xx-dvb module first then the em28xx_extension_devlist is empty
and you avoid calling dvb_init().
As to the fix, I'm thinking of moving the mutex_lock() / mutex_unlock() calls
from dvb_init() to em28xx_register_extension() instead. This way, we ensure that
dvb_init() is still always called with the dvb->lock mutex held.
I'll submit a patch for review in the morning. (Or should I say, "later this
morning"...)
Cheers,
Chris
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-08-16 0:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 0:05 PCTV 290e - assorted problems Chris Rankin
2011-08-15 8:39 ` Steve Kerrison
2011-08-16 0:58 ` Possible cause of replug lockup in em28xx-dvb Chris Rankin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox