[mythtv-users] Kernel Crash when starting up in au0828-video.c line 895

jrh jharbestonus at gmail.com
Sun Apr 8 21:38:55 UTC 2012


On Apr 8, 2012, at 5:09 PM, Larry Finger wrote:

> On 04/08/2012 03:43 PM, jrh wrote:
>> 
>> On Apr 8, 2012, at 4:03 PM, Mark Lord wrote:
>> 
>>> On 12-04-08 04:01 PM, Mark Lord wrote:
>>>> On 12-04-08 02:34 AM, f-myth-users at media.mit.edu wrote:
>>>>>> Date: Sat, 07 Apr 2012 20:56:23 -0400
>>>>>> From: Mark Lord<mythtv at rtr.ca>
>>>>> 
>>>>>> I should add that, even with the above workarounds, there is STILL an issue
>>>>>> when mythbackend starts up:  If you have "multi-rec" enabled (more than one
>>>>>> virtual tuner per physical HVR-950Q), then the backend will have several
>>>>>> near-simultaneous "tune to initial channel" calls into the drivers.
>>>>> 
>>>>>> This will cause tuner failure.
>>>>> 
>>>>> I haven't been following this thread closely (not my hardware), but
>>>>> would it be possible to tune using an external tuner script that uses
>>>>> a mutex and some sleeps to avoid simultaneous tunes?  I have no idea
>>>>> if the way multirec tunes this hardware is amenable to breaking it
>>>>> out externally like that.
>>>> 
>>>> Mythtv doesn't offer external channel change scripts for all digital tuners,
>>>> dunno if it has the option for the 950Q or not.
>>>> 
>>>> But the place for the mutex is somewhere in one of the drivers that manages
>>>> the 950Q, probably in the au0828 driver.  At some point I suspect I'll go in
>>>> there and just fix the danged thing myself.  But for now, disabling multirec
>>>> keeps it working well enough.
>>> 
>>> Another related thing might be to fix mythbackend to NOT issue channel tuning
>>> requests to virtual tuners when the physical tuner is already tuned appropriately.
>> 
>> 
>> The way I was set up, I never enabled the digital side of the 950Q. I was only using the analog side. Also, I am using the 64 bit version.
>> 
>> I did try the 32 bit version, but had the same errors as below.. again only using the analog side, never adding the DVB ATSC tuner:
>> 
>> 
>> Apr  7 15:47:51 myth1204 mythbackend[1590]: I CoreContext v4lchannel.cpp:661 (SetInputAndFormat) V4LChannel(/dev/video0): SetInputAndFormat(1, NTSC) (v4l v2) input_switch: 0 mode_switch: 1
>> 
>> 
>> 
>> The messages below lead me to believe that maybe one of the ioctl calls in the v4l stuff may have had a null pointer passed to it.
>> 
>> Apr  7 15:47:50 myth1204 kernel: [   18.216226] ------------[ cut here ]------------
>> Apr  7 15:47:50 myth1204 kernel: [   18.216284] kernel BUG at /build/buildd/linux-3.2.0/drivers/media/video/au0828/au0828-video.c:895!
>> Apr  7 15:47:50 myth1204 kernel: [   18.216357] invalid opcode: 0000 [#1] SMP
>> Apr  7 15:47:50 myth1204 kernel: [   18.216394] CPU 0
>> Apr  7 15:47:50 myth1204 kernel: [   18.216412] Modules linked in: xc5000 tuner au8522 ppdev snd_usb_audio snd_atiixp snd_ac97_codec ac97_bus snd_pcm snd_hwdep snd_usbmidi_lib snd_seq_midi snd_rawmidi snd_seq_midi_event au0828 psmouse dvb_core snd_seq videobuf_vmalloc videobuf_core tveeprom v4l2_common snd_timer snd_seq_device videodev serio_raw v4l2_compat_ioctl32 radeon edac_core snd k8temp edac_mce_amd soundcore ttm snd_page_alloc drm_kms_helper i2c_piix4 drm i2c_algo_bit nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc parport_pc mac_hid shpchp lp parport hid_apple usbhid hid 8139too usb_storage 8139cp pata_atiixp sata_sil floppy
> 
> Please supply the rest of the bug message that tells what called res_free(). The bug is because there has been an attempt to free something that seems not to have been reserved.
> 
> Do you build your own kernels, or could you? If so, it will be easy to provide a patch that prints a warning, but does not crash the kernel.
> 
> Larry
> 
> 


I haven't built a kernel since the 1.2 days. The kernel involved below is the stock kernel as of yesterday's ubuntu 12.04 updates.

Linux myth1204 3.2.0-22-generic #35-Ubuntu SMP Tue Apr 3 18:33:15 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

If I had a howto for building it, I could probably work out how. I do software development, just not at the kernel level.


Regards!

Here is the full kernel BUG trace:


Apr  7 15:47:50 myth1204 kernel: [   18.216226] ------------[ cut here ]------------
Apr  7 15:47:50 myth1204 kernel: [   18.216284] kernel BUG at /build/buildd/linux-3.2.0/drivers/media/video/au0828/au0828-video.c:895!
Apr  7 15:47:50 myth1204 kernel: [   18.216357] invalid opcode: 0000 [#1] SMP 
Apr  7 15:47:50 myth1204 kernel: [   18.216394] CPU 0 
Apr  7 15:47:50 myth1204 kernel: [   18.216412] Modules linked in: xc5000 tuner au8522 ppdev snd_usb_audio snd_atiixp snd_ac97_codec ac97_bus snd_pcm snd_hwdep snd_usbmidi_lib snd_seq_midi snd_rawmidi snd_seq_midi_event au0828 psmouse dvb_core snd_seq videobuf_vmalloc videobuf_core tveeprom v4l2_common snd_timer snd_seq_device videodev serio_raw v4l2_compat_ioctl32 radeon edac_core snd k8temp edac_mce_amd soundcore ttm snd_page_alloc drm_kms_helper i2c_piix4 drm i2c_algo_bit nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc parport_pc mac_hid shpchp lp parport hid_apple usbhid hid 8139too usb_storage 8139cp pata_atiixp sata_sil floppy
Apr  7 15:47:50 myth1204 kernel: [   18.216950] 
Apr  7 15:47:50 myth1204 kernel: [   18.216965] Pid: 1590, comm: mythbackend Not tainted 3.2.0-22-generic #35-Ubuntu Gateway  /MS-7145
Apr  7 15:47:50 myth1204 kernel: [   18.217042] RIP: 0010:[<ffffffffa03e810f>]  [<ffffffffa03e810f>] res_free.isra.10+0x6f/0x90 [au0828]
Apr  7 15:47:50 myth1204 kernel: [   18.217127] RSP: 0018:ffff880043181c08  EFLAGS: 00010202
Apr  7 15:47:50 myth1204 kernel: [   18.217169] RAX: 0000000000000000 RBX: ffff880052a34000 RCX: 0000000000016ae1
Apr  7 15:47:50 myth1204 kernel: [   18.217226] RDX: 0000000000000001 RSI: ffff880041920c08 RDI: ffff880052a34000
Apr  7 15:47:50 myth1204 kernel: [   18.217282] RBP: ffff880043181c28 R08: ffffea000146b280 R09: ffffffff81494f17
Apr  7 15:47:50 myth1204 kernel: [   18.217338] R10: dead000000200200 R11: 0000000000000001 R12: ffff880052a34000
Apr  7 15:47:50 myth1204 kernel: [   18.217394] R13: ffff880041920c08 R14: 0000000000000001 R15: 0000000040045613
Apr  7 15:47:50 myth1204 kernel: [   18.217451] FS:  00007f3432126780(0000) GS:ffff880057c00000(0000) knlGS:0000000000000000
Apr  7 15:47:50 myth1204 kernel: [   18.217514] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr  7 15:47:50 myth1204 kernel: [   18.217559] CR2: 00007f3431a11900 CR3: 000000005200f000 CR4: 00000000000006f0
Apr  7 15:47:50 myth1204 kernel: [   18.217615] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Apr  7 15:47:50 myth1204 kernel: [   18.217671] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Apr  7 15:47:50 myth1204 kernel: [   18.217727] Process mythbackend (pid: 1590, threadinfo ffff880043180000, task ffff880051afade0)
Apr  7 15:47:50 myth1204 kernel: [   18.217794] Stack:
Apr  7 15:47:50 myth1204 kernel: [   18.217812]  ffff880041920c00 ffff880052a34000 0000000000000000 ffff880052a34060
Apr  7 15:47:50 myth1204 kernel: [   18.217877]  ffff880043181c58 ffffffffa03e82a7 ffff880037134000 0000000000000000
Apr  7 15:47:50 myth1204 kernel: [   18.217943]  ffff880041832600 ffffffffa03ebe00 ffff880043181d68 ffffffffa036d7c0
Apr  7 15:47:50 myth1204 kernel: [   18.218008] Call Trace:
Apr  7 15:47:50 myth1204 kernel: [   18.218034]  [<ffffffffa03e82a7>] vidioc_streamoff+0x177/0x1c0 [au0828]
Apr  7 15:47:50 myth1204 kernel: [   18.218097]  [<ffffffffa036d7c0>] __video_do_ioctl+0x1010/0x5560 [videodev]
Apr  7 15:47:50 myth1204 kernel: [   18.218158]  [<ffffffff81119a0e>] ? filemap_fault+0xee/0x3e0
Apr  7 15:47:50 myth1204 kernel: [   18.218207]  [<ffffffff8116de5b>] ? mem_cgroup_update_page_stat+0x2b/0x110
Apr  7 15:47:50 myth1204 kernel: [   18.218263]  [<ffffffff8111716a>] ? unlock_page+0x2a/0x40
Apr  7 15:47:50 myth1204 kernel: [   18.218308]  [<ffffffff8113a499>] ? __do_fault+0x439/0x550
Apr  7 15:47:50 myth1204 kernel: [   18.218354]  [<ffffffff815283c4>] ? do_sock_write.isra.10+0xd4/0xf0
Apr  7 15:47:50 myth1204 kernel: [   18.218408]  [<ffffffffa036c55c>] video_usercopy+0x27c/0x340 [videodev]
Apr  7 15:47:50 myth1204 kernel: [   18.218464]  [<ffffffffa036c7b0>] ? v4l2_norm_to_name+0x50/0x50 [videodev]
Apr  7 15:47:50 myth1204 kernel: [   18.218519]  [<ffffffff8113dbd8>] ? handle_mm_fault+0x1f8/0x350
Apr  7 15:47:50 myth1204 kernel: [   18.218570]  [<ffffffffa036c635>] video_ioctl2+0x15/0x20 [videodev]
Apr  7 15:47:50 myth1204 kernel: [   18.218622]  [<ffffffffa036b447>] v4l2_ioctl+0x147/0x150 [videodev]
Apr  7 15:47:50 myth1204 kernel: [   18.218674]  [<ffffffff81189cfa>] do_vfs_ioctl+0x8a/0x340
Apr  7 15:47:50 myth1204 kernel: [   18.218720]  [<ffffffff81659f1c>] ? __schedule+0x3cc/0x6f0
Apr  7 15:47:50 myth1204 kernel: [   18.218764]  [<ffffffff8118a041>] sys_ioctl+0x91/0xa0
Apr  7 15:47:50 myth1204 kernel: [   18.218807]  [<ffffffff81664a82>] system_call_fastpath+0x16/0x1b
Apr  7 15:47:50 myth1204 kernel: [   18.218854] Code: 45 00 21 83 a4 0c 00 00 f6 05 ad 68 00 00 01 75 1c 4c 89 e7 e8 03 2e 27 e1 48 8b 5d e0 4c 8b 65 e8 4c 8b 6d f0 4c 8b 75 f8 c9 c3 <0f> 0b 44 89 f6 48 c7 c7 fd d5 3e a0 31 c0 e8 17 c0 25 e1 eb d1 
Apr  7 15:47:50 myth1204 kernel: [   18.219129] RIP  [<ffffffffa03e810f>] res_free.isra.10+0x6f/0x90 [au0828]
Apr  7 15:47:50 myth1204 kernel: [   18.219188]  RSP <ffff880043181c08>
Apr  7 15:47:50 myth1204 kernel: [   18.232124] ---[ end trace 6ad28ff06b0ab711 ]---





More information about the mythtv-users mailing list