Re: [Em28xx] Grabshow 100 with em28xx
On Fri, Jan 23, 2009 at 7:56 AM, Németh Márton nm...@freemail.hu wrote: To Markus: Hello Markus, could you please check this dmesg trace? I wrote my analysis, but I have some problems proposing a possible solution. ogre5000 wrote: Hello, Am 22.01.2009 um 07:34 schrieb Németh Márton: I couldn't really find a simple testcase which triggers this problem, but I analysed the source code and found that the function prototype v4l2_kioctl changed between Linux kernel 2.6.27 and 2.6.28: the inode parameter was removed. Last time when I updated the em28xx-new I forget this fact. I just sent a patch titled [PATCH] remove inode parameter of typedef v4l2_kioctl as of 2.6.28. Could you please apply and test the new version of em28xx-new driver? Here we can see that (null) is written to the output instead of a readable input and norm parameter. This usually signals that there might be some return value check missing in the code. This mmap2() calls also do not look like very good: -1 is the fd parameter which shall be positive. The -1 is an error code which comes from a previous system call and it is not a valid file descriptor. What can I do against it? I installed the latest release with this patch I don't know, yet what can you do against this -1 file descriptor. applied. This didn't change anything. But notice that I have Kernel 2.6.27.7-9 anyway, not 2.6.28.x. There are changes in the dmesg, now you get a different error message, so at least one problem is fixed, I think. Here you see dmesg (interesting lines cut out) again with the new patch applied. First after trying ZoneMinder em28xx v4l2 driver version 0.0.1 loaded em28xx: new video device (eb1a:2800): interface 0, class 255 em28xx: device is attached to a USB 2.0 bus em28xx #0: Alternate settings: 4 em28xx #0: Alternate setting 0, max size= 0 em28xx #0: Alternate setting 1, max size= 644 em28xx #0: Alternate setting 2, max size= 1288 em28xx #0: Alternate setting 3, max size= 2580 saa7115' 1-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found Terratec Cinergy 200 USB usbcore: registered new interface driver em28xx The following is only an harmless informational message. Unless you get a _continuous_flood_ of these messages it means everything is working fine. Allocations from irqs cannot be perfectly reliable and the kernel is designed to handle that. zmc: page allocation failure. order:6, mode:0x0, alloc_flags:0x5, pflags:0x402000 Pid: 3313, comm: zmc Tainted: G D 2.6.27.7-debug2 #2 [c01065d4] dump_trace+0x63/0x227 [c010702b] show_trace+0x15/0x29 [c0348341] dump_stack+0x5b/0x65 [c0177f2b] __alloc_pages_internal+0x38b/0x3a2 [c01087bf] dma_alloc_pages+0x51/0x59 [c0108889] dma_alloc_coherent+0xc2/0x24e [e1053375] hcd_buffer_alloc+0x65/0x6d [usbcore] [e104729f] usb_buffer_alloc+0x16/0x1d [usbcore] [e1aa47de] em28xx_init_isoc+0x9b/0x19c [em28xx] [e1aa1063] em28xx_v4l2_open+0x46d/0x516 [em28xx] [e10d919c] video_open+0xcc/0x12b [videodev] [c01a185b] chrdev_open+0x13b/0x152 [c019dc57] __dentry_open+0x10f/0x1fd [c019ddcc] nameidata_to_filp+0x1f/0x33 [c01a914c] do_filp_open+0x33c/0x65b [c019da6e] do_sys_open+0x42/0xbd [c019db2b] sys_open+0x1e/0x26 [c0104bdb] sysenter_do_call+0x12/0x3f [e430] 0xe430 === Mem-Info: Node 0 DMA per-cpu: CPU0: hi:0, btch: 1 usd: 0 Node 0 Normal per-cpu: CPU0: hi: 186, btch: 31 usd: 86 Active:52879 inactive:50696 dirty:84 writeback:0 unstable:0 free:1081 slab:8988 mapped:17111 pagetables:409 bounce:0 Node 0 DMA free:2028kB min:88kB low:108kB high:132kB active:1296kB inactive:2252kB present:15708kB pages_scanned:32 all_unreclaimable? no lowmem_reserve[]: 0 481 481 481 Node 0 Normal free:2296kB min:2760kB low:3448kB high:4140kB active:210220kB inactive:200532kB present:492704kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 7*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2028kB Node 0 Normal: 150*4kB 0*8kB 0*16kB 1*32kB 0*64kB 5*128kB 0*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 2296kB 85571 total pagecache pages 6 pages in swap cache Swap cache stats: add 6, delete 0, find 0/0 Free swap = 1574304kB Total swap = 1574328kB 131040 pages RAM 0 pages HighMem 6706 pages reserved 75752 pages shared 72758 pages non-shared em28xx #0: unable to allocate 165120 bytes for transfer buffer 4 The situation is as follows: from user space the open() function is called which ends finally at em28xx_v4l2_open() in the em28xx-new driver. Then the driver tries to allocate some memory in em28xx_init_isoc(), but this fails (out of memory) and then an error message is printed em28xx #0: unable to allocate 165120 bytes for transfer buffer 4. The error code is returned to user space and then
Re: [Em28xx] Grabshow 100 with em28xx
Hello, Am 22.01.2009 um 07:34 schrieb Németh Márton: I couldn't really find a simple testcase which triggers this problem, but I analysed the source code and found that the function prototype v4l2_kioctl changed between Linux kernel 2.6.27 and 2.6.28: the inode parameter was removed. Last time when I updated the em28xx-new I forget this fact. I just sent a patch titled [PATCH] remove inode parameter of typedef v4l2_kioctl as of 2.6.28. Could you please apply and test the new version of em28xx-new driver? Here we can see that (null) is written to the output instead of a readable input and norm parameter. This usually signals that there might be some return value check missing in the code. This mmap2() calls also do not look like very good: -1 is the fd parameter which shall be positive. The -1 is an error code which comes from a previous system call and it is not a valid file descriptor. What can I do against it? I installed the latest release with this patch applied. This didn't change anything. But notice that I have Kernel 2.6.27.7-9 anyway, not 2.6.28.x. Here you see dmesg (interesting lines cut out) again with the new patch applied. First after trying ZoneMinder, then after webcam: http://www.file-upload.net/download-1400686/dmesg_zm.txt.html http://www.file-upload.net/download-1400693/dmesg_webcam.txt.html Am 22.01.2009 um 07:52 schrieb Németh Márton: Could you please send your /root/.webcamrc ? (Please change the password field in it to *** before sending, if any.) My .webcamrc can be found here: http://www.file-upload.net/download-1400648/webcamrc.txt.html Thanks and regards___ Em28xx mailing list Em28xx@mcentral.de http://mcentral.de/mailman/listinfo/em28xx
Re: [Em28xx] Grabshow 100 with em28xx
To Markus: Hello Markus, could you please check this dmesg trace? I wrote my analysis, but I have some problems proposing a possible solution. ogre5000 wrote: Hello, Am 22.01.2009 um 07:34 schrieb Németh Márton: I couldn't really find a simple testcase which triggers this problem, but I analysed the source code and found that the function prototype v4l2_kioctl changed between Linux kernel 2.6.27 and 2.6.28: the inode parameter was removed. Last time when I updated the em28xx-new I forget this fact. I just sent a patch titled [PATCH] remove inode parameter of typedef v4l2_kioctl as of 2.6.28. Could you please apply and test the new version of em28xx-new driver? Here we can see that (null) is written to the output instead of a readable input and norm parameter. This usually signals that there might be some return value check missing in the code. This mmap2() calls also do not look like very good: -1 is the fd parameter which shall be positive. The -1 is an error code which comes from a previous system call and it is not a valid file descriptor. What can I do against it? I installed the latest release with this patch I don't know, yet what can you do against this -1 file descriptor. applied. This didn't change anything. But notice that I have Kernel 2.6.27.7-9 anyway, not 2.6.28.x. There are changes in the dmesg, now you get a different error message, so at least one problem is fixed, I think. Here you see dmesg (interesting lines cut out) again with the new patch applied. First after trying ZoneMinder em28xx v4l2 driver version 0.0.1 loaded em28xx: new video device (eb1a:2800): interface 0, class 255 em28xx: device is attached to a USB 2.0 bus em28xx #0: Alternate settings: 4 em28xx #0: Alternate setting 0, max size= 0 em28xx #0: Alternate setting 1, max size= 644 em28xx #0: Alternate setting 2, max size= 1288 em28xx #0: Alternate setting 3, max size= 2580 saa7115' 1-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found Terratec Cinergy 200 USB usbcore: registered new interface driver em28xx The following is only an harmless informational message. Unless you get a _continuous_flood_ of these messages it means everything is working fine. Allocations from irqs cannot be perfectly reliable and the kernel is designed to handle that. zmc: page allocation failure. order:6, mode:0x0, alloc_flags:0x5, pflags:0x402000 Pid: 3313, comm: zmc Tainted: G D 2.6.27.7-debug2 #2 [c01065d4] dump_trace+0x63/0x227 [c010702b] show_trace+0x15/0x29 [c0348341] dump_stack+0x5b/0x65 [c0177f2b] __alloc_pages_internal+0x38b/0x3a2 [c01087bf] dma_alloc_pages+0x51/0x59 [c0108889] dma_alloc_coherent+0xc2/0x24e [e1053375] hcd_buffer_alloc+0x65/0x6d [usbcore] [e104729f] usb_buffer_alloc+0x16/0x1d [usbcore] [e1aa47de] em28xx_init_isoc+0x9b/0x19c [em28xx] [e1aa1063] em28xx_v4l2_open+0x46d/0x516 [em28xx] [e10d919c] video_open+0xcc/0x12b [videodev] [c01a185b] chrdev_open+0x13b/0x152 [c019dc57] __dentry_open+0x10f/0x1fd [c019ddcc] nameidata_to_filp+0x1f/0x33 [c01a914c] do_filp_open+0x33c/0x65b [c019da6e] do_sys_open+0x42/0xbd [c019db2b] sys_open+0x1e/0x26 [c0104bdb] sysenter_do_call+0x12/0x3f [e430] 0xe430 === Mem-Info: Node 0 DMA per-cpu: CPU0: hi:0, btch: 1 usd: 0 Node 0 Normal per-cpu: CPU0: hi: 186, btch: 31 usd: 86 Active:52879 inactive:50696 dirty:84 writeback:0 unstable:0 free:1081 slab:8988 mapped:17111 pagetables:409 bounce:0 Node 0 DMA free:2028kB min:88kB low:108kB high:132kB active:1296kB inactive:2252kB present:15708kB pages_scanned:32 all_unreclaimable? no lowmem_reserve[]: 0 481 481 481 Node 0 Normal free:2296kB min:2760kB low:3448kB high:4140kB active:210220kB inactive:200532kB present:492704kB pages_scanned:0 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 7*4kB 0*8kB 1*16kB 0*32kB 1*64kB 1*128kB 1*256kB 1*512kB 1*1024kB 0*2048kB 0*4096kB = 2028kB Node 0 Normal: 150*4kB 0*8kB 0*16kB 1*32kB 0*64kB 5*128kB 0*256kB 0*512kB 1*1024kB 0*2048kB 0*4096kB = 2296kB 85571 total pagecache pages 6 pages in swap cache Swap cache stats: add 6, delete 0, find 0/0 Free swap = 1574304kB Total swap = 1574328kB 131040 pages RAM 0 pages HighMem 6706 pages reserved 75752 pages shared 72758 pages non-shared em28xx #0: unable to allocate 165120 bytes for transfer buffer 4 The situation is as follows: from user space the open() function is called which ends finally at em28xx_v4l2_open() in the em28xx-new driver. Then the driver tries to allocate some memory in em28xx_init_isoc(), but this fails (out of memory) and then an error message is printed em28xx #0: unable to allocate 165120 bytes for transfer buffer 4. The error code is returned to user space and then ZoneMinder and webcam should handle the return value correctly (i.e. not use -1 as a valid
Re: [Em28xx] Grabshow 100 with em28xx
Hi Németh. Thanks for sticking to my prob! It always happens... The steps are a bit complicated... I installed Zoneminder (latest release on zoneminder.com), which needs quite a few additional packages to my standard distro (openSUSE 11.1) to work. I then added a new Monitor with the source /dev/video1 and resolution 640*480 (also tried different ones). Then, make it Active and click on it, and it should display the video source. But it just displays a black screen and the log files (in /tmp/) report errors. What I mailed you is dmesg output. Am 18.01.2009 um 22:20 schrieb Németh Márton: Unfortunately, you have to recompile your kernel to enable those features. Changing that file does nothing. Am 18.01.2009 um 22:27 schrieb Németh Márton: This is a problem of the kernel space em28xx-new. Does this always happen? What are the steps to reproduce the problem? To debug this problem it would be useful if you can set the CONFIG_* parameters I specified (run make menuconfig from the linux source directory (usually /usr/src/linux) and press the / key so you can search for the CONFIG_* parameters. Then the kernel configuration is saved to a file named .config. There should be a description somewhere which describes how to build Linux kernel. I finally managed to compile my kernel again with the parameters you gave me, took my quite a while. Now uname -r reports 2.6.27.7- debug2, means what I did worked. When activating /dev/video1 in Zoneminder, I get of these errors in dmesg: BUG: unable to handle kernel NULL pointer dereference at 0088 IP: [e1a9d20c] :em28xx:em28xx_v4l2_ioctl+0x9/0x5f *pdpt = 07563001 *pde = Oops: [#2] SMP last sysfs file: /sys/devices/pci:00/:00:10.3/ usb4/4-2/4-2:1.0/bInterfaceClass Modules linked in: tda9887(N) em28xx(N) zl10353(N) tuner(N) tvp5150 (N) nls_utf8(N) binfmt_misc(N) ipv6(N) hisax(N) capidrv(N) isdn(N) slhc(N) capi(N) capifs(N) kernelcapi(N) fuse(N) loop(N) dm_mod(N) saa7115(N) snd_via82xx(N) gameport(N) snd_ac97_codec(N) ppdev(N) ac97_bus(N) snd_pcm(N) snd_timer(N) snd_page_alloc(N) snd_mpu401_uart (N) rtc_cmos(N) i2c_viapro(N) snd_rawmidi(N) rtc_core(N) snd_seq_device(N) via_rhine(N) via_ircc(N) rtc_lib(N) serio_raw(N) pcspkr(N) snd(N) sr_mod(N) mii(N) soundcore(N) irda(N) cdrom(N) sg(N) crc_ccitt(N) videobuf_vmalloc(N) cx24110(N) dvb_bt8xx(N) dvb_core(N) bt878(N) thermal(N) parport_pc(N) bttv(N) parport(N) floppy(N) videodev(N) v4l1_compat(N) ir_common(N) compat_ioctl32(N) i2c_algo_bit (N) v4l2_common(N) videobuf_dma_sg(N) videobuf_core(N) btcx_risc(N) via_agp(N) tveeprom(N) processor(N) shpchp(N) button(N) agpgart(N) i2c_core(N) pci_hotplug(N) sd_mod(N) crc_t10dif(N) ehci_hcd(N) uhci_hcd(N) usbcore(N) edd(N) fan(N) thermal_sys(N) hwmon(N) ext3(N) mbcache(N) jbd(N) ide_pci_generic(N) via82cxxx(N) ide_core(N) ata_generic(N) pata_via(N) libata(N) scsi_mod(N) dock(N) [last unloaded: em28xx] Supported: No Pid: 7372, comm: zmc Tainted: G D (2.6.27.7-debug2 #2) EIP: 0060:[e1a9d20c] EFLAGS: 00010292 CPU: 0 EIP is at em28xx_v4l2_ioctl+0x9/0x5f [em28xx] EAX: EBX: ECX: c0445624 EDX: d8560900 ESI: d8560900 EDI: e1a9d203 EBP: c7577d48 ESP: c7577d40 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process zmc (pid: 7372, ti=c7576000 task=d78565e0 task.ti=c7576000) Stack: d8560900 c7577dac e1104406 c7577d54 00980900 dd1c6000 df458800 dd1c6008 c0132082 0006 0002 0001 d78565e0 d7843860 de004060 c7577d98 c014b5f4 c7577db0 0202 Call Trace: [e1104406] get_v4l_control+0x20/0xa2 [v4l1_compat] [e1105091] v4l1_compat_get_picture+0x41/0x183 [v4l1_compat] [e1105ac0] v4l_compat_translate_ioctl+0x1be/0x266 [v4l1_compat] [e1a9fa5d] em28xx_video_do_ioctl+0x1e06/0x1e59 [em28xx] [e10d9797] video_usercopy+0x1ae/0x247 [videodev] [e1a9d259] em28xx_v4l2_ioctl+0x56/0x5f [em28xx] [e1a9d271] em28xx_v4l2_ioctl_fops+0xf/0x11 [em28xx] [c01a9f4a] vfs_ioctl+0x4e/0x67 [c01aa1ad] do_vfs_ioctl+0x24a/0x25d [c01aa200] sys_ioctl+0x40/0x5c [c0104bdb] sysenter_do_call+0x12/0x3f [e430] 0xe430 === Code: 8d 94 03 2c 06 00 00 89 51 50 ff 84 03 80 06 00 00 31 c0 eb 05 b8 ea ff ff ff 8d 65 f4 5b 5e 5f 5d c3 55 89 e5 56 89 d6 53 89 c3 8b 80 88 00 00 00 8b 00 8b 90 24 0a 00 00 f6 c2 02 74 12 50 68 EIP: [e1a9d20c] em28xx_v4l2_ioctl+0x9/0x5f [em28xx] SS:ESP 0068:c7577d40 ---[ end trace 866b1e476144b190 ]--- Am 18.01.2009 um 22:20 schrieb Németh Márton: It seems that the segmentation fault is in user space (webcam and not in the em28xx-new driver. You might try to run strace webcam or try a different video application like xawtv. I actually searched the internet for xawtv and found out, that webcam is part of xawtv (I have xawtv installed). So I guess there is no other way to test the webcam with xawtv? strace webcam does give me the output I
Re: [Em28xx] Grabshow 100 with em28xx
Hi, ogre5000 wrote: Hi Németh. Thanks for sticking to my prob! It always happens... The steps are a bit complicated... I installed Zoneminder (latest release on zoneminder.com), which needs quite a few additional packages to my standard distro (openSUSE 11.1) to work. I then added a new Monitor with the source /dev/video1 and resolution 640*480 (also tried different ones). Then, make it Active and click on it, and it should display the video source. But it just displays a black screen and the log files (in /tmp/) report errors. What I mailed you is dmesg output. I couldn't really find a simple testcase which triggers this problem, but I analysed the source code and found that the function prototype v4l2_kioctl changed between Linux kernel 2.6.27 and 2.6.28: the inode parameter was removed. Last time when I updated the em28xx-new I forget this fact. I just sent a patch titled [PATCH] remove inode parameter of typedef v4l2_kioctl as of 2.6.28. Could you please apply and test the new version of em28xx-new driver? I actually searched the internet for xawtv and found out, that webcam is part of xawtv (I have xawtv installed). So I guess there is no other way to test the webcam with xawtv? *strace webcam* does give me the output I uploaded here: http://www.file-upload.net/download-1398622/strace_webcam.txt.html It doesn't say much to me ... :( The end of the log looks quite interesting: write(2, video4linux webcam v1.5 - (c) 19..., 51video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr ) = 51 write(2, grabber config:\n size 360x576 [..., 65grabber config: size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)] ) = 65 write(2, input (null), norm (null), jpe..., 46 input (null), norm (null), jpeg quality 100 Here we can see that (null) is written to the output instead of a readable input and norm parameter. This usually signals that there might be some return value check missing in the code. ) = 46 write(2, rotate=0, top=0, left=0, botto..., 49 rotate=0, top=0, left=0, bottom=480, right=640 ) = 49 write(2, write config [local]:\n local tr..., 81write config [local]: local transfer /root/uploading.jpeg = /root/webcam.jpeg ) = 81 mmap2(NULL, 417792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d88000 read(3, \20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200..., 414720) = 414720 mmap2(NULL, 622592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cf This mmap2() calls also do not look like very good: -1 is the fd parameter which shall be positive. The -1 is an error code which comes from a previous system call and it is not a valid file descriptor. --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Regards, Márton Németh ___ Em28xx mailing list Em28xx@mcentral.de http://mcentral.de/mailman/listinfo/em28xx
Re: [Em28xx] Grabshow 100 with em28xx
Németh Márton wrote: ogre5000 wrote: I actually searched the internet for xawtv and found out, that webcam is part of xawtv (I have xawtv installed). So I guess there is no other way to test the webcam with xawtv? *strace webcam* does give me the output I uploaded here: http://www.file-upload.net/download-1398622/strace_webcam.txt.html It doesn't say much to me ... :( The end of the log looks quite interesting: write(2, video4linux webcam v1.5 - (c) 19..., 51video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr ) = 51 write(2, grabber config:\n size 360x576 [..., 65grabber config: size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)] ) = 65 write(2, input (null), norm (null), jpe..., 46 input (null), norm (null), jpeg quality 100 Here we can see that (null) is written to the output instead of a readable input and norm parameter. This usually signals that there might be some return value check missing in the code. ) = 46 write(2, rotate=0, top=0, left=0, botto..., 49 rotate=0, top=0, left=0, bottom=480, right=640 ) = 49 write(2, write config [local]:\n local tr..., 81write config [local]: local transfer /root/uploading.jpeg = /root/webcam.jpeg ) = 81 mmap2(NULL, 417792, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7d88000 read(3, \20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200\20\200..., 414720) = 414720 mmap2(NULL, 622592, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7cf This mmap2() calls also do not look like very good: -1 is the fd parameter which shall be positive. The -1 is an error code which comes from a previous system call and it is not a valid file descriptor. --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ write(2, reading config file: /root/.webc..., 37reading config file: /root/.webcamrc ) = 37 Could you please send your /root/.webcamrc ? (Please change the password field in it to *** before sending, if any.) Regards, Márton Németh ___ Em28xx mailing list Em28xx@mcentral.de http://mcentral.de/mailman/listinfo/em28xx
Re: [Em28xx] Grabshow 100 with em28xx
Hi. Ok I hope I got everything right (I don't need to recompile my kernel, correct?).. I did this: - Changed all your mentioned parameters in /usr/src/linux-2.6.27.7-9- obj/i386/pae/.config (to PARAMETER=y) and added the nonexistent parameters (CONFIG_DEBUG_OBJECTS_FREE=y and CONFIG_DEBUG_OBJECTS_TIMERS=y). - Ripped the latest em28xx-new from http://mcentral.de/hg/~mrec/em28xx- new (have no hg, so I've taken the .tar.gz link from there). - Unpacked, executed ./build.sh build;./build.sh install - Unloaded all em28xx modules with rmmod, then did insmod em28xx.ko card=11 Now when I execute webcam app with 640x480 configured, it says: reading config file: /root/.webcamrc video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr grabber config: size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)] input (null), norm (null), jpeg quality 100 rotate=0, top=0, left=0, bottom=480, right=640 write config [local]: local transfer /root/uploading.jpeg = /root/webcam.jpeg Segmentation fault And dmesg then says: (Thats just the last interesting lines, for the full dmesg file, see this link: http://www.file-upload.net/download-1388194/dmesg.txt.html) em28xx v4l2 driver version 0.0.1 loaded em28xx: new video device (eb1a:2800): interface 0, class 255 em28xx: device is attached to a USB 2.0 bus em28xx #0: Alternate settings: 4 em28xx #0: Alternate setting 0, max size= 0 em28xx #0: Alternate setting 1, max size= 644 em28xx #0: Alternate setting 2, max size= 1288 em28xx #0: Alternate setting 3, max size= 2580 saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found Terratec Cinergy 200 USB usbcore: registered new interface driver em28xx webcam[3508]: segfault at b7d53108 ip 08051885 sp bfd8ff58 error 7 in webcam[8048000+e000] But when I execute webcam app with 576x360 configured (did this because it's part of webcam output above, the size), it says something longer and funny, without segfault in dmesg: (For the full webcam output, see this link: http://www.file-upload.net/download-1388232/webcam.txt.html , just some memory map info). reading config file: /root/.webcamrc video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr grabber config: size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)] input (null), norm (null), jpeg quality 100 rotate=0, top=0, left=0, bottom=360, right=576 write config [local]: local transfer /root/uploading.jpeg = /root/webcam.jpeg *** glibc detected *** webcam: double free or corruption (out): 0xb7d0f008 *** === Backtrace: = /lib/libc.so.6[0xb7e27654] /lib/libc.so.6(cfree+0x9c)[0xb7e28f3c] webcam[0x804ef45] webcam(main+0xc12)[0x804c612] /lib/libc.so.6(__libc_start_main+0xe5)[0xb7dd1705] webcam[0x804b421] === Memory map: [...] Back to 640x480, when using card=12, I get in dmesg after executing webcam app (it also shows the list of devices Here is a list of valid choices for the card = n insmod option even tough I gave the device option, it's maybe not recognized): [...] em28xx #0: card = 76 - Pollin USB-R1 em28xx #0: card = 77 - Equinux TubeStick Hybrid ATSC em28xx #0: card = 78 - Leadtek PalmTop DTV 200H em28xx #0: card = 79 - Compro VideoMate ForYou/Stereo em28xx #0: card = 80 - Terratec XS HTC saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found Leadtek Winfast USB II usbcore: registered new interface driver em28xx And when using card=13, dmesg says after webcam: em28xx v4l2 driver version 0.0.1 loaded em28xx: new video device (eb1a:2800): interface 0, class 255 em28xx: device is attached to a USB 2.0 bus em28xx #0: Alternate settings: 4 em28xx #0: Alternate setting 0, max size= 0 em28xx #0: Alternate setting 1, max size= 644 em28xx #0: Alternate setting 2, max size= 1288 em28xx #0: Alternate setting 3, max size= 2580 saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found KWorld USB2800 usbcore: registered new interface driver em28xx webcam[4065]: segfault at b7d13108 ip 08051885 sp bf94f318 error 7 in webcam[8048000+e000] Any more ideas? :-) Thanks! Am 18.01.2009 um 06:30 schrieb Németh Márton: In your previous mail you mentioned that you get Segmentation fault for card=11..13. Please enable the following kernel configuration parameters: CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_FREE=y CONFIG_DEBUG_OBJECTS_TIMERS=y CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_RODATA=y CONFIG_FRAME_POINTER=y After that, recompile the latest em28xx-new which is currently revision 291. (you can check this with hg view and you can update with hg pull + hg update) Then try card=11..13
Re: [Em28xx] Grabshow 100 with em28xx
A subsequent entry: When I use Zoneminder to get a picture from Grabshow100, I get the following in dmesg: (Thought this might be interesting too, even though I don't understnad it... Zoneminder is the app I want to use for my webcam as soon as GrabShow works.) BUG: unable to handle kernel NULL pointer dereference at 0070 IP: [e134b47b] :em28xx:em28xx_v4l2_ioctl+0x9/0x67 *pdpt = 13c53001 *pde = Oops: [#17] SMP last sysfs file: /sys/devices/pci:00/:00:10.3/usb4/4-4/4-4:1.0/ bInterfaceClass Modules linked in: em28xx(N) tda9887 saa7115 tuner binfmt_misc ipv6 capidrv isdn slhc fcpci(PN) capi capifs kernelcapi fuse loop dm_mod ppdev rtc_cmos snd_via82xx rtc_core gameport rtc_lib snd_ac97_codec serio_raw pcspkr ac97_bus snd_pcm snd_timer snd_page_alloc snd_mpu401_uart snd_rawmidi snd_seq_device snd via_rhine soundcore mii i2c_viapro via_ircc(N) sr_mod cdrom irda sg crc_ccitt cx24110(N) dvb_bt8xx(N) dvb_core(N) bt878(N) floppy parport_pc parport bttv videodev v4l1_compat ir_common via_agp compat_ioctl32 i2c_algo_bit shpchp v4l2_common videobuf_dma_sg button videobuf_core btcx_risc agpgart tveeprom pci_hotplug i2c_core sd_mod crc_t10dif ehci_hcd uhci_hcd usbcore edd ext3 mbcache jbd fan ide_pci_generic via82cxxx ide_core ata_generic pata_via libata scsi_mod dock thermal processor thermal_sys hwmon [last unloaded: em28xx] Supported: N Pid: 4428, comm: zmc Tainted: P D (2.6.27.7-9-pae #1) EIP: 0060:[e134b47b] EFLAGS: 00010292 CPU: 0 EIP is at em28xx_v4l2_ioctl+0x9/0x67 [em28xx] EAX: EBX: ECX: c0445624 EDX: d3deb440 ESI: d3deb440 EDI: e134b472 EBP: cec75ec4 ESP: cec75d8c DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process zmc (pid: 4428, ti=cec74000 task=dd15b090 task.ti=cec74000) Stack: d3d57000 e10e5a33 d3deb440 e112b444 cec75da8 00980900 0286 da8b4240 d3d57000 00d0 cec75dcc dd5800ec e10e5ed2 de8033b0 cec75dcc cec75dcc e10e7400 d3d57000 dd58 e100e03f 00d0 Call Trace: [e112b444] get_v4l_control+0x22/0xb0 [v4l1_compat] [e112c13a] v4l1_compat_get_picture+0x43/0x191 [v4l1_compat] [e134df9c] em28xx_video_do_ioctl+0x208b/0x20d9 [em28xx] [e114775b] video_usercopy+0x16b/0x1f4 [videodev] [e134b4d4] em28xx_v4l2_ioctl+0x62/0x67 [em28xx] [c01a700c] vfs_ioctl+0x4c/0x62 [c01a7280] do_vfs_ioctl+0x174/0x186 [c01a72d7] sys_ioctl+0x45/0x5e [c0104c9b] sysenter_do_call+0x12/0x2f [e430] 0xe430 === Code: 8d 94 03 58 04 00 00 89 55 50 ff 84 03 ac 04 00 00 31 c0 eb 05 b8 ea ff ff ff 83 c4 14 5b 5e 5f 5d c3 56 89 d6 53 89 c3 83 ec 08 8b 40 70 8b 00 8b 90 50 08 00 00 f6 c2 02 74 17 89 44 24 04 c7 EIP: [e134b47b] em28xx_v4l2_ioctl+0x9/0x67 [em28xx] SS:ESP 0068:cec75d8c ---[ end trace 23156743faabd031 ]--- Am 18.01.2009 um 06:30 schrieb Németh Márton: In your previous mail you mentioned that you get Segmentation fault for card=11..13. Please enable the following kernel configuration parameters: CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_FREE=y CONFIG_DEBUG_OBJECTS_TIMERS=y CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_RODATA=y CONFIG_FRAME_POINTER=y After that, recompile the latest em28xx-new which is currently revision 291. (you can check this with hg view and you can update with hg pull + hg update) Then try card=11..13 and check, please, what contains the dmesg in case of these cases. Regards, Márton Németh ___ Em28xx mailing list Em28xx@mcentral.de http://mcentral.de/mailman/listinfo/em28xx
Re: [Em28xx] Grabshow 100 with em28xx
ogre5000 wrote: Hi. Ok I hope I got everything right (I don't need to recompile my kernel, correct?).. I did this: - Changed all your mentioned parameters in */usr/src/linux-2.6.27.7-9-obj/i386/pae/.config* (to PARAMETER=y) and added the nonexistent parameters (CONFIG_DEBUG_OBJECTS_FREE=y and CONFIG_DEBUG_OBJECTS_TIMERS=y). Unfortunately, you have to recompile your kernel to enable those features. Changing that file does nothing. - Ripped the latest em28xx-new from http://mcentral.de/hg/~mrec/em28xx-new (have no hg, so I've taken the .tar.gz link from there). - Unpacked, executed *./build.sh build;**./build.sh install* - Unloaded all em28xx modules with rmmod, then did *insmod em28xx.ko card=11* Now when I execute webcam app with 640x480 configured, it says: *reading config file: /root/.webcamrc* *video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr* *grabber config:* * size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)]* * input (null), norm (null), jpeg quality 100* * rotate=0, top=0, left=0, bottom=480, right=640* *write config [local]:* * local transfer /root/uploading.jpeg = /root/webcam.jpeg* *Segmentation fault* And dmesg then says: (Thats just the last interesting lines, for the full dmesg file, see this link: http://www.file-upload.net/download-1388194/dmesg.txt.html) *em28xx v4l2 driver version 0.0.1 loaded* *em28xx: new video device (eb1a:2800): interface 0, class 255* *em28xx: device is attached to a USB 2.0 bus* *em28xx #0: Alternate settings: 4* *em28xx #0: Alternate setting 0, max size= 0* *em28xx #0: Alternate setting 1, max size= 644* *em28xx #0: Alternate setting 2, max size= 1288* *em28xx #0: Alternate setting 3, max size= 2580* *saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0)* *attach_inform: saa7113 detected.* *em28xx #0: V4L2 device registered as /dev/video1* *em28xx #0: Found Terratec Cinergy 200 USB* *usbcore: registered new interface driver em28xx* *webcam[3508]: segfault at b7d53108 ip 08051885 sp bfd8ff58 error 7 in webcam[8048000+e000]* It seems that the segmentation fault is in user space (webcam and not in the em28xx-new driver. You might try to run strace webcam or try a different video application like xawtv. But when I execute webcam app with 576x360 configured (did this because it's part of webcam output above, the size), it says something longer and funny, without segfault in dmesg: (For the full webcam output, see this link: http://www.file-upload.net/download-1388232/webcam.txt.html, just some memory map info). * reading config file: /root/.webcamrc video4linux webcam v1.5 - (c) 1998-2002 Gerd Knorr grabber config: size 360x576 [16 bit YUV 4:2:2 (packed, YUYV)] input (null), norm (null), jpeg quality 100 rotate=0, top=0, left=0, bottom=360, right=576 write config [local]: local transfer /root/uploading.jpeg = /root/webcam.jpeg *** glibc detected *** webcam: double free or corruption (out): 0xb7d0f008 *** === Backtrace: = /lib/libc.so.6[0xb7e27654] /lib/libc.so.6(cfree+0x9c)[0xb7e28f3c] webcam[0x804ef45] webcam(main+0xc12)[0x804c612] /lib/libc.so.6(__libc_start_main+0xe5)[0xb7dd1705] webcam[0x804b421] === Memory map: * [...] This is also a problem of the user space webcam. Back to 640x480, when using card=12, I get in dmesg after executing webcam app (it also shows the list of devices Here is a list of valid choices for the card = n insmod option even tough I gave the device option, it's maybe not recognized): [...] * em28xx #0: card = 76 - Pollin USB-R1 em28xx #0: card = 77 - Equinux TubeStick Hybrid ATSC em28xx #0: card = 78 - Leadtek PalmTop DTV 200H em28xx #0: card = 79 - Compro VideoMate ForYou/Stereo em28xx #0: card = 80 - Terratec XS HTC saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0) attach_inform: saa7113 detected. em28xx #0: V4L2 device registered as /dev/video1 em28xx #0: Found Leadtek Winfast USB II usbcore: registered new interface driver em28xx * And when using card=13, dmesg says after webcam: *em28xx v4l2 driver version 0.0.1 loaded* *em28xx: new video device (eb1a:2800): interface 0, class 255* *em28xx: device is attached to a USB 2.0 bus* *em28xx #0: Alternate settings: 4* *em28xx #0: Alternate setting 0, max size= 0* *em28xx #0: Alternate setting 1, max size= 644* *em28xx #0: Alternate setting 2, max size= 1288* *em28xx #0: Alternate setting 3, max size= 2580* *saa7115' 2-0025: saa7113 found (1f7113d0e10) @ 0x4a (em28xx #0)* *attach_inform: saa7113 detected.* *em28xx #0: V4L2 device registered as /dev/video1* *em28xx #0: Found KWorld USB2800* *usbcore: registered new interface driver em28xx* *webcam[4065]: segfault at b7d13108 ip 08051885 sp bf94f318 error 7 in webcam[8048000+e000]* Any more ideas? :-) Thanks! Am 18.01.2009 um 06:30 schrieb Németh Márton: In your previous mail you mentioned that you get Segmentation
Re: [Em28xx] Grabshow 100 with em28xx
ogre5000 wrote: Hello. I've written earlier but got no further answer to my last message...: http://mcentral.de/pipermail/em28xx/2009-January/002359.html Is there anyone who could help me make *GrabShow 100* compatible with em28xx? I can provide logfiles, ... In your previous mail you mentioned that you get Segmentation fault for card=11..13. Please enable the following kernel configuration parameters: CONFIG_DEBUG_OBJECTS=y CONFIG_DEBUG_OBJECTS_FREE=y CONFIG_DEBUG_OBJECTS_TIMERS=y CONFIG_PROVE_LOCKING=y CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_BUGVERBOSE=y CONFIG_DEBUG_INFO=y CONFIG_DEBUG_STACKOVERFLOW=y CONFIG_DEBUG_RODATA=y CONFIG_FRAME_POINTER=y After that, recompile the latest em28xx-new which is currently revision 291. (you can check this with hg view and you can update with hg pull + hg update) Then try card=11..13 and check, please, what contains the dmesg in case of these cases. Regards, Márton Németh ___ Em28xx mailing list Em28xx@mcentral.de http://mcentral.de/mailman/listinfo/em28xx