Bug#413640: xserver-xorg-video-v4l: xserver crashes when v4l module is loaded
Brice Goglin a écrit : > Thanks a lot for this investigation. Would you mind reporting the > problem and fix upstream at https://bugs.freedesktop.org/index.cgi ? The bug is reported upstream. The URL is https://bugs.freedesktop.org/show_bug.cgi?id=10276 Fred
Bug#413640: xserver-xorg-video-v4l: xserver crashes when v4l module is loaded
I've found the reason of the crash. It's not related to nv or nvidia driver but the AMD64 architecture. The explanation : - line 648 of v4l.c : ioctl(V4L_FD,VIDIOCGFREQ,value); - line 612 of v4l.c : we know that value is INT32 * - in videodev.h of kernel headers (from debian package linux-kernel-headers 2.6.18-7) : #define VIDIOCGFREQ _IOR('v',14, unsigned long) With 32 bits architecture, long is 32 bits and there's no problem. With 64 bits architecture like AMD64, long is 64 bits and ioctl try to write to the double-word *value and an unauthorized double-word near *value. So xorg crashes. To temporally fix the bug, I replace the line 648 of v4l.c with the next 3 lines : unsigned long freq; ioctl(V4L_FD,VIDIOCGFREQ,&freq); *value = (INT32) freq; There is no crash anymore with xvinfo. We lose some information (64 bits -> 32 bits) but it seems unimportant (the frequency value is between 0 and 16000 according to line 190 of v4l.c). Perhaps, a best solution can be found... Fred PS : we certainly have the same problem with VIDIOCSFREQ to set the frequency (line 597 of v4l.c) but I didn't try anything. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Bug#413640: xserver-xorg-video-v4l: xserver crashes when v4l module is loaded
Package: xserver-xorg-video-v4l Version: 0.1.1-3 Severity: important Using xvinfo makes xorg crashes when v4l module is loaded. It's reproducible. Informations found in /var/log/Xorg.0.log.old after the crash : (II) NV(0): v4l: memPhysBase=0xd000 Backtrace: 0: /usr/bin/X(xf86SigHandler+0x6d) [0x48c46d] 1: /lib/libc.so.6 [0x2b798283e110] 2: /usr/bin/X(Dispatch+0x120) [0x4480b0] 3: /usr/bin/X(main+0x44d) [0x430f6d] 4: /lib/libc.so.6(__libc_start_main+0xda) [0x2b798282b4ca] 5: /usr/bin/X(FontFileCompleteXLFD+0x9a) [0x43026a] Fatal server error: Caught signal 11. Server aborting Here is my config file : # /etc/X11/xorg.conf (xorg X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # # Edit this file with caution, and see the /etc/X11/xorg.conf manual page. # (Type "man /etc/X11/xorg.conf" at the shell prompt.) # # This file is automatically updated on xserver-xorg package upgrades *only* # if it has not been modified since the last upgrade of the xserver-xorg # package. # # If you have edited this file but would like it to be automatically updated # again, run the following command: # sudo dpkg-reconfigure -phigh xserver-xorg Section "Files" FontPath"/usr/share/fonts/X11/misc" FontPath"/usr/X11R6/lib/X11/fonts/misc" FontPath"/usr/share/fonts/X11/cyrillic" FontPath"/usr/X11R6/lib/X11/fonts/cyrillic" FontPath"/usr/share/fonts/X11/100dpi/:unscaled" FontPath"/usr/X11R6/lib/X11/fonts/100dpi/:unscaled" FontPath"/usr/share/fonts/X11/75dpi/:unscaled" FontPath"/usr/X11R6/lib/X11/fonts/75dpi/:unscaled" FontPath"/usr/share/fonts/X11/Type1" FontPath"/usr/X11R6/lib/X11/fonts/Type1" FontPath"/usr/share/fonts/X11/100dpi" FontPath"/usr/X11R6/lib/X11/fonts/100dpi" FontPath"/usr/share/fonts/X11/75dpi" FontPath"/usr/X11R6/lib/X11/fonts/75dpi" # path to defoma fonts FontPath"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" EndSection Section "Module" Load"i2c" Load"bitmap" Load"ddc" #Load "glx" Load"extmod" #SubSection "extmod" #Option "omit xfree86-dga" #EndSubSection Load"freetype" Load"int10" Load"vbe" Load"v4l" EndSection Section "InputDevice" Identifier "Generic Keyboard" Driver "kbd" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" Option "XkbLayout" "fr" Option "XkbVariant""latin9" EndSection Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device""/dev/input/mice" Option "Protocol" "ImPS/2" Option "Emulate3Buttons" "true" EndSection Section "Device" Identifier "nVidia Corporation C51PV [GeForce 6150]" Driver "nv" #Driver "nvidia" #Option "NoLogo""on" BusID "PCI:0:5:0" EndSection Section "Monitor" Identifier "Écran générique" Option "DPMS" HorizSync 28-84 VertRefresh 43-60 EndSection Section "Screen" Identifier "Default Screen" Device "nVidia Corporation C51PV [GeForce 6150]" Monitor "Écran générique" DefaultDepth24 SubSection "Display" Depth 1 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection SubSection "Display" Depth 4 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection SubSection "Display" Depth 8 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection SubSection "Display" Depth 15 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection SubSection "Display" Depth 16 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection SubSection "Display" Depth 24 Modes "1680x1050" "1024x768" "800x600" "640x480" EndSubSection EndSection Section "ServerLayout" Identifier "Default Layout" Screen "Default Screen" InputDevice "Generic Keyboard" InputDevice "Configured Mouse" EndSection The same problem occ