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 693264 - WineTest causes Metacity to abort()
WineTest causes Metacity to abort()
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2013-02-06 15:59 UTC by Francois Gouget
Modified: 2015-02-19 11:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Francois Gouget 2013-02-06 15:59:22 UTC
WineTest is Wine's conformance/regression testing suite. Part of the checks involve creating/deleting a bunch of windows with various sizes and properties.

I run WineTest daily on my machine and regularly this causes metacity to crash. 

To reproduce:
 * Install the wine package
 * Download: http://test.winehq.org/builds/winetest-latest.exe
 * Run wine winetest-latest.exe
 * The test run will take 10 to 20 minutes and may or may not crash Metacity.
   If Metacity did not crash, try again.


Here are what seem like the most relevant messages from ~/.xsession-errors:

Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_register_x_window: assertion `g_hash_table_lookup (display->window_ids, xwindowp) == NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_unregister_x_window: assertion `g_hash_table_lookup (display->window_ids, &xwindow) != NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_register_x_window: assertion `g_hash_table_lookup (display->window_ids, xwindowp) == NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_unregister_x_window: assertion `g_hash_table_lookup (display->window_ids, &xwindow) != NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_register_x_window: assertion `g_hash_table_lookup (display->window_ids, xwindowp) == NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_unregister_x_window: assertion `g_hash_table_lookup (display->window_ids, &xwindow) != NULL' failed
Avertissement du gestionnaire de fenêtres : Log level 8: meta_display_register_x_window: assertion `g_hash_table_lookup (display->window_ids, xwindowp) == NULL' failed
Avertissement du gestionnaire de fenêtres : Fenêtre WM_TRANSIENT_FOR 0x4e000a6 non valide indiquée pour 0x4e000a8 (Tool windo).
Avertissement du gestionnaire de fenêtres : Fenêtre WM_TRANSIENT_FOR 0x4e000a6 non valide indiquée pour 0x4e000a9 (Tool windo).
Avertissement du gestionnaire de fenêtres : from event callback
Avertissement du gestionnaire de fenêtres : from event callback
Anomalie dans le gestionnaire de fenêtres : Unexpected X error: BadAlloc (insufficient resources for operation) serial 1818384 error_code 11 request_code 53 minor_code 0)
x-session-manager[10834]: WARNING: Child process 10951 was already dead.
x-session-manager[10834]: WARNING: Application 'gnome-wm.desktop' killed by signal 6
x-session-manager[10834]: WARNING: App 'gnome-wm.desktop' respawning too quickly


As far as I can tell signal 6 corresponds to abort() which means this probably comes from meta_bug() in src/core/util.c. I'm surprised I'm not getting more debug information though.

Interestingly this causes gnome-shell to bring up the "Oops"/"Oh no!" screen, and yet when I dismiss it I find that the desktop is still fully usable because metacity got respawned (the new process id is a telltale sign).


The packages come from Debian:
libmetacity-private0a   1:2.34.3-4
metacity                1:2.34.3-4
metacity-common         1:2.34.3-4
gnome-shell             3.4.2-6
gnome-shell-common      3.4.2-6
gnome-shell-extensions  3.4.0-2
Comment 1 Francois Gouget 2013-02-07 09:50:18 UTC
Here is an extract from another crash that has more traces (METACITY_VERBOSE+METACITY_DEBUG):

Window manager: Metacity version 2.34.3 running on 02/07/13
Window manager: Running in locale "C" with encoding "ANSI_X3.4-1968"
Window manager: Compiled with shape extension
XINERAMA: Compiled with Xinerama extension
XINERAMA:  (using XFree86 Xinerama)
XINERAMA:  (not using Solaris Xinerama)
Window manager: Compiled with sync extension
Window manager: Compiled with randr extension
Window manager: Compiled with startup notification
Window manager: Compiled with composite extensions
Window manager: Creating 99 atoms
Window manager: Attempted to init Xsync, found version 3.1 error base 165 event base 117
Window manager: Attempted to init Shape, found error base 0 event base 98
Window manager: Attempted to init Render, found error base 173 event base 0
Window manager: Attempted to init Composite, found error base 0 event base 0 extn ver 0 4
Window manager: Attempted to init Damage, found error base 181 event base 125
Window manager: Attempted to init XFixes, found error base 171 event base 121

...

STARTUP: no information about window 0x5000009 (Main windo) found
WINDOW_STATE: Window 0x5000009 (Main windo) does focus on map, and does place on top on map.
WINDOW_STATE: Frame actually needs map
WINDOW_STATE: 0x5000009 (Main windo) actually needs map
ERRORS: 1 traps remain
SYNC: 148305: Syncing on error_trap_pop, traps = 1, roundtrip = 0
ERRORS: 0 traps
Window manager: Setting _NET_WM_STATE with 1 atoms
ERRORS: 1 traps remain
SYNC: 148306: Syncing on error_trap_pop, traps = 1, roundtrip = 0
ERRORS: 0 traps
Window manager: Ungrabbing display, grab count now 0
GEOMETRY: Clearing the update_icon queue
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: MapNotify on 0x1001593: event: 0x1001593 window: 0x1001593 override_redirect: 0 serial 329055
EVENTS: Frame was receiver of event for 0x5000009 (Main windo)
EVENTS: MapNotify on root 0: event: 0x26f window: 0x1001593 override_redirect: 0 serial 329055
EVENTS: Frame was receiver of event for 0x5000009 (Main windo)
EVENTS: Frame was receiver of event for 0x5000009 (Main windo)
EVENTS: Frame was receiver of event for 0x5000009 (Main windo)
ERRORS: 1 traps remain
ERRORS: 0 traps
EVENTS: PropertyNotify on 0x5000009: atom: _NET_WM_STATE state: PropertyNewValue serial 329059
Window manager: Property notify on 0x5000009 (Main windo) for _NET_WM_STATE
Window manager: Requesting 1 properties of 0x5000009 at once
SYNC: 148307: Syncing to get 1 GetProperty replies in meta_prop_get_values
Window manager: Ignoring _NET_WM_STATE: we should be the one who set the property in the first place
Window manager: Requesting 1 properties of 0x5000009 at once
SYNC: 148308: Syncing to get 1 GetProperty replies in meta_prop_get_values
EVENTS: UnmapNotify on root 0: event: 0x26f window: 0x100000f from_configure: 0 SEND serial 329071
FOCUS: Adding EnterNotify serial 329071 to ignored focus serials
EVENTS: UnmapNotify on root 0: event: 0x26f window: 0x100000f from_configure: 0 SEND serial 329087
FOCUS: Adding EnterNotify serial 329087 to ignored focus serials
Bug in window manager: Unexpected X error: BadAlloc (insufficient resources for operation) serial 329098 error_code 11 request_code 53 minor_code 0)

Metacity actually crashed twice tonight and the last 50+ lines of both logs are essentially identical. I have uploaded the compressed logs of the crashes to the URLs below for reference:

http://fgouget.free.fr/tmp/metacity-bug693264-20130207-1.xz
http://fgouget.free.fr/tmp/metacity-bug693264-20130207-2.xz
Comment 2 Francois Gouget 2013-03-06 12:00:31 UTC
I got another crash tonight and this time I had METACITY_VERBOSE=1 and METACITY_DEBUG=1 so there are a few more traces. Also metacity was unstripped but unfortunately I don't have any more information in the stack trace :-(

GEOMETRY: Clearing the move_resize queue
WINDOW_STATE: Removing 0x5e00009 (Main windo) from the move_resize queue
GEOMETRY: Move/resize 0x5e00009 (Main windo) to 100,100 32767x32767 from 100,100 32767x32767
GEOMETRY: Constraining 0x5e00009 (Main windo) in move from 100,100 32767x32767 to 100,100 32767x32767
WORKAREA: Window 0x5e00009 (Main windo) xinerama 0 has work area 0,27 1920 x 1173
GEOMETRY: Setting up constraint info:
  orig: 100,100 +32767,32767
  new : 100,100 +32767,32767
  fgeom: 4,4,26,4
  action_type     : Move&Resize
  is_user_action  : false
  resize_gravity  : NorthWestGravity
  fixed_directions: None
  work_area_xinerama: 0,27 +1920,1173
  entire_xinerama   : 0,0 +1920,1200
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_maximization
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_fullscreen
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_size_increments
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_size_limits
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_aspect_ratio
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_to_single_xinerama
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_fully_onscreen
GEOMETRY: screen/xinerama constraint; region_spanning_rectangles: [-32692,27 +67304,33944]
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_titlebar_visible
GEOMETRY: screen/xinerama constraint; region_spanning_rectangles: [-32692,-32665 +67304,6663
GEOMETRY: info->current is 100,100 +32767,32767 after constrain_partially_onscreen
GEOMETRY: screen/xinerama constraint; region_spanning_rectangles: [-32692,27 +67304,33944]
GEOMETRY: screen/xinerama constraint; region_spanning_rectangles: [-32692,-32665 +67304,6663
GEOMETRY: Calculated frame size 32775x32797
SHAPES: Frame 0x104d8cd has shaped corners
GEOMETRY: Size/position not modified
WINDOW_STATE: Clearing the calc_showing queue
Window manager: Should be showing for window 0x5e00009 (Main windo)
Window manager: Window 0x5e00009 (Main windo) is on the active workspace 4
Window manager: Grabbing display, grab count now 1
Window manager: Implement showing = 1 for window 0x5e00009 (Main windo)
Bug in window manager: Unexpected X error: BadAlloc (insufficient resources for operation) serial 5381644 error_code 11 request_code 53 minor_code 0)
Window manager:   /usr/bin/metacity() [0x437dda]
Window manager:   /usr/bin/metacity() [0x438228]
Window manager:   /usr/bin/metacity() [0x4264bc]
Window manager:   /usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x103) [0x7f6317202563]
Window manager:   /usr/lib/x86_64-linux-gnu/libX11.so.6(+0x445d1) [0x7f63171ff5d1]
Window manager:   /usr/lib/x86_64-linux-gnu/libX11.so.6(+0x44615) [0x7f63171ff615]
Window manager:   /usr/lib/x86_64-linux-gnu/libX11.so.6(_XReadEvents+0xfd) [0x7f63171fff3d]
Window manager:   /usr/lib/x86_64-linux-gnu/libX11.so.6(XWindowEvent+0x12a) [0x7f63171fe5ba]
Window manager:   /usr/bin/metacity() [0x41d973]
Window manager:   /usr/bin/metacity() [0x443ba9]
Window manager:   /usr/bin/metacity() [0x44463d]
Window manager:   /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x135) [0x7f6317b6b355]
Window manager:   /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a688) [0x7f6317b6b688]
Window manager:   /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_loop_run+0x72) [0x7f6317b6ba82]
Window manager:   /usr/bin/metacity() [0x4114fd]
Window manager:   /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f631659cead]
Window manager:   /usr/bin/metacity() [0x4118c9]

I have uploaded the compressed log to the URLs below for reference:
http://fgouget.free.fr/tmp/metacity-bug693264-20130306-crash.xz (abridged 1MB compressed / 26MB uncompressed)
http://fgouget.free.fr/tmp/metacity-bug693264-20130306.xz (full 15MB compressed / 628MB uncompressed)
Comment 3 Francois Gouget 2013-04-09 09:37:01 UTC
I got another crash with the exact same backtrace implicating a BadAlloc X error caused by a 32775x32797 calculated frame size.
Comment 4 Francois Gouget 2013-12-01 09:43:49 UTC
This bug is still present in Metacity 2.34.13.
Comment 5 Francois Gouget 2015-02-18 11:16:11 UTC
This bug is still present in metacity 3.14.3.
Any hint as to how to better diagnose this or debug it further?
Comment 6 Alberts Muktupāvels 2015-02-18 11:23:59 UTC
Are you running metacity with compositing manager enabled? Does it crash if you disable it? And when you are running that test does metacity starts using more and more memory?
Comment 7 Francois Gouget 2015-02-19 11:06:10 UTC
It turns out I am no longer running metacity because GNOME switched to mutter now. I did retest in metacity using the GNOME Flashback session but the bug did not reproduce there (at least when running user32:win which is the test that normally causes the crash). So it can probably be closed now.

And I'll open a new bug against gnome-shell/mutter...