The setup:
- 2 uvcvideo webcams (in my case Logitech Pro 5000 and Fusion)
- A proprietary display software (can't start capture with mplayer
SVN-r21861 to validate)
- uvcvideo r88
- stock Debian Etch kernel (but tainted by nvidia proprietary module):
Linux tobago 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686 GNU/Linux

How to reproduce:
- open and initialize first device (any of /dev/video[0-1])
- then do the same for second device

What happens:
- first device continues streaming seamlessly
- second device causes a divide by zero in uvcvideo module:
=== Start message ===
divide error: 0000 [#3]
SMP
Modules linked in: uvcvideo snd_usb_audio snd_usb_lib snd_hwdep tsdev
binfmt_misc ppdev lp autofs4 button ac battery ipv6 nfs lockd nfs_acl sunrpc
fuse dm_crypt dm_snapshot dm_mirror dm_mod ovcamchip ov511 pwc usbmouse usbhid
sermouse oprofile nvidia sr_mod sbp2 snd_intel8x0 snd_ac97_codec snd_ac97_bus
snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy snd_seq_oss snd_seq_midi
snd_rawmidi snd_seq_midi_event snd_seq snd_timer compat_ioctl32 i2c_algo_bit
snd_seq_device videocodec videodev intel_agp v4l1_compat agpgart v4l2_common snd
i82875p_edac parport_pc i2c_i801 edac_mc psmouse serio_raw parport pcspkr
i2c_core soundcore shpchp pci_hotplug eth1394 floppy evdev snd_page_alloc rtc
ext3 jbd mbcache ide_generic ide_cd cdrom ide_disk ata_piix libata scsi_mod piix
ohci1394 e1000 ieee1394 generic ide_core ehci_hcd uhci_hcd usbcore thermal
processor fan
CPU:    1
EIP:    0060:[<f8e35048>]    Tainted: P      VLI
EFLAGS: 00210246   (2.6.18-3-686 #1)
EIP is at uvc_fraction_to_interval+0x9/0x42 [uvcvideo]
eax: 00000000   ebx: 00000000   ecx: 00000000   edx: 00000000
esi: f75a6a0c   edi: d14d3e78   ebp: d6961030   esp: d14d3e18
ds: 007b   es: 007b   ss: 0068
Process gtkplay (pid: 14110, ti=d14d2000 task=f655faa0 task.ti=d14d2000)
Stack: f75305c0 f75a6a0c d14d3e78 f8e37b68 d14d3e54 00000003 e323d600 d9a07ea0
       ec5ddf18 00000000 00000000 d14d3e68 c011669e e88a39a8 00000000 02020001
       00051615 00000000 00000004 00000000 00096000 00000bd0 02dc6c00 00000000
Call Trace:
 [<f8e37b68>] uvc_v4l2_do_ioctl+0x81a/0xaca [uvcvideo]
 [<c011669e>] __wake_up+0x2a/0x3d
 [<c0130a26>] futex_requeue+0x214/0x220
 [<f8a7e649>] video_usercopy+0x175/0x23b [videodev]
 [<c0102819>] do_notify_resume+0x4e4/0x5d7
 [<c0158e33>] do_filp_open+0x2b/0x31
 [<f8e36f7d>] uvc_v4l2_ioctl+0x31/0x37 [uvcvideo]
 [<f8e3734e>] uvc_v4l2_do_ioctl+0x0/0xaca [uvcvideo]
 [<c016937b>] do_ioctl+0x47/0x5d
 [<c01695db>] vfs_ioctl+0x24a/0x25c
 [<c0132030>] sys_futex+0xdc/0xf1
 [<c0169635>] sys_ioctl+0x48/0x5f
 [<c0102c11>] sysenter_past_esp+0x56/0x79
Code: 89 d5 8a 44 24 03 03 6b 0c 38 01 74 0d 46 83 c2 24 83 c1 24 39 fe 75 e8 31
ed 5a 89 e8 5b 5e 5f 5d c3 57 89 d1 56 31 d2 53 89 c3 <f7> f1 83 cf ff be 80 96
98 00 3d ac 01 00 00 76 06 eb 20 d1 ee
EIP: [<f8e35048>] uvc_fraction_to_interval+0x9/0x42 [uvcvideo] SS:ESP
0068:d14d3e18
=== End message ===
- the associated device is not cleaned, and is seen by the system as still in
use (modprobe -r uvcvideo fails)
- whatever the order of initialization, the second device

This corresponds to a divide by 0 in uvc_fraction_to_interval at uvc_drive:203 :
if (numerator/denominator >= ((uint32_t)-1)/10000000)

While 0 could be returned when denominator is 0, I didn't try that for 2
reasons:
- I can't unload the module (rmmod -f leaves the /dev/video* entries), probably
unless I reboot
- This is a symptom, not a cause

I have another uvcvideo device (Microsoft LifeCam NX-6000) to test with, once
I'll have figured whether it really works or not.

Best regards,
Christophe Gisquet
_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to