After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588174 - gdm crashes in libgtk2 with SIGSEGV at _gdk_visual_init (gdkvisual-x11.c:249)
gdm crashes in libgtk2 with SIGSEGV at _gdk_visual_init (gdkvisual-x11.c:249)
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Backend: X11
2.16.x
Other All
: Normal critical
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2009-07-09 17:14 UTC by Dustin Spicuzza
Modified: 2009-07-09 17:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Dustin Spicuzza 2009-07-09 17:14:14 UTC
Steps to reproduce:
Originally reported on launchpad: https://bugs.launchpad.net/ubuntu/+source/gtk+2.0/+bug/397309

1. Setup a triplehead setup with NVIDIA drivers 1.73
2. Start X
3. Watch gdmgreeter segfault in libgdk


Stack trace:
Core was generated by `/usr/lib/gdm/gdmgreeter'.
Program terminated with signal 11, Segmentation fault.
[New process 19761]

Thread 1 (process 19761)

  • #0 _gdk_visual_init
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkvisual-x11.c line 249
  • #1 _gdk_x11_screen_new
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkscreen-x11.c line 995
  • #2 IA__gdk_display_open
    at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkdisplay-x11.c line 206
  • #3 IA__gdk_display_open_default_libgtk_only
    at /build/buildd/gtk+2.0-2.16.1/gdk/gdk.c line 316
  • #4 IA__gdk_init_check
    at /build/buildd/gtk+2.0-2.16.1/gdk/gdk.c line 361
  • #5 IA__gdk_init
    at /build/buildd/gtk+2.0-2.16.1/gdk/gdk.c line 367
  • #6 ??
  • #7 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #8 ??


Other information:
[pasted from launchpad bug report]

System information: Ubuntu 9.04
Package Version: 2.16.1-0ubuntu2

I have two NVidia cards installed with the 1.73 restricted drivers. My setup is two screens on a 6600GT, and a single screen on a FX 5200.

I rebuilt gtk from source with no optimizations, and used apport to obtain a core dump. gdmgreeter does a SIGSEGV at /build/buildd/gtk+2.0-2.16.1/gdk/x11/gdkvisual-x11.c:249. Examination of the core dump with GDB shows that default_xvisual is a NULL pointer, thus why there is a segfault when it tries to dereference the pointer.

default_xvisual is derived from the X11 screen structure for that screen, which appears to be filled out correctly except that root_visual is NULL, which is where default_xvisual comes from.

Its not clear to me whether the root_visual screen is allowed to be NULL, but also its clear that GTK doesn't check for a NULL pointer there either before using it, which seems to me to be a bug. However, I don't have any X11 experience so I'm not quite sure what the action should be if it does not have a default_xvisual (I noticed that it enumerated 72 visuals, so maybe it could just pick one as the system visual?).

The fact that the root_visual isn't filled in seems to me (without any actual knowledge here) that its a bug in the NVidia driver (which I realize isn't supported by Ubuntu), but if that is an acceptable to be NULL then it should be fixed in GTK.

I would just like some direction on how GTK should be fixed (if it should), and I'll patch it and test. Its quite annoying because I can't start X until fixing this. :)
Comment 1 Matthias Clasen 2009-07-09 17:56:28 UTC
DefaultVisual returning NULL is not OK. Not our bug.