Bug 33300 - REGRESSION(52819?): AXLoadComplete and AXLayoutComplete causes 4 tests fail on Snow Leopard Debug bot
Summary: REGRESSION(52819?): AXLoadComplete and AXLayoutComplete causes 4 tests fail o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P1 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 33923
  Show dependency treegraph
 
Reported: 2010-01-06 21:15 PST by Eric Seidel (no email)
Modified: 2010-01-21 16:23 PST (History)
2 users (show)

See Also:


Attachments
Speculative (hackish) fix, work in progress (3.76 KB, patch)
2010-01-07 21:13 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch (1.39 KB, patch)
2010-01-07 21:45 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
patch (5.32 KB, patch)
2010-01-07 23:20 PST, chris fleizach
no flags Details | Formatted Diff | Diff
patch (6.62 KB, patch)
2010-01-07 23:21 PST, chris fleizach
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-01-06 21:15:19 PST
two ARIA tests fail on Snow Leopard Debug bot

They probably just need new baselines:
platform/mac/accessibility/aria-required.html
platform/mac/accessibility/aria-slider-value-change.html

--- layout-test-results/platform/mac/accessibility/aria-required-expected.txt	2010-01-06 20:45:07.000000000 -0800
+++ layout-test-results/platform/mac/accessibility/aria-required-actual.txt	2010-01-06 20:45:07.000000000 -0800
@@ -1,3 +1,5 @@
+AXLayoutComplete
+AXLoadComplete
   
 This tests that aria-required is a usable attribute.
 
--- layout-test-results/platform/mac/accessibility/aria-slider-value-change-expected.txt	2010-01-06 20:45:08.000000000 -0800
+++ layout-test-results/platform/mac/accessibility/aria-slider-value-change-actual.txt	2010-01-06 20:45:08.000000000 -0800
@@ -1,3 +1,14 @@
+AXLayoutComplete
+AXLayoutComplete
+AXLayoutComplete
+AXSelectedTextChanged
+AXLayoutComplete
+AXLayoutComplete
+AXLayoutComplete
+AXSelectedTextChanged
+AXLayoutComplete
+AXLoadComplete
+AXLayoutComplete
 slider
 This tests that its possible to increment and decrement an aria slider and have the value updated correctly.
Comment 1 Eric Seidel (no email) 2010-01-06 21:17:40 PST
Looks like two storage tests are also failing due to Aria logs:

storage/domstorage/localstorage/window-open.html
storage/domstorage/sessionstorage/delete-removal.html

I suspect the logs are occurring after the test as "completed" and are bleeding into later tests.
Comment 2 Eric Seidel (no email) 2010-01-06 21:22:43 PST
The buildbot seems to think these failures started with http://trac.webkit.org/changeset/52896.  I suspect these failures are just intermittent as r52896 looks completely unrelated.

I suspect the actual catalyst of this regression is from http://trac.webkit.org/changeset/52819.  However the real culprit is probably that we aren't properly canceling all actions that might cause later logging between tests inside DRT.
Comment 3 Eric Seidel (no email) 2010-01-06 21:23:15 PST
Unfortunately r52819 is too long ago for the buildbots to still have data about that release, so I'm just guessing that that is related.
Comment 4 Eric Seidel (no email) 2010-01-06 21:31:59 PST
Yes, definitely intermittent.  52897 didn't fail, but 52898 did.
Comment 5 Eric Seidel (no email) 2010-01-06 22:35:57 PST
The AXLoadComplete disease has struck Leopard as well!

http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r52899%20(8958)/results.html
svg/W3C-SVG-1.1/linking-a-04-t.svg
svg/W3C-SVG-1.1/linking-a-05-t.svg
svg/W3C-SVG-1.1/linking-a-07-t.svg
svg/W3C-SVG-1.1/linking-uri-01-b.svg
svg/W3C-SVG-1.1/linking-uri-02-b.svg

Those 5 all failed due to the same AXLoadComplete spew in their results.
Comment 6 chris fleizach 2010-01-06 22:37:03 PST
(In reply to comment #5)
> The AXLoadComplete disease has struck Leopard as well!


Did a NSLog get left in somewhere?
Comment 7 Eric Seidel (no email) 2010-01-06 22:38:41 PST
I'm not sure what these are from.  They seem to be intermittent, and only seem to happen on the slow bots (the Debug bots).
Comment 8 Mark Rowe (bdash) 2010-01-07 15:13:23 PST
AccessibilityUIElement::addNotificationListener is called to set a notification listener.  I don’t see anything that clears out the notification listener between tests.  I’m also not sure that the code is safe: it stores a reference to a JSObjectRef in to a global variable without first protecting it.
Comment 9 chris fleizach 2010-01-07 15:19:28 PST
(In reply to comment #8)
> AccessibilityUIElement::addNotificationListener is called to set a notification
> listener.  I don’t see anything that clears out the notification listener
> between tests.  I’m also not sure that the code is safe: it stores a reference
> to a JSObjectRef in to a global variable without first protecting it.

Mark, do you know what needs to be done to clear out the listener between tests. And how to protect the variable? if so, please file a bug for me
Comment 10 Mark Rowe (bdash) 2010-01-07 15:46:07 PST
(In reply to comment #8)
> AccessibilityUIElement::addNotificationListener is called to set a notification
> listener.  I don’t see anything that clears out the notification listener
> between tests.  I’m also not sure that the code is safe: it stores a reference
> to a JSObjectRef in to a global variable without first protecting it.

I guess that doesn’t explain how it would show up in the test output, since the only place addNotificationListener is used is in platform/mac/accessibility/aria-liveregions-notifications.html where the notification is not displayed anywhere.
Comment 11 Eric Seidel (no email) 2010-01-07 20:08:17 PST
Hit this again in another random test:
http://build.webkit.org/results/Leopard%20Intel%20Debug%20(Tests)/r52967%20(9012)/svg/W3C-SVG-1.1/animate-elem-78-t-pretty-diff.html

Need to figure out how those logs are happening in the first place.
Comment 12 Eric Seidel (no email) 2010-01-07 20:21:05 PST
I was wrong, these are not ARIA* messages, they are AX* messages.  I don't see these anywhere in any layout test result.
Comment 13 Eric Seidel (no email) 2010-01-07 20:32:21 PST
I expect that some test is registering an AX NotificationListener, and then it's never getting unset (just as Mark said above).

Since 
static JSObjectRef AXNotificationFunctionCallback = 0;

is static in:
http://trac.webkit.org/browser/trunk/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm#L2662

we can just clear it in our "reset state" callback.

I can write that patch.  It will be a hack, but someone with more AX knowledge can also write a better patch which is less of a hack.  Either way, we need to make the bots green again asap.
Comment 14 chris fleizach 2010-01-07 20:36:17 PST
(In reply to comment #13)
> I expect that some test is registering an AX NotificationListener, and then
> it's never getting unset (just as Mark said above).
> 
> Since 
> static JSObjectRef AXNotificationFunctionCallback = 0;
> 
> is static in:
> http://trac.webkit.org/browser/trunk/WebCore/accessibility/mac/AccessibilityObjectWrapper.mm#L2662

there's only one test that registers
platform/mac/accessibility/aria-liveregions-notifications.html

> 
> we can just clear it in our "reset state" callback.
> 
> I can write that patch.  It will be a hack, but someone with more AX knowledge
> can also write a better patch which is less of a hack.  Either way, we need to
> make the bots green again asap.

I'll be looking into this some more tonite so that the notification callbacks are not so static and get cleared approriately
Comment 15 Eric Seidel (no email) 2010-01-07 21:01:15 PST
I just wrote a hack patch.  Testing it now.  If you jump on IRC we can discuss.  I'm happy to leave this to you to fix. :)
Comment 16 chris fleizach 2010-01-07 21:03:25 PST
(In reply to comment #15)
> I just wrote a hack patch.  Testing it now.  If you jump on IRC we can discuss.
>  I'm happy to leave this to you to fix. :)

can't talk now. commit your patch and i'll work with it. it'll be helpful to see what you do. thanx
Comment 17 Eric Seidel (no email) 2010-01-07 21:13:37 PST
Created attachment 46110 [details]
Speculative (hackish) fix, work in progress
Comment 18 Eric Seidel (no email) 2010-01-07 21:45:46 PST
Created attachment 46111 [details]
Patch
Comment 19 Eric Seidel (no email) 2010-01-07 21:47:28 PST
Chris:  I've posted a patch to skip the test for now.  I also posted my (untested) work in progress hackish fix.  This way you now have no real rush, and can fix this when you have time.  We'll leave this bug open after the Skipped patch lands.
Comment 20 WebKit Review Bot 2010-01-07 21:49:34 PST
style-queue ran check-webkit-style on attachment 46111 [details] without any errors.
Comment 21 chris fleizach 2010-01-07 23:20:00 PST
Created attachment 46113 [details]
patch

This is my attempt to address the problems in the first iteration of this

We no longer use a single static callback variable, and we clear out the value being kept in AccessibilityObjectWrapper
Comment 22 chris fleizach 2010-01-07 23:20:38 PST
Comment on attachment 46113 [details]
patch

wrong patch
Comment 23 chris fleizach 2010-01-07 23:21:05 PST
Created attachment 46114 [details]
patch
Comment 24 WebKit Review Bot 2010-01-07 23:29:05 PST
style-queue ran check-webkit-style on attachment 46114 [details] without any errors.
Comment 25 Eric Seidel (no email) 2010-01-08 00:40:29 PST
Comment on attachment 46114 [details]
patch

I think this has a very strange API for this being static.  I think that the JS API needs to be reconsidered long term.  This should be a method on AccessibiltyController instead of ObjectWraper since it listens to all notifications, not just one.

But if this fixes the bug, then I'm OK with this.  If you agree, please file a new bug about fixing the API.
Comment 26 Eric Seidel (no email) 2010-01-08 02:19:23 PST
Comment on attachment 46111 [details]
Patch

I accidentally committed this patch:
Committed r52979: <http://trac.webkit.org/changeset/52979>

But I won't roll it out for now, because it will actually keep the tree greener for the next 12 hours before you wake and land yours. :)
Comment 27 chris fleizach 2010-01-08 08:38:21 PST
(In reply to comment #26)


https://bugs.webkit.org/show_bug.cgi?id=33388
Comment 28 chris fleizach 2010-01-08 09:24:32 PST
http://trac.webkit.org/changeset/52994