[Libav-user] Kernel preemption incompatible with libav?
Andrew Muehlfeld
andrew.muehlfeld at fourthwing.com
Thu Apr 10 17:11:45 CEST 2014
I am using an old version of the libav libraries compiled for ARM, running on an embedded processor, using Linux 3.0.0. ffmpeg version is 2008-09-16, SVN-r15339. I am using libavformat, libavutil, and libavcodec to package an H.264 ES into an MPEG-2 TS. My application runs fine with linux kernel preemption disabled (CONFIG_PREEMPT_NONE), but fails when set to voluntary preepmtion (CONFIG_PREEMPT_VOLUNTARY) or full preemption (CONFIG_PREEMPT). Is this expected? Due to other things running on the processor, kernel preemption is required. I am considering compiling the latest ffmpeg and trying again, but thought it would be worth asking first.
Below is the kernel output when running my application that uses libav with kernel preemption enabled.
[ 3367.879028] BUG: sleeping function called from invalid context at arch/arm/mm/fault.] (_raw_spin_lock_irqsave+0x48/0x84)
[ 3368.018646] [<c055a6b4>] (_raw_spin_lock_irqsave+0x48/0x84) from [<c00a6470>] (remove_wait_queue+0x10/0x48)
[ 3368.029113] [<c00a6470>] (remove_wait_queue+0x10/0x48) from [<bf033cb0>] (SYNC_WaitSEM+0x1a4/0x24c [dsplinkk])
[ 3368.039855] [<bf033cb0>] (SYNC_WaitSEM+0x1a4/0x24c [dsplinkk]) from [<bf02966c>] (LDRV_MSGQ_get+0x98/0xcc [dsplinkk])
[ 3368.051269] [<bf02966c>] (LDRV_MSGQ_get+0x98/0xcc [dsplinkk]) from [<bf037180>] (DRV_Ioctl+0x460/0x958 [dsplinkk])
[ 3368.062286] [<bf037180>] (DRV_Ioctl+0x460/0x958 [dsplinkk]) from [<c0133db4>] (do_vfs_ioctl+0x88/0x580)
[ 3368.072174] [<c0133db4>] (do_vfs_ioctl+0x88/0x580) from [<c0134320>] (sys_ioctl+0x74/0x7c)
[ 3368.080902] [<c0134320>] (sys_ioctl+0x74/0x7c) from [<c0051040>] (ret_fast_syscall+0x0/0x3c)
[ 3368.089782] Unable to handle kernel paging request at virtual address f11bb018
[ 3368.097381] pgd = def9c000
[ 3368.100219] [f11bb018] *pgd=9ced2811, *pte=00000000, *ppte=00000000
[ 3368.106842] Internal error: Oops: 7 [#1]
[ 3368.110961] Modules linked in: sdmak lpm_omap3530 dsplinkk cmemk g_ether
[ 3368.118072] CPU: 0 Not tainted (3.0.0-BSP-dm37x-2.3-2-svn155 #384)
[ 3368.124938] PC is at __lock_acquire+0x6c/0x1d30
[ 3368.129699] LR is at lock_acquire+0xd4/0xf8
[ 3368.134124] pc : [<c00bcb74>] lr : [<c00bee40>] psr: 20000093
[ 3368.134124] sp : dcd6fd10 ip : dce86140 fp : c08fb060
[ 3368.146179] r10: c0940f70 r9 : c08de2f0 r8 : f11bb018
[ 3368.151672] r7 : 00000000 r6 : 00000002 r5 : 00000001 r4 : 00000001
[ 3368.158538] r3 : 60000093 r2 : 00000000 r1 : 00000000 r0 : f11bb018
[ 3368.165405] Flags: nzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment user
[ 3368.173004] Control: 10c5387d Table: 9ef9c019 DAC: 00000015
[ 3368.179046] Process boostApp_dm3730 (pid: 9307, stack limit = 0xdcd6e2f0)
[ 3368.186157] Stack: (0xdcd6fd10 to 0xdcd70000)
[ 3368.190765] fd00: dce86140 c008220c 00000000 dce86140
[ 3368.199371] fd20: dede9700 c00bb9e8 00000000 dce8a080 00000000 c008220c dede9700 00000094
[ 3368.207977] fd40: dce92040 dce86140 dcd6fdec c0557a24 00000000 00000000 dce86140 00000001
[ 3368.216583] fd60: c08f349c c076860c c08fb060 c0762168 c0558338 dcd6e000 18c4f852 00000310
[ 3368.225189] fd80: 00000000 dce86590 0000028b 00000000 00000002 dce86590 0000028e 00000000
[ 3368.233795] fda0: 00000007 c0940f70 ffffffff dce86140 dcd6fe00 c00bb6a4 dce86140 c0558c20
[ 3368.242401] fdc0: e097f000 00000000 00000000 00000000 00000000 f11bb018 00000002 60000093
[ 3368.251007] fde0: 00000000 c00bee40 00000002 00000080 00000000 c00a6470 00000000 00000000
[ 3368.259613] fe00: 00000000 00000000 f11bb018 f11bb008 c00a6470 00000013 ffffffff 80040800
[ 3368.268218] fe20: 43bec624 c055a6b4 00000002 00000000 c00a6470 f11bb008 dcd6fe64 f11bb008
[ 3368.276824] fe40: 00000001 f11bb008 dcd6fe64 c00a6470 fffffe00 dcd6e000 00000001 bf033cb0
[ 3368.285430] fe60: 60000013 00000001 dce86140 c00820f4 f11bb030 f11bb030 60000013 00000000
[ 3368.294036] fe80: 00008000 bf03af58 dcd6fefc f11b7000 80040800 bf02966c c018e03a 43bec63c
[ 3368.302642] fea0: 00000009 43bec63c dcd6fee4 dcd6e000 00000000 bf037180 00000001 dce86590
[ 3368.311248] fec0: 0000000b 00000000 00000002 c055d39c dce86140 c008220c 00000001 dce86140
[ 3368.319854] fee0: dede9700 00008000 001d6e90 00010000 ffffffff 00000000 00008000 00000000
[ 3368.328460] ff00: def78180 43bec63c 00000009 43bec63c def78180 dcd6e000 00000000 c0133db4
[ 3368.337066] ff20: c0125890 c00b8f08 00000000 00000000 dce86140 c0125890 00000001 c00bed48
[ 3368.345672] ff40: def78180 00000000 00000009 dcd6ff8c c0051208 dcd6e000 00000000 c01258a4
[ 3368.354278] ff60: 00000001 00000000 43bec63c c018e03a 00000009 def78180 dcd6e000 00000000
[ 3368.362884] ff80: 43bec624 c0134320 001bc400 00000001 001bc400 ffffffff 43bec6d4 00000036
[ 3368.371490] ffa0: c0051208 c0051040 001bc400 ffffffff 00000009 c018e03a 43bec63c 00000009
[ 3368.380096] ffc0: 001bc400 ffffffff 43bec6d4 00000036 00010000 00011524 001bcac0 43bec624
[ 3368.388702] ffe0: 001cd924 43bec510 000682a0 411e8aec 80000010 00000009 01891a28 e2000000
[ 3368.397308] [<c00bcb74>] (__lock_acquire+0x6c/0x1d30) from [<c00bee40>] (lock_acquire+0xd4/0xf8)
[ 3368.406585] [<c00bee40>] (lock_acquire+0xd4/0xf8) from [<c055a6b4>] (_raw_spin_lock_irqsave+0x48/0x84)
[ 3368.416381] [<c055a6b4>] (_raw_spin_lock_irqsave+0x48/0x84) from [<c00a6470>] (remove_wait_queue+0x10/0x48)
[ 3368.426757] [<c00a6470>] (remove_wait_queue+0x10/0x48) from [<bf033cb0>] (SYNC_WaitSEM+0x1a4/0x24c [dsplinkk])
[ 3368.437499] [<bf033cb0>] (SYNC_WaitSEM+0x1a4/0x24c [dsplinkk]) from [<bf02966c>] (LDRV_MSGQ_get+0x98/0xcc [dsplinkk])
[ 3368.448883] [<bf02966c>] (LDRV_MSGQ_get+0x98/0xcc [dsplinkk]) from [<bf037180>] (DRV_Ioctl+0x460/0x958 [dsplinkk])
[ 3368.459899] [<bf037180>] (DRV_Ioctl+0x460/0x958 [dsplinkk]) from [<c0133db4>] (do_vfs_ioctl+0x88/0x580)
[ 3368.469787] [<c0133db4>] (do_vfs_ioctl+0x88/0x580) from [<c0134320>] (sys_ioctl+0x74/0x7c)
[ 3368.478485] [<c0134320>] (sys_ioctl+0x74/0x7c) from [<c0051040>] (ret_fast_syscall+0x0/0x3c)
[ 3368.487365] Code: e34ca094 e59a3000 e3530000 0a000073 (e5982000)
[ 3368.494506] ---[ end trace 229bd4d4db5b35dd ]---
[ 3368.500762] Unable to handle kernel paging request at virtual address e0a03094
[ 3368.508453] pgd = def9c000
[ 3368.511291] [e0a03094] *pgd=9efc1811, *pte=00000000, *ppte=00000000
[ 3368.517974] Internal error: Oops: 807 [#2]
[ 3368.522308] Modules linked in: sdmak lpm_omap3530 dsplinkk cmemk g_ether
[ 3368.529418] CPU: 0 Tainted: G D (3.0.0-BSP-dm37x-2.3-2-svn155 #384)
[ 3368.537322] PC is at ZCPYMQT_locate+0x17c/0x2cc [dsplinkk]
[ 3368.543090] LR is at _raw_spin_unlock_irqrestore+0x30/0x44
[ 3368.548889] pc : [<bf02a874>] lr : [<c055ae40>] psr: a0000013
[ 3368.548889] sp : dcebde48 ip : 00000000 fp : 0019e194
[ 3368.560943] r10: 001e422c r9 : 001e422c r8 : 00000001
[ 3368.566436] r7 : bf03af98 r6 : 0019e194 r5 : 00000000 r4 : fffffe00
[ 3368.573303] r3 : e0a03080 r2 : 00000000 r1 : 80008051 r0 : 80040800
[ 3368.580169] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
[ 3368.587677] Control: 10c5387d Table: 9ef9c019 DAC: 00000015
[ 3368.593719] Process boostApp_dm3730 (pid: 9312, stack limit = 0xdcebc2f0)
[ 3368.600830] Stack: (0xdcebde48 to 0xdcebe000)
[ 3368.605438] de40: 0000000a 00000001 f11d1000 00000000 00000000 e0a03080
[ 3368.614044] de60: c018e034 00000000 00000001 e0909000 bf03af58 4664f424 8000802d bf029858
[ 3368.622650] de80: 4664f424 c0073cb8 00000002 00000000 dce90140 c018e034 4664f3f0 00000009
[ 3368.631256] dea0: 4664f3f0 dcebdee4 dcebc000 00000000 4664f3dc bf037230 00000001 dce90590
[ 3368.639862] dec0: 0000000b 00000000 00000002 c055d39c dce90140 c008220c 00000001 dce90140
[ 3368.648468] dee0: dede9700 00008000 0019e194 001e422c 4664f424 001bc400 001e422c 00000000
[ 3368.657073] df00: def78180 4664f3f0 00000009 4664f3f0 def78180 dcebc000 00000000 c0133db4
[ 3368.665679] df20: c0125890 c00b8f08 00000000 00000000 dce90140 c0125890 00000001 c00bed48
[ 3368.674285] df40: def78180 00000000 00000009 dcebdf8c c0051208 dcebc000 00000000 c01258a4
[ 3368.682891] df60: 00000001 00000000 4664f3f0 c018e034 00000009 def78180 dcebc000 00000000
[ 3368.691497] df80: 4664f3dc c0134320 001cd924 00000001 001cd924 001cd924 00000001 00000036
[ 3368.700103] dfa0: c0051208 c0051040 001cd924 001cd924 00000009 c018e034 4664f3f0 00000009
[ 3368.708709] dfc0: 001cd924 001cd924 00000001 00000036 001e422c 4664f424 0019e194 4664f3dc
[ 3368.717315] dfe0: 001bc400 4664f2c8 00069768 411e8aec 80000010 00000009 0d3b1a4e 0f06450d
[ 3368.726135] [<bf02a874>] (ZCPYMQT_locate+0x17c/0x2cc [dsplinkk]) from [<bf029858>] (LDRV_MSGQ_locate+0xc4/0xe4 [dsplinkk])
[ 3368.737976] [<bf029858>] (LDRV_MSGQ_locate+0xc4/0xe4 [dsplinkk]) from [<bf037230>] (DRV_Ioctl+0x510/0x958 [dsplinkk])
[ 3368.749267] [<bf037230>] (DRV_Ioctl+0x510/0x958 [dsplinkk]) from [<c0133db4>] (do_vfs_ioctl+0x88/0x580)
[ 3368.759155] [<c0133db4>] (do_vfs_ioctl+0x88/0x580) from [<c0134320>] (sys_ioctl+0x74/0x7c)
[ 3368.767883] [<c0134320>] (sys_ioctl+0x74/0x7c) from [<c0051040>] (ret_fast_syscall+0x0/0x3c)
[ 3368.776763] Code: e3000800 e3480004 e3081051 e3481000 (e583c014)
[ 3368.783294] ---[ end trace 229bd4d4db5b35de ]---
[ 3368.833831] smsc911x smsc911x.0: eth0: maccr 0x1010200C, HASHH 0x00000000, HASHL 0x80000000
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20140410/1b01fcbc/attachment.html>
More information about the Libav-user
mailing list