Last Comment Bug 697943 - Random orange: TEST-UNEXPECTED-FAIL | test_offlineStoreLocking.js | 128 == false
: Random orange: TEST-UNEXPECTED-FAIL | test_offlineStoreLocking.js | 128 == false
Status: RESOLVED FIXED
: intermittent-failure
Product: MailNews Core
Classification: Components
Component: Networking: IMAP (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 12.0
Assigned To: David :Bienvenu
:
Mentors:
http://mxr.mozilla.org/comm-central/s...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-28 00:22 PDT by Mark Banner (:standard8)
Modified: 2012-11-25 19:31 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed
fixed


Attachments
proposed fix (6.53 KB, patch)
2012-01-19 15:30 PST, David :Bienvenu
standard8: review+
standard8: approval‑comm‑aurora+
standard8: approval‑comm‑beta+
Details | Diff | Splinter Review

Description Mark Banner (:standard8) 2011-10-28 00:22:03 PDT
This orange has been popping up a bit over the last few weeks. Log:

TEST-UNEXPECTED-FAIL | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js | test failed (with xpcshell return code: 0), see following log:
>>>>>>>

TEST-INFO | (xpcshell/head.js) | test 1 pending
Directory request for: MailD that we (mailDirService.js) are not handling, leaving it to another handler.
Directory request for: MFCaF that we (mailDirService.js) are not handling, leaving it to another handler.
Directory request for: DefRt that we (mailDirService.js) are not handling, leaving it to another handler.
Directory request for: IMapMD that we (mailDirService.js) are not handling, leaving it to another handler.

TEST-INFO | (xpcshell/head.js) | test 2 pending
Doing test 1
Downloading for offline use

TEST-INFO | (xpcshell/head.js) | test 2 finished

TEST-INFO | (xpcshell/head.js) | running event loop
AUTH PLAIN line -AHVzZXIAcGFzc3dvcmQ=-
authorize-id: --, username: -user-, password: -password-

TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js | [null : 366] 0 == 0
Doing test 2

TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js | [null : 351] 0 == 0
Doing test 3
Directory request for: cachePDir that we (mailDirService.js) are not handling, leaving it to another handler.
Directory request for: cachePDir that we (mailDirService.js) are not handling, leaving it to another handler.

TEST-PASS | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js | [null : 366] 0 == 0
Doing test 4

TEST-UNEXPECTED-FAIL | /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js | 128 == false - See following stack:
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_throw :: line 453
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: _do_check_eq :: line 547
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_check_eq :: line 568
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/head.js :: do_check_false :: line 596
JS frame :: /buildbot/comm-central-linux-opt-unittest-xpcshell/build/xpcshell/tests/mailnews/imap/test/unit/test_offlineStoreLocking.js :: <TOP_LEVEL> :: line 105

TEST-INFO | (xpcshell/head.js) | exiting test
Comment 1 Mark Banner (:standard8) 2011-11-03 01:23:24 PDT
David, can you take a look at this, it seems to have suddenly got a lot more frequent?
Comment 2 Serge Gautherie (:sgautherie) 2011-12-13 10:52:33 PST
Line 105 is:
{
102   onStopRequest : function (aRequest, aContext, aStatusCode) {
103     // Because we're streaming the message while compaction is going on,
104     // we should not have stored it for offline use.
105     do_check_false(gStreamedHdr.flags & Ci.nsMsgMessageFlags.Offline);
106     do_timeout(0, function(){doTest(++gCurTestNum)});
107   },
}
Comment 3 David :Bienvenu 2012-01-10 11:45:18 PST
I haven't had any luck reproducing this, but I'll remove the windows disabling of this test and see if I can't reproduce it.
Comment 4 David :Bienvenu 2012-01-17 15:35:26 PST
I can make this fail now that I can run windows release builds, if I enable the test on Windows. I'll investigate.
Comment 5 David :Bienvenu 2012-01-17 17:29:01 PST
It looks like the compact finishes before we attempt to do the stream. I'm not sure why this is different in release mode; it could be the event loop isn't getting a chance to run the imap url until the compact finishes.
Comment 6 David :Bienvenu 2012-01-19 14:29:32 PST
OK, the way out of this might be to stream the message without a display consumer; that will make us run the url immediately, instead of using AsyncOpen, which involves a few trips through the event loop. I believe the test is still valid, because we don't write to the offline store via the display consumer. I'll attach a patch once I've rebuilt...
Comment 7 David :Bienvenu 2012-01-19 15:30:37 PST
Created attachment 590018 [details] [diff] [review]
proposed fix

This turns the test back on for windows, gets rid of an unused method, makes the messages have bigger bodies to make the compact take longer, and streams the message w/o a stream listener so that the url runs sooner. I'll kick off a try server build later today.
Comment 9 Mark Banner (:standard8) 2012-01-20 05:22:31 PST
Comment on attachment 590018 [details] [diff] [review]
proposed fix

Try seems happy and the changes look good :-)
Comment 10 David :Bienvenu 2012-01-20 07:27:07 PST
http://hg.mozilla.org/comm-central/rev/b6160b9a2dc4
Comment 11 Mark Banner (:standard8) 2012-01-23 07:25:20 PST
So far I've not spotted the linux issue recurring, however the Windows issue is still there (permanently), therefore I've re-disabled the test on Windows:

http://hg.mozilla.org/comm-central/rev/205b8ff54fe0

We should probably cover enabling it again in a different bug.
Comment 12 Mark Banner (:standard8) 2012-01-24 13:19:26 PST
I've checked the test fix and the bustage fix into the branches as this should reduce failures there as well:

http://hg.mozilla.org/releases/comm-aurora/rev/e9e9a97f4717
http://hg.mozilla.org/releases/comm-aurora/rev/c14dcbbdb4b2
http://hg.mozilla.org/releases/comm-beta/rev/d4ee3662072c
http://hg.mozilla.org/releases/comm-beta/rev/5160346d091d
Comment 13 Serge Gautherie (:sgautherie) 2012-02-27 08:22:26 PST
http://tinderbox.mozilla.org/showlog.cgi?log=ThunderbirdTrunk/1330354454.1330355619.32145.gz
MacOSX 10.6 comm-central test xpcshell on 2012/02/27 06:54:14

Still happening...

Note You need to log in before you can comment on or make changes to this bug.