Closed Bug 543278 Opened 15 years ago Closed 14 years ago

[Linux-only] Timeout after browser_whitelist.js or browser_whitelist3.js with browser-test.js | must wait for focus

Categories

(Core Graveyard :: Installer: XPInstall Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME
mozilla1.9.3a5

People

(Reporter: philor, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #542928 +++

Cloned because the log looks exactly like bug 542928, other than starting after a different test, making me suspect that it's something broken in the way browser-test.js tries to restore focus - or in focus-manager, or in the way Mossop writes tests ;).

Running chrome://mochikit/content/browser/xpinstall/tests/browser_whitelist3.js...
Chrome file doesn't exist: /builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/mochitest/browser/xpinstall/tests/head.js
WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /builds/moz2_slave/mozilla-central-linux-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 5492
pldhash: for the table at address 0xb9e7340, the given entrySize of 48 probably favors chaining over double hashing.
++DOCSHELL 0xb9e72d8 == 16
++DOMWINDOW == 112 (0xb76bc48) [serial = 2536] [outer = (nil)]
WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /builds/moz2_slave/mozilla-central-linux-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 5492
WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /builds/moz2_slave/mozilla-central-linux-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 5492
++DOMWINDOW == 113 (0xbe23730) [serial = 2537] [outer = 0xb76bc18]
WARNING: NS_ENSURE_TRUE(aURI) failed: file /builds/moz2_slave/mozilla-central-linux-debug/build/docshell/base/nsDefaultURIFixup.cpp, line 76
pldhash: for the table at address 0xad9cd18, the given entrySize of 48 probably favors chaining over double hashing.
++DOCSHELL 0xad9ccb0 == 17
++DOMWINDOW == 114 (0xb9ef620) [serial = 2538] [outer = (nil)]
++DOMWINDOW == 115 (0xaeda038) [serial = 2539] [outer = 0xb9ef5f0]
WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /builds/moz2_slave/mozilla-central-linux-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 5492
WARNING: Positioned frame that does not handle positioned kids; looking further up the parent chain: file /builds/moz2_slave/mozilla-central-linux-debug/build/layout/base/nsCSSFrameConstructor.cpp, line 5492
###!!! ASSERTION: Uh, IsInModalState() called w/o a reachable top window?: 'Error', file /builds/moz2_slave/mozilla-central-linux-debug/build/dom/base/nsGlobalWindow.cpp, line 5904
gfxImageSurface::GetSize() const (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
gfxImageSurface::GetSize() const (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
gfxImageSurface::GetSize() const (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
gfxImageSurface::GetSize() const (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
NS_GetComponentManager_P (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
std::numeric_limits<long>::max() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
std::vector<std::pair<int, int>, std::allocator<std::pair<int, int> > >::~vector() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
MessageLoop::RunInternal() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
MessageLoop::RunHandler() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
MessageLoop::RunAllPending() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
gfxPlatformGtk::GetPlatform() (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
gfxCornerSizes::gfxCornerSizes(gfxSize const&, gfxSize const&, gfxSize const&, gfxSize const&) (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
XRE_main (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/libxul.so)
UNKNOWN  (/builds/moz2_slave/mozilla-central-linux-debug-unittest-mochitest-other/build/firefox/firefox-bin)
__libc_start_main (/usr/src/debug/glibc-2.5-20061008T1257/csu/libc-start.c:262)
TEST-INFO | checking window state
TEST-INFO | (browser-test.js) | Waiting for window activation...
{domwindows and docshells trickle away}
NEXT ERROR TEST-UNEXPECTED-FAIL | automation.py | application timed out after 330 seconds with no output
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1265696710.1265698661.8244.gz&fulltext=1#err2
Linux mozilla-central debug test mochitest-other on 2010/02/08 22:25:10
s: moz2-linux-slave20
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1265737866.1265739956.16739.gz&fulltext=1
Linux mozilla-central debug test mochitest-other on 2010/02/09 09:51:06
s: moz2-linux-slave19
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.6/1267276803.1267278738.10759.gz
Linux mozilla-1.9.2 opt test mochitest-other on 2010/02/27 05:20:03
s: moz2-linux-slave09
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1267388139.1267389569.5114.gz
Linux mozilla-central opt test mochitest-other on 2010/02/28 12:15:39
s: moz2-linux-slave05
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1267800425.1267803153.12001.gz&fulltext=1
Linux mozilla-central debug test mochitest-other on 2010/03/05 06:47:05
s: moz2-linux-slave19
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1270247707.1270249588.17306.gz
Linux mozilla-central debug test mochitest-other on 2010/04/02 15:35:07
s: moz2-linux-slave27
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1272151634.1272153821.16014.gz
Linux mozilla-central debug test mochitest-other on 2010/04/24 16:27:14
s: moz2-linux-slave09
http://tinderbox.mozilla.org/Firefox/1272315154.1272316851.30703.gz
Linux mozilla-central debug test mochitest-other on 2010/04/26 13:52:34
s: moz2-linux-slave18
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1272493151.1272495512.15178.gz
Linux mozilla-central debug test mochitest-other
s: moz2-linux-slave08
See also bug 565458, which looks like the same issue in a different test.
Also similar: bug 565437
Attached patch Possible fix? (deleted) — Splinter Review
This could fix the problem, because waitForFocus does a crazy number of checks to make sure that the window is focused correctly before running its callback.

This works fine locally.  I've pushed this to try as well.  I think we can take this patch because at least it shouldn't make anything worse.
Attachment #445002 - Flags: review?(gavin.sharp)
Attachment #445002 - Flags: review?(gavin.sharp) → review+
I landed the patch as http://hg.mozilla.org/mozilla-central/rev/0e11e454db6c.

I'll wait a few days to see if this happens again or not.  If it doesn't, I'll go ahead and mark all the related bugs as FIXED, and will ask people to reopen them if they see this problem again.
Assignee: nobody → ehsan
Status: NEW → ASSIGNED
Is it fixed by the patch in bug 554873?
(In reply to comment #15)
> Is it fixed by the patch in bug 554873?

Dunno, we need to wait for that bug to land, and reland this one to see if it fixes that issue.  If that bug is not close to landing, I could just push a try server build with both patches.
Depends on: 554873
IIRC, I initially used waitForFocus there, as you did, but Dao asked to use "activate" event since he noticed it was more reliable than waitForFocus.
Since a bunch of tests don't even change the initial tab, I guess that the latest patch in bug 554873 could help setting skipLoadCheck = true here.
PS: if you want a nice platform where to check focus issues, you should try latest Ubuntu 64, i was able to reproduce a bunch of failures there.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1273867335.1273869355.27474.gz
Rev3 Fedora 12 mozilla-central debug test mochitest-other on 2010/05/14 13:02:15
s: talos-r3-fed-033
Summary: Timeout from or after browser_whitelist3.js with browser-test.js | Waiting for window activation → Timeout from or after browser_whitelist.js or browser_whitelist3.js with browser-test.js | Waiting for window activation
Attached patch Possible fix on top of bug 554873 (obsolete) (deleted) — Splinter Review
I pushed this patch on top of the one in bug 554873 to the try server to see if it works.  It works locally, but so did my previous attempt.
(In reply to comment #20)
> I pushed this patch on top of the one in bug 554873 to the try server to see if
> it works.  It works locally, but so did my previous attempt.

So, with that patch applied, both attachment 445002 [details] [diff] [review] and attachment 445643 [details] [diff] [review] worked successfully on the try server.
why passing false as the third param? I guess we shold skip the check here, we just care that the window is focused.
(In reply to comment #22)
> why passing false as the third param? I guess we shold skip the check here, we
> just care that the window is focused.

Hrm, OK, I was under the impression that passing false to that parameter would skip the load event check.  But I was wrong!  I think that it makes sense to pass true there, as a way of not doing stuff that we don't need, but anyways, this shows that the patch in that bug has fixed some problems for consumers of waitForFocus, even those which don't pass true as the third parameter.
The third argument means 'I expect the page loaded in the window to be about:blank', not 'skip loading the page'. The next iteration of the patch in bug 554873 will fix up issues with this and clarify the intent.
OK, then, thanks for making this clear, Neil.  So, I think we're ready to land here once bug 554873 lands.
", window, false" are defaults, thus you can omit them (just using the first patch should be good).
Comment on attachment 445643 [details] [diff] [review]
Possible fix on top of bug 554873

(In reply to comment #26)
> ", window, false" are defaults, thus you can omit them (just using the first
> patch should be good).

Yes.  Marking this patch obsolete to make things clear.
Attachment #445643 - Attachment is obsolete: true
Relanded: <http://hg.mozilla.org/mozilla-central/rev/45f4470a306e>.  Hopefully it sticks this time.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a5
I'll go ahead and mark the rest of the bugs like this one as FIXED, and will watch them in case someone reopens them, and we'll track any possible remaining problems from there.
Blocks: 562454
Blocks: 565437
Blocks: 562850
Blocks: 565259
Blocks: 566336
Blocks: 565082
Blocks: 542928
Blocks: 566334
Blocks: 565458
Rev3 Fedora 12 mozilla-central opt test mochitest-other
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1274417154.1274418227.25489.gz
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1274467303.1274469721.14975.gz
Rev3 Fedora 12x64 mozilla-central debug test mochitest-other on 2010/05/21 11:41:43
s: talos-r3-fed64-030
Summary: Timeout from or after browser_whitelist.js or browser_whitelist3.js with browser-test.js | Waiting for window activation → Timeout after browser_whitelist.js or browser_whitelist3.js with browser-test.js | must wait for focus
I'm out of ideas here.  We probably need someone who knows about the internals of the focus code and how it works on Linux to help here.
Assignee: ehsan → nobody
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1274558019.1274560322.11367.gz
Rev3 Fedora 12x64 mozilla-central debug test mochitest-other on 2010/05/22 12:53:39
s: talos-r3-fed64-038
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1274577982.1274579946.22494.gz
Rev3 Fedora 12x64 mozilla-central debug test mochitest-other on 2010/05/22 18:26:22
s: talos-r3-fed64-012
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1275086413.1275090224.5797.gz
Rev3 Fedora 12x64 mozilla-central debug test mochitest-other on 2010/05/28 15:40:13
s: talos-r3-fed64-050
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1275357988.1275360541.21747.gz
Rev3 Fedora 12 mozilla-central debug test mochitest-other on 2010/05/31 19:06:28
s: talos-r3-fed-019
Looks like this Linux bug was fixed in bug 567704.
Comment 39 is on Mac, and so seems different.
I would mark this as a dupe, but a patch landed here.
Assignee: nobody → ehsan
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Depends on: 567704
Resolution: --- → FIXED
(In reply to comment #40)
> Looks like this Linux bug was fixed in bug 567704.
> Comment 39 is on Mac, and so seems different.
> I would mark this as a dupe, but a patch landed here.

No, that bug is not relevant to this issue.
Assignee: ehsan → nobody
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
No longer depends on: 567704
Blocks: 566936
Blocks: 567153
Blocks: 568360
Blocks: 569174
Blocks: 569239
Blocks: 569299
Blocks: 570377
Blocks: 570849
Summary: Timeout after browser_whitelist.js or browser_whitelist3.js with browser-test.js | must wait for focus → [Linux-only] Timeout after browser_whitelist.js or browser_whitelist3.js with browser-test.js | must wait for focus
Seems to have gone away so there is no reason to keep this open.
Status: REOPENED → RESOLVED
Closed: 14 years ago14 years ago
Resolution: --- → WORKSFORME
Blocks: 551540
No longer blocks: 570377
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.6/1296506544.1296507640.12389.gz
Linux mozilla-1.9.2 test mochitest-other on 2011/01/31 12:42:24
s: moz2-linux-slave18

TEST-PASS | chrome://mochikit/content/browser/xpinstall/tests/browser_whitelist2.js | Install should have been triggered by the right uri
Running chrome://mochikit/content/browser/xpinstall/tests/browser_whitelist3.js...
Waiting for window activation...
TEST-UNEXPECTED-FAIL | automation.py | application timed out after 330 seconds with no output
Whiteboard: [orange]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: