Closed Bug 497053 Opened 11 years ago Closed 8 years ago

Intermittent failure in geolocation/test_timeoutWatch.html | success should have never been called.

Categories

(Core :: DOM: Geolocation, defect)

defect
Not set

Tracking

()

RESOLVED WORKSFORME
mozilla1.9.2a1
Tracking Status
status1.9.1 --- ?

People

(Reporter: hsivonen, Assigned: jmaher)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [m-1.9.1 depends on bug 482260] )

Attachments

(2 files)

The test change from bug 489817 seems to have caused orange on WINNT 5.2 mozilla-central unit test on 2009/06/08 21:42:30.
(In reply to comment #1)
> http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1244522550.1244531410.11059.gz

{
41834 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
}
Blocks: 438871
No longer depends on: 438871
Summary: [orange] geolocation/test_timeoutWatch.htm fails on tinderbox → geolocation/test_timeoutWatch.htm fails on tinderbox
Whiteboard: [orange]
Summary: geolocation/test_timeoutWatch.htm fails on tinderbox → mochitest-plain: geolocation/test_timeoutWatch.html fails intermittently
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1244550469.1244557013.26592.gz
WINNT 5.2 mozilla-central unit test on 2009/06/09 05:27:49
OS: Windows XP → Windows Server 2003
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Ports/1244560636.1244565687.12697.gz
Linux comm-1.9.1 unit test on 2009/06/09 08:17:16
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Ports/1244588638.1244593804.23151.gz
Linux comm-1.9.1 unit test on 2009/06/09 16:03:58
OS: Windows Server 2003 → All
Blocks: 489817
No longer depends on: 489817
Flags: wanted1.9.1?
as per dougt's comment in bug 489817, we need to remove the calls in stop_geolocationProvider and resume_geolocationProvider.  These are utilized by test_timeoutWatch.html and for some reason these should fail on all platforms with the patch from bug 489817, but only fail on windows.

I am attaching a patch that allows for us to control the network_geolocation.sjs provider by sending a queryString along and using setState()/getState() to store data.  I added the code in to store position data as well.

I have tested on Linux and verified this code works by editing it for negative testing.  I still get 77 pass on linux with a fresh hg pull/update.  

Still have to test on a windows build...build/test in progress.
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #382542 - Flags: review?(ctalbert)
Comment on attachment 382542 [details] [diff] [review]
geolocation.patch 1.0
[Checkin: Comment 10]

r=ctalbert This looks good.  Tested on Win2K3 several times and it passes.
Attachment #382542 - Flags: review?(ctalbert) → review+
Keywords: checkin-needed
sgautherie, we have a patch attached to this bug to fix this issue.
Pushed to m-c: bfd907ec8f01, if it sticks there I'll push to 1.9.1 as well.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Still happening:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1245436083.1245444011.9755.gz
Linux mozilla-central unit test on 2009/06/19 11:28:03
Status: RESOLVED → REOPENED
Flags: in-testsuite+
Hardware: x86 → All
Resolution: FIXED → ---
Whiteboard: [orange] → [needs 1.9.1 landing] [orange]
Target Milestone: --- → mozilla1.9.2a1
(In reply to comment #11)
> http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1245436083.1245444011.9755.gz
> Linux mozilla-central unit test on 2009/06/19 11:28:03

Moreover, there seems to be a regression in this (failure) case:
{
42124 INFO Running /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html...
42125 INFO TEST-PASS | ... | Got notification box
42126 INFO TEST-PASS | ... | Got geolocation notification
42127 INFO TEST-PASS | ... | Got button
42128 INFO TEST-PASS | ... | ensure error is a timeout.
NEXT ERROR 42129 ERROR TEST-UNEXPECTED-FAIL | ... | success should have never been called.
42131 INFO Running /tests/dom/tests/mochitest/localstorage/test_brokenUTF-16.html...
42133 INFO Running /tests/dom/tests/mochitest/localstorage/test_cookieBlock.html...

mochitest-plain: 83395/3/1272
}
The error count is 3 but there is only 1 logged failure,
and test_brokenUTF-16.html details are missing.

test_timeoutWatch.html likely did not actually "finish" before switching to the next test :-/
Keywords: checkin-needed
Whiteboard: [needs 1.9.1 landing] [orange] → [orange]
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1245757682.1245766033.2081.gz
Linux mozilla-central unit test on 2009/06/23 04:48:02

Same as comment 12.

***

Ftr, a success log is like
{
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1245756832.1245764721.31783.gz&fulltext=1
Linux mozilla-central unit test on 2009/06/23 04:33:52

...
42150 INFO TEST-PASS | test_timeoutWatch.html | ensure error is a timeout.
42152 INFO Running test_brokenUTF-16.html...
42153 INFO TEST-PASS | test_brokenUTF-16.html | UTF-16 value results from getItem
...
}
Flags: wanted1.9.2?
Flags: wanted1.9.1?
Flags: wanted1.9.1.x?
Attachment #382542 - Attachment description: geolocation.patch 1.0 → geolocation.patch 1.0 [Checkin: Comment 10]
Two more hits on this today: jmaher, are you on this?
Looked into this today with ctalbert and it appears that we have a race condition with the options.timeout.

What we found was when setting the options.timeout, we were having problems forcing the call to successCallback and would get errorCallback all the time.  

Setting the options.timeout to a large value (like 30 seconds) results in this test case working as expected.

is there an issue with way we handle options.timeout?
DougT reviewed the approach on this patch, and he thinks it will fix the bug.  From what we've seen it looks like it might, but I wanted to add some logging as well just in case we find ourselves in the same situation.
Attachment #389863 - Flags: review?(jmaher)
Comment on attachment 389863 [details] [diff] [review]
A test fix plus a little debug logging


> 
> var options = {
>-    maximumAge: 1,
>-    timeout: 100
>+    maximumAge: 0,
>+    timeout: 10
> };
> 
> navigator.geolocation.watchPosition(successCallback,
>                                     errorCallback,
>                                     options);
> 
>-setTimeout(clickNotificationButton, 10, kAcceptButton);
>+setTimeout(clickNotificationButton, 100, kAcceptButton);
> 

This patch is just fiddling with the timing some more, while setting the MaximumAge to 0 and forcing us to timeout.  With the history of this test case and the lack of a better solution, this is a good patch to give us test coverage on the errorCallback code path while removing the race condition in the timeout code.

We need to add future tests to cover more of these options and errorCallback scenarios (bug 482260).
Attachment #389863 - Flags: review?(jmaher) → review+
Pushed f905520076db, not marking fixed.  We'll see if we see the intermittent problem again.  I'm crossing my fingers.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248243046.1248249729.25678.gz
Linux mozilla-central unit test on 2009/07/21 23:10:46

rev 7974ea41cf2f, which is after Clint's push.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248248582.1248253799.4949.gz
Linux mozilla-central unit test on 2009/07/22 00:43:02

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248243067.1248250769.4635.gz
OS X 10.5.2 mozilla-central unit test on 2009/07/21 23:11:07

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248243081.1248253003.28696.gz
WINNT 5.2 mozilla-central unit test on 2009/07/21 23:11:21
I think this may have gotten worse:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248254820.1248256967.6615.gz
WINNT 5.2 mozilla-central test mochitests on 2009/07/22 02:27:00  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248252464.1248255371.21887.gz
OS X 10.5.2 mozilla-central test mochitests on 2009/07/22 01:47:44  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248253913.1248260710.15089.gz
OS X 10.5.2 mozilla-central unit test on 2009/07/22 02:11:53  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248258788.1248261598.25101.gz
Linux mozilla-central test mochitests on 2009/07/22 03:33:08  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248257379.1248259168.30728.gz
WINNT 5.2 mozilla-central test mochitests on 2009/07/22 03:09:39  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248256835.1248259566.2530.gz
OS X 10.5.2 mozilla-central test mochitests on 2009/07/22 03:00:35  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248255045.1248259804.5053.gz
OS X 10.5.2 mozilla-central unit test on 2009/07/22 02:30:45  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox-Unittest/1248259860.1248261660.25842.gz
OS X 10.5.2 mozilla-central test mochitests on 2009/07/22 03:51:00  

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1248256128.1248261601.25177.gz
OS X 10.5.2 mozilla-central unit test on 2009/07/22 02:48:48  

all showing TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
(And I'm not going to note any further random oranges from before the backout; there are a bunch more already.)
status1.9.1: --- → ?
Flags: wanted1.9.1.x?
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1251873026.1251878176.25053.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/09/01 23:30:26  
42312 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
Looks like the last recorded instance of this bug on mozilla-central was comment 35, on 8/12/09 three months ago.  So apparently something fixed this (on trunk, but not 1.9.1) soon after that.

I'm guessing it was Bug 482260. Marking dependency.
Depends on: 482260
Flags: wanted1.9.2?
Whiteboard: [orange] → [m-1.9.1 depends on bug 482260] [orange]
Target Milestone: mozilla1.9.2a1 → ---
Target Milestone: --- → mozilla1.9.2a1
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1261169036.1261172381.31610.gz
Linux mozilla-1.9.1 test mochitests on 2009/12/18 12:43:56
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1261172063.1261174900.27612.gz
OS X 10.5.2 mozilla-1.9.1 test mochitests on 2009/12/18 13:34:23
s: moz2-darwin9-slave18
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1264204354.1264207614.4444.gz
Linux mozilla-1.9.1 test mochitests on 2010/01/22 15:52:34
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1264825107.1264827919.8168.gz
Linux mozilla-1.9.1 test mochitests on 2010/01/29 20:18:27
s: moz2-linux-slave48
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1269278707.1269281550.9685.gz
OS X 10.5.2 mozilla-1.9.1 test mochitests on 2010/03/22 10:25:07
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1270491742.1270494499.6137.gz
OS X 10.5.2 mozilla-1.9.1 test mochitests on 2010/04/05 11:22:22
Summary: mochitest-plain: geolocation/test_timeoutWatch.html fails intermittently → Intermittent failure in geolocation/test_timeoutWatch.html | success should have never been called.
why is this failing on mozilla-central again?  It hasn't had any failures on m-c since 2009-08-12, then we see one on 2010-06-21 (almost 10 months later.)
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1277380643.1277381092.24900.gz
Rev3 MacOSX Leopard 10.5.8 mozilla-central opt test mochitests-3/5
s: talos-r3-leopard-014

5996 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
philringnalda%gmail.com
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1278587940.1278588245.3387.gz
Rev3 Fedora 12x64 mozilla-central opt test mochitests-3/5 on 2010/07/08 04:19:00

s: talos-r3-fed64-037
5985 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1280319799.1280320773.23066.gz#err0
WINNT 5.2 mozilla-central opt test mochitests-3/5 on 2010/07/28 05:23:19
philringnalda%gmail.com
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1281235090.1281236099.19313.gz
Rev3 MacOSX Snow Leopard 10.6.2 mozilla-central opt test mochitests-3/5 on 2010/08/07 19:38:10

s: talos-r3-snow-023
5996 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey2.0/1294159839.1294162357.12104.gz
WINNT 5.2 comm-1.9.1 test mochitests on 2011/01/04 08:50:39
{
42632 INFO TEST-PASS | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | Got button
42633 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/geolocation/test_timeoutWatch.html | success should have never been called.
}
Status: REOPENED → RESOLVED
Closed: 11 years ago8 years ago
Resolution: --- → WORKSFORME
Whiteboard: [m-1.9.1 depends on bug 482260] [orange] → [m-1.9.1 depends on bug 482260]
You need to log in before you can comment on or make changes to this bug.