Bug 78071 - Webcam stopped working in 3.15
Summary: Webcam stopped working in 3.15
Status: RESOLVED INVALID
Alias: None
Product: v4l-dvb
Classification: Unclassified
Component: webcam (show other bugs)
Hardware: i386 Linux
: P1 high
Assignee: webcam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-16 10:12 UTC by LÉVAI Dániel
Modified: 2014-07-01 09:38 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.15.0
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
lspci -v output (5.91 KB, text/plain)
2014-06-16 10:12 UTC, LÉVAI Dániel
Details
lsusb -v output (60.71 KB, text/plain)
2014-06-16 10:12 UTC, LÉVAI Dániel
Details

Description LÉVAI Dániel 2014-06-16 10:12:31 UTC
Created attachment 139911 [details]
lspci -v output

When I try to open the video0 device with an application (ffmpeg, mpv, etc ...), the program goes into uninterruptable sleep, and I get this from the kernel:


Jun 16 11:52:52 hostname kernel: [  128.866418] BUG: unable to handle kernel paging request at b90d8540
Jun 16 11:52:52 hostname kernel: [  128.866522] IP: [<f993afbd>] __vb2_queue_alloc+0x6d/0x440 [videobuf2_core]
Jun 16 11:52:52 hostname kernel: [  128.866627] *pdpt = 000000002d94b001 *pde = 0000000000000000 
Jun 16 11:52:52 hostname kernel: [  128.866713] Oops: 0002 [#1] SMP 
Jun 16 11:52:52 hostname kernel: [  128.866766] Modules linked in: pci_stub vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) rfcomm bnep ipv6 iptable_mangle ipt_MASQUERADE iptable_nat nf_nat_
ipv4 nf_nat xt_tcpudp xt_limit nf_conntrack_ipv4 nf_defrag_ipv4 xt_multiport xt_conntrack nf_conntrack iptable_filter ip_tables x_tables nbd tun cpufreq_ondemand speedstep_lib lp fuse snd_hda_codec_h
dmi i2c_dev btusb bluetooth x86_pkg_temp_thermal intel_powerclamp coretemp iwlmvm mac80211 kvm_intel joydev i915 nouveau ttm drm_kms_helper drm e1000e uvcvideo videobuf2_vmalloc videobuf2_memops vide
obuf2_core videodev sdhci_pci kvm snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel ppdev processor iwlwifi cfg80211 mxm_wmi ptp lpc_ich parport_pc sdhci mmc_core mei_me intel_gtt snd_hda_con
troller i2c_i801 agpgart dell_laptop parport mei dell_wmi sparse_keymap i2c_algo_bit i2c_core thermal pps_core crc32_pclmul wmi crc32c_intel evdev dcdbas psmouse(O) serio_raw ehci_pci snd_hda_codec m
icrocode video snd_hwdep snd_pcm snd_timer rfkill thermal_sys hwmon snd soundcore battery button ac loop hid_generic usbhid hid xhci_hcd ehci_hcd uhci_hcd
Jun 16 11:52:52 hostname kernel: [  128.868514] CPU: 0 PID: 1657 Comm: ffmpeg Tainted: G           O  3.15.0-smp+ #11
Jun 16 11:52:52 hostname kernel: [  128.868610] Hardware name: Dell Inc. Latitude E5440/08RCYC, BIOS A01 09/18/2013
Jun 16 11:52:52 hostname kernel: [  128.868704] task: f027c000 ti: f1f42000 task.ti: f1f42000
Jun 16 11:52:52 hostname kernel: [  128.868775] EIP: 0060:[<f993afbd>] EFLAGS: 00010206 CPU: 0
Jun 16 11:52:52 hostname kernel: [  128.868850] EIP is at __vb2_queue_alloc+0x6d/0x440 [videobuf2_core]
Jun 16 11:52:52 hostname kernel: [  128.868931] EAX: f1e7502d EBX: f1e75000 ECX: f1e74c00 EDX: 00000000
Jun 16 11:52:52 hostname kernel: [  128.869011] ESI: f1e74c00 EDI: f1704488 EBP: f1f43d6c ESP: f1f43d34
Jun 16 11:52:52 hostname kernel: [  128.869092]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Jun 16 11:52:52 hostname kernel: [  128.869163] CR0: 80050033 CR2: b90d8540 CR3: 3095e000 CR4: 001407f0
Jun 16 11:52:52 hostname kernel: [  128.869243] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
Jun 16 11:52:52 hostname kernel: [  128.869323] DR6: fffe0ff0 DR7: 00000400
Jun 16 11:52:52 hostname kernel: [  128.869373] Stack:
Jun 16 11:52:52 hostname kernel: [  128.869403]  f1f43d54 c107fe8f 00000000 00000000 00000100 00000001 f1704488 f1e74c00
Jun 16 11:52:52 hostname kernel: [  128.869540]  f1e74c00 00000001 00000022 f1704488 f1f43e58 f9969920 f1f43da0 f993b88b
Jun 16 11:52:52 hostname kernel: [  128.869679]  00000001 f1704588 f1704568 f1704568 f1704588 f1f43e60 00000100 00000001
Jun 16 11:52:52 hostname kernel: [  128.869817] Call Trace:
Jun 16 11:52:52 hostname kernel: [  128.869860]  [<c107fe8f>] ? __wake_up+0x3f/0x50
Jun 16 11:52:52 hostname kernel: [  128.869928]  [<f9969920>] ? uvc_entity_by_id+0x40/0x40 [uvcvideo]
Jun 16 11:52:52 hostname kernel: [  128.870013]  [<f993b88b>] __reqbufs.isra.12+0x16b/0x330 [videobuf2_core]
Jun 16 11:52:52 hostname kernel: [  128.870106]  [<f993ba79>] vb2_reqbufs+0x29/0x30 [videobuf2_core]
Jun 16 11:52:52 hostname kernel: [  128.870190]  [<f9969c15>] uvc_alloc_buffers+0x25/0x40 [uvcvideo]
Jun 16 11:52:52 hostname kernel: [  128.870273]  [<f996b5b8>] uvc_v4l2_do_ioctl+0xb68/0x12f0 [uvcvideo]
Jun 16 11:52:52 hostname kernel: [  128.870360]  [<c113f343>] ? chrdev_open+0x63/0x160
Jun 16 11:52:52 hostname kernel: [  128.870431]  [<c1561ff5>] ? __copy_to_user_ll+0x55/0x60
Jun 16 11:52:52 hostname kernel: [  128.870510]  [<f9912116>] video_usercopy+0x1d6/0x540 [videodev]
Jun 16 11:52:52 hostname kernel: [  128.870591]  [<c11562dd>] ? mntput+0x1d/0x30
Jun 16 11:52:52 hostname kernel: [  128.870658]  [<f996a1fa>] uvc_v4l2_ioctl+0x2a/0x60 [uvcvideo]
Jun 16 11:52:52 hostname kernel: [  128.870738]  [<f996aa50>] ? uvc_v4l2_open+0x120/0x120 [uvcvideo]
Jun 16 11:52:52 hostname kernel: [  128.870823]  [<f990c65d>] v4l2_ioctl+0xed/0x130 [videodev]
Jun 16 11:52:52 hostname kernel: [  128.870901]  [<f990c570>] ? v4l2_open+0xf0/0xf0 [videodev]
Jun 16 11:52:52 hostname kernel: [  128.870975]  [<c114bcd2>] do_vfs_ioctl+0x2f2/0x4d0
Jun 16 11:52:52 hostname kernel: [  128.871041]  [<c1144b9d>] ? final_putname+0x1d/0x40
Jun 16 11:52:52 hostname kernel: [  128.871107]  [<c1144b9d>] ? final_putname+0x1d/0x40
Jun 16 11:52:52 hostname kernel: [  128.871173]  [<c1144b9d>] ? final_putname+0x1d/0x40
Jun 16 11:52:52 hostname kernel: [  128.871239]  [<c1144db4>] ? putname+0x24/0x40
Jun 16 11:52:52 hostname kernel: [  128.875602]  [<c113aea3>] ? do_sys_open+0x183/0x1f0
Jun 16 11:52:52 hostname kernel: [  128.880103]  [<c114bf10>] SyS_ioctl+0x60/0x90
Jun 16 11:52:52 hostname kernel: [  128.884622]  [<c1af48c2>] syscall_call+0x7/0xb
Jun 16 11:52:52 hostname kernel: [  128.889124] Code: 45 f0 03 87 b4 00 00 00 89 06 8b 07 89 46 04 8b 45 dc 83 f8 01 89 46 30 74 4c 8b 9f b4 00 00 00 8b 45 f0 83 45 f0 01 8d 44 03 0c <89> 74 87 04 8b 45 f0 3b 45 d8 0f 84 22 02 00 00 8b 47 20 ba d0
Jun 16 11:52:52 hostname kernel: [  128.899005] EIP: [<f993afbd>] __vb2_queue_alloc+0x6d/0x440 [videobuf2_core] SS:ESP 0068:f1f43d34
Jun 16 11:52:52 hostname kernel: [  128.903876] CR2: 00000000b90d8540
Jun 16 11:52:52 hostname kernel: [  128.908706] ---[ end trace d169bf90274d071c ]---
Comment 1 LÉVAI Dániel 2014-06-16 10:12:46 UTC
Created attachment 139921 [details]
lsusb -v output
Comment 2 LÉVAI Dániel 2014-06-22 09:10:50 UTC
It has been working fine in 3.14, I might add.
Comment 3 Hans Verkuil 2014-06-23 08:15:58 UTC
I'm afraid I can't reproduce this. I tested a uvc webcam with mpv (mpv tv://0) on a 3.15 debian kernel and it just works.

Do you use some special commands or do you perhaps have little memory available?
Comment 4 LÉVAI Dániel 2014-06-23 11:15:21 UTC
Oh, it turns out that ffmpeg is the culprit. Mpv just didn't work after ffmpeg has already borked the device, so I just assumed that mpv can also broke the webcam.

Could you please retry with a recent ffmpeg checkout, like so:

$ ffmpeg -f video4linux2 -i /dev/video0
or
$ ffplay -f video4linux2 -i /dev/video0


-- 
Daniel
Comment 5 Hans Verkuil 2014-06-23 12:36:16 UTC
Tested with ffplay version 2.2.3 and it still works fine.
Comment 6 LÉVAI Dániel 2014-06-23 12:47:25 UTC
Well, this is embarrassing, I don't know what could be the problem.

Nothing special in the commands I use, the above ffmpeg commands are as simple as they get. Also, this machine has 8 GiB of memory, so no shortage there, I suppose.

Do you have same model on which you've tried this?

-- 
Daniel
Comment 7 Hans Verkuil 2014-06-23 13:33:35 UTC
I'm not sure what the question is. I've used a Logitech USB webcam for testing this. I don't have your hardware so I can't test the same webcam that you have.

That said, I don't believe it has anything to do with your webcam as such.

If there were problems with 3.15 and the uvc driver we would have heard of that since it is the driver that is used the most.

Do you use a stock distro kernel or did you compile it yourself? Anything weird with your setup? No duplicate modules in /lib/modules/`uname -r`?
Comment 8 LÉVAI Dániel 2014-06-23 13:59:24 UTC
I was wondering if you have tested this with the same laptop model that I have -- this may be a Dell-specific issue.
I feel there is no use to prove that it works on other hardwares.

I'm using unpatched vanilla kernel sources on a Slackware distro (*not* the stock Slackware kernel, however that is also vanilla, but there is no 3.15).

Nothing weird AFAICT, and no duplicate modules. That said, I've tried without the virtualbox modules also, with a not tainted kernel.


-- 
Daniel
Comment 9 Hans Verkuil 2014-06-23 14:26:05 UTC
Which precise ffplay version are you using?

All uvc-based hardware works in the same way, certainly w.r.t. the buffer allocation (which is where the crash seems to be).

One option is that you try to debug where exactly it crashes in __vb2_queue_alloc. Perhaps that gives me some insight.
Comment 10 LÉVAI Dániel 2014-06-25 13:41:35 UTC
This here is:
ffmpeg version N-64173-gb222e07 Copyright (c) 2000-2014 the FFmpeg developers
  built on Jun 23 2014 14:20:31

Could this be a faulty hardware? I can try it with another laptop of the same model.

Forgive me, but if it really seems that this problem is limited only to me, I won't dig deep for this... I'll just use 3.14 if I'd need the webcam.

-- 
Daniel
Comment 11 LÉVAI Dániel 2014-07-01 09:38:23 UTC
Alright, I won't pollute the BT.


-- 
Daniel

Note You need to log in before you can comment on or make changes to this bug.