Closed Bug 499498 Opened 15 years ago Closed 15 years ago

BadWindow error upon first run of FF3.5 RC

Categories

(Core Graveyard :: X-remote, defect)

All
Linux
defect
Not set
normal

Tracking

(status1.9.2 beta4-fixed, status1.9.1 .6-fixed)

RESOLVED FIXED
mozilla1.9.3a1
Tracking Status
status1.9.2 --- beta4-fixed
status1.9.1 --- .6-fixed

People

(Reporter: jason_quinn, Assigned: karlt)

References

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1) Gecko/20090616 Firefox/3.5

The first time I ran FF3.5 RC, it crashed and I got the following console output:


The program 'firefox-bin' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 681 error_code 3 request_code 20 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


Reproducible: Always

Steps to Reproduce:
1. Start FF3.5 after using latest 3.0.x release
2. Observe crash
Actual Results:  
Crash.

Expected Results:  
No crash.

This started happening with the last beta release.
Version: unspecified → 3.5 Branch
Dupe of 46057? I am experiencing this as well.
I got at least two of these reports on bugzilla.novell.com.
Searching bmo "BadWindow" seems to happen quite often in different trees and products.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hardware: x86 → All
Oops, I meat to say possible dupe of bug #460572, and was fixed for me by disabling Compiz.  I am no longer seeng this issue with 3.5.1~hg20090629r26036+nobinonly-0ubuntu2~umd1~jaunty.
(In reply to comment #3)
> Oops, I meat to say possible dupe of bug #460572, and was fixed for me by
> disabling Compiz.  I am no longer seeng this issue with
> 3.5.1~hg20090629r26036+nobinonly-0ubuntu2~umd1~jaunty.

Did that daily really fix this for you even with compiz enabled? We seem to still get this with 3.5.1 final in karmic (and most likely jaunty?).
ubuntu bug: https://bugs.edge.launchpad.net/bugs/401055

Stacktrace with --sync on ffox 3.5.1: http://launchpadlibrarian.net/29324303/StackTraceDebug.txt
...
#2  0x00007fda15006256 in ?? () from /usr/lib/libgdk-x11-2.0.so.0
No symbol table info available.
#3  0x00007fda16f503d4 in _XError (dpy=0x7fda1a6ac000, rep=0x7fda1a6b8100) at ../../src/XlibInt.c:2924
        rtn_val = <value optimized out>
        event = {type = 0, xany = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819}, xkey = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, keycode = 32730, same_screen = 1}, xbutton = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, button = 32730, same_screen = 1}, xmotion = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, state = 443252992, is_hint = -38 '\332', same_screen = 1}, xcrossing = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, root = 4256530, subwindow = 550, time = 140574722708608, x = 549, y = 0, x_root = 443203584, y_root = 32730, mode = 443252992, detail = 32730, same_screen = 1, focus = 0, state = 550}, xfocus = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, mode = 4256530, detail = 0}, xexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, x = 4256530, y = 0, width = 550, height = 0, count = 443110528}, xgraphicsexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, drawable = 140574715810819, x = 4256530, y = 0, width = 550, height = 0, count = 443110528, major_code = 32730, minor_code = 549}, xnoexpose = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, drawable = 140574715810819, major_code = 4256530, minor_code = 0}, xvisibility = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, state = 4256530}, xcreatewindow = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, parent = 140574715810819, window = 4256530, x = 550, y = 0, width = 443110528, height = 32730, border_width = 549, override_redirect = 0}, xdestroywindow = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530}, xunmap = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, from_configure = 550}, xmap = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, override_redirect = 550}, xmaprequest = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, parent = 140574715810819, window = 4256530}, xreparent = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, parent = 550, x = 443110528, y = 32730, override_redirect = 549}, xconfigure = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, x = 550, y = 0, width = 443110528, height = 32730, border_width = 549, above = 140574722801664, override_redirect = 443252992}, xgravity = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, x = 550, y = 0}, xresizerequest = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, window = 140574715810819, width = 4256530, height = 0}, xconfigurerequest = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, parent = 140574715810819, window = 4256530, x = 550, y = 0, width = 443110528, height = 32730, border_width = 549, above = 140574722801664, detail = 443252992, value_mask = 1}, xcirculate = {type = 0, serial = 140574722801664, send_event = 83886083, display = 0x226, event = 140574715810819, window = 4256530, place = 550}, xci
        async = <value optimized out>
        next = 0x7fda1a6b8100
#4  0x00007fda16f56e76 in _XReply (dpy=0x7fda1a6ac000, rep=<value optimized out>, extra=0, discard=0) at ../../src/xcb_io.c:506
        ext = 0x0
        ret_code = <value optimized out>
        error = 0x7fda1a6b8100
        c = 0x7fda1a6ad000
        __PRETTY_FUNCTION__ = "_XReply"
#5  0x00007fda16f343e7 in XGetWindowProperty (dpy=0x7fda1a6ac000, w=<value optimized out>, property=327, offset=0, length=0, delete=1870209126, req_type=0, actual_type=0x7fffa6752e70, actual_format=0x7fffa6752e7c, nitems=0x7fffa6752e68, bytesafter=0x7fffa6752e60, prop=0x7fffa6752e58) at ../../src/GetProp.c:64
        reply = {type = 0 '\0', format = 3 '\3', sequenceNumber = 550, length = 83886083, propertyType = 1310720, bytesAfter = 0, nItems = 78567008, pad1 = 0, pad2 = 3, pad3 = 0}
        error = {type = 0 '\0', errorCode = 192 '\300', sequenceNumber = 550, resourceID = 32730, minorCode = 28514, majorCode = 245 '\365', pad1 = 22 '\26', pad3 = 32730, pad4 = 443171200, pad5 = 32730, pad6 = 443207680, pad7 = 32730}
#6  0x00007fda18c36450 in XRemoteClient::CheckWindow (this=0x7fffa6753050, aWindow=0) at XRemoteClient.cpp:273
        type = 0
        nitems = 140735986085968
        data = <value optimized out>
        format = 32767
        bytesafter = 0
        innerWindow = <value optimized out>
#7  0x00007fda18c36578 in XRemoteClient::FindBestWindow (this=0x7fffa6753050, aProgram=<value optimized out>, aUsername=<value optimized out>, aProfile=<value optimized out>, aSupportsCommandLine=<value optimized out>) at XRemoteClient.cpp:489
        type = 0
        nitems = 0
        data_return = 0x0
        w = 0
        status = 464016024
        username = 0x1 <Address 0x1 out of bounds>
        format = 0
        bytesafter = 0
        version = 0
        bestWindow = 77594697
        parent = 0
        nkids = 154
        i = <value optimized out>
        root2 = 292
        kids = 0x7fda1a69f800
#8  0x00007fda18c36b98 in XRemoteClient::SendCommandLine (this=0x1, aProgram=0x0, aUsername=0x7fda1ba85298 "\235\216\377\377ÈŽ\377\377\210\216\377\377\235\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377\350\216\377\377\200\217\377\377\350\216\377\377\350\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377Ð\377\377\30\220\377\377Ð\377\377Ð\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377m\216\377\377Ð\377\377\350\220\377\377"..., aProfile=0xc <Address 0xc out of bounds>, argc=2, argv=0x726220756f792066, aDesktopStartupID=0x0, aResponse=0x7fffa6753348, aWindowFound=0x7fffa67534b0) at XRemoteClient.cpp:228
        w = <value optimized out>
        rv = 0
...
Assignee: nobody → blizzard
Component: General → X-remote
Product: Firefox → Core
QA Contact: general → blizzard
Version: 3.5 Branch → unspecified
Alex, I am not seeing it anymore, and I switched to 3.5.1 final in jaunty instead of the daily build.
my comment from Ubuntu Bug - https://bugs.launchpad.net/ubuntu/+source/firefox-3.5/+bug/401055/comments/4:

band-aid with some debugging output should be available on trunk dailies (firefox-3.6 and xulrunner-1.9.2) in https://edge.launchpad.net/~ubuntu-mozilla-daily/+archive/ppa

  - http://bazaar.launchpad.net/~mozillateam/xulrunner/xulrunner-1.9.2.head/annotate/head%3A/debian/patches/lp401055_bz499498_debug_bandaid.patch

Problem appears to be that XQueryTree somehow gives us a bad window; I haven't looked yet how that can happen or if that indicates a bug in X.

I noticed that i can trigger this more easily by using killall firefox-3.5 rather than shutting it down properly; from that it feels a bit like there is a window not properly removed from X.
attaching the patch referred to in comment 7
There's a race condition between getting window XIDs and accessing them.
BadWindow would result if an window being checked has been destroyed.
Assignee: blizzard → mozbugz
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
Attachment #397329 - Flags: review?(roc)
http://hg.mozilla.org/mozilla-central/rev/7bdfa4dfef47
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Comment on attachment 397329 [details] [diff] [review]
patch

I see this frequently enough.  Requesting approval1.9.2.

Usually I just try again and then it succeeds, but sometimes when opening some
links from KDE applications the failure is repeated; I give up, open a new
window and try again.  What's happening is that KDE is putting up a progress
window while determining the mime type, and the remoting process takes long
enough (bug 222051) that there's are reasonable period of time in which the
process can get caught by KDE's window getting destroyed.

Automated testing is difficult, possibly involving X server emulators or
proxies.  I tested the patch by adding sleep()s to the code and manually
destroying windows.

I've submitted bug 517133 for a way on getting stats on how often these errors
are happening.
Attachment #397329 - Flags: approval1.9.2?
This is a top crash for us in ubuntu still. Karl, do you see any reason why this shouldn't go to 1.9.1 branch too?
I've been using this for 3 weeks with Firefox 3.5.3 and it has made a world of difference for me.  If others are also suffering then this seems a good candidate for 1.9.1.
Attachment #397329 - Flags: approval1.9.1.5?
Comment on attachment 397329 [details] [diff] [review]
patch

also requesting approval on 1.9.1 branch. this is the main blocker for us in ubuntu karmic.
Comment on attachment 397329 [details] [diff] [review]
patch

Approved for 1.9.1.6, a=dveditz for release-drivers
Attachment #397329 - Flags: approval1.9.1.6? → approval1.9.1.6+
If this is a topcrash on Ubuntu, it should really block 1.9.2. (And we're taking it on 1.9.1, so if it's not fixed on 1.9.2, it'll be a regression.)
Flags: blocking1.9.2?
Now a blocker, so you're good to land this on 1.9.2, you can remove the approval request.
Flags: blocking1.9.2? → blocking1.9.2+
Attachment #397329 - Flags: approval1.9.2?
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: