On Wednesday 12 December 2007 11:05:30 Mark Bryars wrote:
> Got a slightly different type of crash over the last two days.
>
> Any suggestions of what to try to help fix this would be appreciated.
>
> Regards,
> Mark
Hi Mark,
Looking at the traces you've provided I'm beginning to suspect that some
interrupt handler locks up. Especially the EIP at _spin_lock is
suspicious. I went over the ivtv interrupt code again and I simply
cannot find anything wrong.
There are a few things you can try: first turn on all the
spinlock-related debug options inside the Kernel hacking / Kernel
debugging config menu. See if that turns up anything interesting.
At the same time you can also add the following code to the
ivtv_irq_handler() function before the spin_lock line at the start:
if (spin_is_locked(&itv->dma_reg_lock))
IVTV_ERR("dma_reg_lock already locked! Deadlocked...\n");
This assumes that you do not have an PVR-350, or if you do that you do
not use any of the decoding facilities of the PVR-350. The lock is only
there to protect against MPEG encoding/decoding interactions. If you do
no hardware decoding then this lock should never be held at the start
of the interrupt function. So if you ever see the Deadlocked message,
then we know that there is a race condition.
The other spin_lock that is used in interrupt context is qlock. You can
add the following code in ivtv-queue.c before each
spin_lock_irqsave(&s->qlock, flags) line (it's used three times):
if (in_interrupt() && spin_is_locked(&s->qlock))
printk("qlock deadlock!\n");
Basically this lock should never be held when called from interrupt
context.
As far as I can see neither of these two locks can ever fail, but it
can't hurt to put in these checks regardless.
Let's see what happens...
Regards,
Hans
>
>
> BUG: soft lockup - CPU#0 stuck for 11s! [hsp:1507]
>
> Pid: 1507, comm: hsp Not tainted (2.6.24-rc3 #1)
> EIP: 0060:[<c03b8831>] EFLAGS: 00000286 CPU: 0
> EIP is at _spin_lock+0x7/0xf
> EAX: cd0809b8 EBX: c0654ca0 ECX: f5040000 EDX: cd080000
> ESI: 00000001 EDI: 000000a0 EBP: cd080000 ESP: d5c01d98
> DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
> CR0: 8005003b CR2: 08161f20 CR3: 24638000 CR4: 000006d0
> DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
> DR6: ffff0ff0 DR7: 00000400
> [<f4fead39>] ivtv_irq_handler+0x14/0x109b [ivtv]
> [<c011b814>] __update_rq_clock+0x1a/0x15e
> [<f4a1bc05>] budget_ci_irq+0xaa/0xc9 [budget_ci]
> [<f49fa914>] interrupt_hw+0xc9/0x245 [saa7146]
> [<c012c263>] run_timer_softirq+0x30/0x173
> [<c0145489>] handle_IRQ_event+0x25/0x4a
> [<c0146873>] handle_fasteoi_irq+0x5f/0xb4
> [<c0106010>] do_IRQ+0x3b/0x7b
> [<c0115e98>] smp_apic_timer_interrupt+0x5a/0x85
> [<c01048c3>] common_interrupt+0x23/0x28
> [<f4fec527>] ivtv_buf_swap+0x17/0x25 [ivtv]
> [<f4fe40f7>] ivtv_v4l2_read+0xa76/0xaca [ivtv]
> [<c011b814>] __update_rq_clock+0x1a/0x15e
> [<c03b6e7b>] schedule+0x1ea/0x683
> [<c0137ed2>] enqueue_hrtimer+0x59/0x6b
> [<c01381eb>] lock_hrtimer_base+0x15/0x2f
> [<c013826e>] hrtimer_try_to_cancel+0x33/0x66
> [<c01382af>] hrtimer_cancel+0xe/0x14
> [<c03b7d7c>] do_nanosleep+0x59/0x6d
> [<c01358fb>] autoremove_wake_function+0x0/0x37
> [<c0165c5c>] vfs_read+0x89/0x117
> [<f4fe3681>] ivtv_v4l2_read+0x0/0xaca [ivtv]
> [<c0166090>] sys_read+0x41/0x6a
> [<c0103f1a>] syscall_call+0x7/0xb
> =======================
_______________________________________________
ivtv-devel mailing list
[email protected]
http://ivtvdriver.org/mailman/listinfo/ivtv-devel