You are not logged in.

#1 2014-06-18 22:31:29

Ochi
Member
Registered: 2010-04-06
Posts: 51

v4l2 capture with ffmpeg causes kernel oops with 3.15.1

Hello,

with kernel 3.15.1-1 and ffmpeg 1:2.2.3-2, I get a pretty bad oops when doing this:

ffmpeg -f v4l2 -i /dev/video0 /tmp/out.mp4

I'm normally using a more complex version of that line for streaming, and it worked perfectly before (including kernel 3.14.6-1 which was the last kernel I used before updating to 3.15).

This is what dmesg tells me:

[   29.218022] BUG: unable to handle kernel paging request at ffff8800dfdb3a30
[   29.218142] IP: [<ffffffffa0a24c02>] __vb2_queue_alloc+0x82/0x500 [videobuf2_core]
[   29.218255] PGD 1b3e067 PUD 42fdff067 PMD 0 
[   29.218327] Oops: 0002 [#1] PREEMPT SMP 
[   29.218396] Modules linked in: fuse ctr ccm radeon ttm joydev mousedev coretemp hwmon ext4 intel_rapl dell_wmi sparse_keymap x86_pkg_temp_thermal intel_powerclamp iTCO_wdt mbcache iTCO_vendor_support jbd2 kvm_intel dell_laptop kvm dcdbas arc4 microcode iwldvm led_class mac80211 evdev mac_hid snd_hda_codec_hdmi ecb uvcvideo iwlwifi snd_hda_codec_idt uas snd_hda_codec_generic videobuf2_vmalloc videobuf2_memops btusb cdc_ether videobuf2_core videodev bluetooth cdc_wdm usbnet i915 cdc_acm media cfg80211 psmouse snd_hda_intel serio_raw i2c_i801 snd_hda_controller snd_hda_codec snd_hwdep drm_kms_helper snd_pcm 6lowpan_iphc wmi rfkill battery crc16 r8169 snd_timer lpc_ich drm mii snd soundcore thermal intel_gtt i2c_algo_bit i2c_core video ac button mei_me mei shpchp processor btrfs xor raid6_pq ums_realtek
[   29.219661]  usb_storage dm_crypt dm_mod sd_mod crc_t10dif sr_mod cdrom atkbd libps2 crct10dif_pclmul crct10dif_common crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel ahci aes_x86_64 lrw gf128mul libahci glue_helper ablk_helper cryptd xhci_hcd libata ehci_pci ehci_hcd scsi_mod usbcore usb_common i8042 serio
[   29.220143] CPU: 0 PID: 528 Comm: ffmpeg Not tainted 3.15.1-1-ARCH #1
[   29.220227] Hardware name: Dell Inc. Vostro 3350/0M516T, BIOS A09 08/03/2012
[   29.220317] task: ffff88040c97d180 ti: ffff8800c52d8000 task.ti: ffff8800c52d8000
[   29.220411] RIP: 0010:[<ffffffffa0a24c02>]  [<ffffffffa0a24c02>] __vb2_queue_alloc+0x82/0x500 [videobuf2_core]
[   29.220545] RSP: 0018:ffff8800c52dbbf8  EFLAGS: 00010287
[   29.220614] RAX: 0000000003357400 RBX: ffff8800c62f98d8 RCX: ffff880403357800
[   29.220703] RDX: 0000000003357421 RSI: 0000000000000000 RDI: ffffffff81b0e470
[   29.220792] RBP: ffff8800c52dbc48 R08: ffff8800c62f98d8 R09: ffffea00100a2f40
[   29.220880] R10: 0000000000004227 R11: 000000000000001f R12: ffff880403357800
[   29.220969] R13: 0000000000000001 R14: ffff8800c62f9abc R15: 0000000000000022
[   29.221060] FS:  00007fd32f6f7780(0000) GS:ffff88042fa00000(0000) knlGS:0000000000000000
[   29.221161] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   29.221234] CR2: ffff8800dfdb3a30 CR3: 00000000c52bf000 CR4: 00000000000407f0
[   29.221323] Stack:
[   29.221352]  0000002100000000 ffff880000000001 0000000100000100 ffff880403357800
[   29.221462]  ffff8800c62f98d8 ffff8800c62f98d8 ffff8800c62f9ab8 ffff8800c62f9a78
[   29.221571]  ffff8800c52dbdb0 ffff8800c52dbdb8 ffff8800c52dbc90 ffffffffa0a2729c
[   29.221679] Call Trace:
[   29.221725]  [<ffffffffa0a2729c>] __reqbufs.isra.12+0x15c/0x2d0 [videobuf2_core]
[   29.221825]  [<ffffffffa0a274e0>] vb2_reqbufs+0x30/0x40 [videobuf2_core]
[   29.221916]  [<ffffffffa0abd70e>] uvc_alloc_buffers+0x2e/0x50 [uvcvideo]
[   29.222007]  [<ffffffffa0abf8bb>] uvc_v4l2_do_ioctl+0xe4b/0x14f0 [uvcvideo]
[   29.222102]  [<ffffffff8116c822>] ? do_read_fault.isra.59+0x1b2/0x2d0
[   29.222192]  [<ffffffffa08ab066>] video_usercopy+0x366/0x5f0 [videodev]
[   29.222282]  [<ffffffffa0abea70>] ? uvc_v4l2_set_streamparm.isra.7+0x1a0/0x1a0 [uvcvideo]
[   29.222389]  [<ffffffff81510adc>] ? __do_page_fault+0x2ec/0x600
[   29.222470]  [<ffffffffa0abdf3f>] uvc_v4l2_ioctl+0x2f/0x70 [uvcvideo]
[   29.222559]  [<ffffffffa08a6894>] v4l2_ioctl+0x154/0x190 [videodev]
[   29.222642]  [<ffffffff811c7260>] do_vfs_ioctl+0x2d0/0x4b0
[   29.222715]  [<ffffffff811c74c1>] SyS_ioctl+0x81/0xa0
[   29.222785]  [<ffffffff815159a9>] system_call_fastpath+0x16/0x1b
[   29.222861] Code: f8 41 89 04 24 8b 03 41 89 44 24 04 8b 45 b8 83 f8 01 41 89 44 24 3c 74 50 8b 83 50 01 00 00 41 8d 14 07 41 83 c7 01 44 3b 7d c0 <4c> 89 64 d3 50 0f 84 ae 02 00 00 8b 7b 38 be d0 80 00 00 e8 56 
[   29.223381] RIP  [<ffffffffa0a24c02>] __vb2_queue_alloc+0x82/0x500 [videobuf2_core]
[   29.223487]  RSP <ffff8800c52dbbf8>
[   29.223533] CR2: ffff8800dfdb3a30
[   29.240599] ---[ end trace 3403cde79167bebe ]---

After that, ffmpeg hangs hard; not even killall -7 or -9 works. On my laptop, trying to reboot causes a complete panic, consistently. On another machine I'm at least able to reboot even though systemd has a hard time killing ffmpeg.

The error occurs no matter if I'm using the integrated webcam of the laptop or an external Logitech webcam. Also, vlc is able to play the video from the camera just fine.

Anyone experiencing similar problems? If anyone thinks this might actually be a kernel bug and is more into kernel development, please feel free to forward this to suitable mailing lists or the like, thanks.

- Ochi

Last edited by Ochi (2014-06-18 22:33:21)

Offline

#2 2014-06-21 00:34:17

TiZ
Member
Registered: 2009-02-27
Posts: 58

Re: v4l2 capture with ffmpeg causes kernel oops with 3.15.1

I am having the very same issue. So I'll probably roll back to an earlier kernel until a fix gets confirmed for this.

Offline

#3 2014-06-22 12:12:05

Ochi
Member
Registered: 2010-04-06
Posts: 51

Re: v4l2 capture with ffmpeg causes kernel oops with 3.15.1

Seems like it's currently being worked on:

https://bugzilla.kernel.org/show_bug.cgi?id=72991
https://bugzilla.kernel.org/show_bug.cgi?id=78071

Also note that one of the posts suggests that 3.16-rc1 solves the problem. I haven't tried 3.16 yet, but I'm also fine with using 3.14 until 3.16 is out.

Offline

Board footer

Powered by FluxBB