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 94806 - crash with automatic closes
crash with automatic closes
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Urgent critical
: ---
Assigned To: gtk-bugs
Metacity maintainers list
: 94804 95188 97992 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-10-03 22:25 UTC by Fernando Herrera
Modified: 2011-02-04 16:10 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Trace of crash (21.70 KB, text/plain)
2002-10-03 22:27 UTC, Fernando Herrera
  Details
Metacity log (36.15 KB, text/plain)
2002-10-24 14:59 UTC, Andrew Sobala
  Details
gdb backtrace (3.26 KB, text/plain)
2002-11-11 20:40 UTC, Santiago Otero
  Details
Valgrind report (with valgrind metacity doesn't show. it segfaults at start) (4.82 KB, text/plain)
2002-11-11 20:44 UTC, Santiago Otero
  Details
Adds missing ref. (544 bytes, patch)
2002-11-13 19:26 UTC, Chris Lahey
none Details | Review

Description Fernando Herrera 2002-10-03 22:25:14 UTC
I'm getting this crash very often. Last cvs version of gnome-2-0 branch.
It crash sometimes when some new windows closes automatically (before
redraw?) like mozilla downloads and simitar.
Attached the trace.
Comment 1 Fernando Herrera 2002-10-03 22:27:23 UTC
Created attachment 11392 [details]
Trace of crash
Comment 2 Havoc Pennington 2002-10-03 22:31:13 UTC
Hmm, there was another report about refcounting issues 
with GdkDrawable/GdkColormap. I can't find it right now though.
Comment 3 Alexander Larsson 2002-10-07 08:02:16 UTC
Strange. I can't find it either. But that one was a leak, so it's not
likely to cause a crash.
Comment 4 Havoc Pennington 2002-10-07 14:18:21 UTC
What I mean is, there was another report claiming that your fix for
the leak created a crash. But when I looked at your fix I couldn't see
any way it would do that.
Comment 5 Luis Villa 2002-10-24 13:37:37 UTC
*** Bug 95188 has been marked as a duplicate of this bug. ***
Comment 6 Luis Villa 2002-10-24 13:37:57 UTC
*** Bug 94804 has been marked as a duplicate of this bug. ***
Comment 7 Luis Villa 2002-10-24 13:38:39 UTC
*** Bug 96222 has been marked as a duplicate of this bug. ***
Comment 8 Luis Villa 2002-10-24 13:39:06 UTC
Note that 96222 has a stack trace.
Comment 9 Andrew Sobala 2002-10-24 14:59:40 UTC
Created attachment 11804 [details]
Metacity log
Comment 10 Andrew Sobala 2002-10-24 15:00:41 UTC
I've attached the log from metacity, from when this happened to me. 
Comment 11 Havoc Pennington 2002-10-25 19:06:24 UTC
"wm-tester/wm-tester --evil" from the metacity source tree basically 
just creates and autocloses windows, and it's not causing this
for me. Does it cause it for any of you?

What themes (GTK and metacity) are you using?
Comment 12 Braden 2002-10-25 20:11:56 UTC
Crux and Crux here.
Comment 13 Havoc Pennington 2002-10-25 20:53:06 UTC
Hmm, switching to Crux gtk engine and metacity theme doesn't 
help me reproduce.
Comment 14 Drew "DanteAliegri" Ogle 2002-11-04 04:38:21 UTC
Ok, I've been getting this crash 95% of the time when I close xine (
both CVS and 0.9.13 )

What I do to replicate the crash is this:
open avi file, start playing, press 'q' in the display window.
Metacity crashes 95%-99% of the time.

I recompiled metacity with -g -O3 -march=athlon
attached from a ssh session, and got the following backtrace:

create_constraints (constraints=0x825b2e8, windows=0x80ca628) at
stack.c:496
496           if (c->above == above)


(gdb) bt
  • #0 create_constraints
    at stack.c line 496
  • #1 meta_stack_ensure_sorted
    at stack.c line 759
  • #2 meta_stack_sync_to_server
    at stack.c line 1031
  • #3 meta_window_free
    at window.c line 923
  • #4 event_callback
    at display.c line 1419
  • #5 filter_func
    at ui.c line 105
  • #6 gdk_net_wm_supports
    from /usr/local/lib/libgdk-x11-2.0.so.0
  • #7 gdk_x11_drawable_get_xdisplay
    from /usr/local/lib/libgdk-x11-2.0.so.0
  • #8 gdk_net_wm_supports
    from /usr/local/lib/libgdk-x11-2.0.so.0
  • #9 g_main_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #10 g_main_context_iterate
    from /usr/local/lib/libglib-2.0.so.0
  • #11 g_main_loop_run
    from /usr/local/lib/libglib-2.0.so.0
  • #12 main
    at main.c line 339
  • #13 __libc_start_main
    from /lib/libc.so.6


Hope this is more helpful.
Comment 15 Havoc Pennington 2002-11-04 14:33:28 UTC
I believe I fixed the create_constraints() crash with xine last 
night. I'm not sure if that was the whole bug here (some of the
backtraces look different).
Comment 16 Luis Villa 2002-11-07 19:46:02 UTC
Apologies for the spam- I'm removing 'bugsquad' from some keywords via the web
interface. This is a one-time only thing before I re-add bugsquad via the SQL
interface, which will generate no mail. Apologies again.
Comment 17 Santiago Otero 2002-11-11 18:31:17 UTC
I am getting the same crash with metacity. CVS version doesn't crash
with xine but  'wm-tester --evil' makes it crash after some time. Here
are  the  last lines from /tmp/metacity-22123-debug-log-COPMXN (23 MB)
before crash. If you need full log I can put it somewhere in the web.

(...)
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4c005c5: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4c005b9: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4c00582: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4c00579: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4a0007e: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4800234: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x4800031: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x140bc34: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x260001a: atom: _NET_WM_ICON_GEOMETRY
state: PropertyNewValue serial 204274
EVENTS: UnmapNotify on 0xe01391: event: 0xe01391 window: 0xe01391
from_configure: 0 serial 204412
EVENTS: UnmapNotify on root 0: event: 0x56 window: 0xe01391
from_configure: 0 serial 204412
EVENTS: DestroyNotify on 0xe01391  serial 204412
Comment 18 Havoc Pennington 2002-11-11 19:30:36 UTC
Can someone get a gdb backtrace with MALLOC_CHECK_=2 set, or 
a valgrind/purify report?
Comment 19 Luis Villa 2002-11-11 20:17:09 UTC
cc'ing Ben as he said he spent some time tracking this down the other day.
Comment 20 Santiago Otero 2002-11-11 20:40:02 UTC
Created attachment 12235 [details]
gdb backtrace
Comment 21 Santiago Otero 2002-11-11 20:44:46 UTC
Created attachment 12237 [details]
Valgrind report (with valgrind metacity doesn't show. it segfaults at start)
Comment 22 Fernando Herrera 2002-11-11 22:45:10 UTC
Just for info, I'm not experimenting this bug after upgrading to HEAD
(2.1.x branch)
Comment 23 Santiago Otero 2002-11-12 17:30:54 UTC
I have two Linux distributions in my computer: Debian unstable (glib
2.0.7, gtk 2.0.8, glibc 2.3.1) and RedHat 8.0 (glib 2.0.6, gtk 2.0.6,
glibc 2.2.93). The same binary works fine in RedHat but crash in
Debian. Maybe a glib or gtk bug?
Comment 24 Benjamin Kahn 2002-11-12 19:17:11 UTC
Yes.  It's a GTK bug.  Talking to clahey, a colormap patch which was
applied between 2.0.6 and 2.0.7 exposed this bug.  (He says the patch
was correct, but that it exposes this bug which is somewhere else.) 
Anyway, reverting the patch makes the crash go away.
Comment 25 Havoc Pennington 2002-11-12 19:22:14 UTC
Chris can you give more details on the exact patch and what bug it
creates?
Comment 26 Chris Lahey 2002-11-13 19:26:41 UTC
Created attachment 12287 [details] [review]
Adds missing ref.
Comment 27 Chris Lahey 2002-11-13 19:27:22 UTC
So, I found an extra unref from a GdkWindowImplX11 to a GdkColormap
reading through stacktraces.

I also found a missing ref from a GdkWindowImplX11 to a GdkColormap
reading the code of gdkwindow-x11.c:304.

Patch is attached.
Comment 28 Owen Taylor 2002-11-13 20:13:07 UTC
So the reproduction instructions are:

 - Create a window with gdk_window_foreign_new()
 - call gdk_drawable_get_colormap() on it (probably
   happens implicitely from drawing calls)
 - Unref the window

?
Comment 29 Owen Taylor 2002-11-13 20:20:38 UTC
Looks fine to commit with a changelog entry.

[
Note that, however, the GTK+-2.0 code is completely conceptually
broken if the window doesn't have the default system colormap,
so there may be metacity bugs hiding here if it ever uses anything
but the default system colormap.
]
Comment 30 Santiago Otero 2002-11-13 22:58:38 UTC
With patch from Chris, metacity works fine here. "wm-tester/wm-tester
--evil" was running for a long time without crashing metacity.
Comment 31 Owen Taylor 2002-11-14 15:52:19 UTC
2002-11-13  Christopher James Lahey  <clahey@ximian.com>

        * gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap): Ref
        the colormap returned from gdk_colormap_lookup.
Comment 32 Heath Harrelson 2002-11-15 19:14:53 UTC
*** Bug 97992 has been marked as a duplicate of this bug. ***