Closed Bug 495776 Opened 11 years ago Closed 10 years ago

[Linux] xpcshell-tests: test_sendBackground.js (and others) fails intermittently with "TypeError: real is undefined"

Categories

(MailNews Core :: Backend, defect)

x86
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b4

People

(Reporter: sgautherie, Assigned: standard8)

References

()

Details

(Keywords: intermittent-failure, Whiteboard: [See comment 4] )

Attachments

(1 file)

{
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1243829692.1243834323.8072.gz
Linux comm-central unit test on 2009/05/31 21:14:52

TEST-UNEXPECTED-FAIL | /builds/slave/comm-central-linux-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js | test failed (with xpcshell return code: 0), see following log:
*** TEST-UNEXPECTED-FAIL | /builds/slave/comm-central-linux-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js | TypeError: real is undefined
}
Whiteboard: [orange]
http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1243893654.1243894020.31190.gz
Linux comm-central check on 2009/06/01 15:00:54
No longer blocks: SmTestFail
Flags: wanted-thunderbird3?
Version: 1.9.1 Branch → Trunk
Fwiw,
{
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey-Ports/1243957402.1243962956.32062.gz&fulltext=1
OS X 10.5 comm-1.9.1 unit test on 2009/06/02 08:43:22

TEST-UNEXPECTED-FAIL | /builds/slave/comm-1.9.1-macosx-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js | test failed (with xpcshell return code: -8), see following log:
  >>>>>>>
  ### XPCOM_MEM_LEAK_LOG defined -- logging leaks to /var/folders/lM/lMjnsUOwEnGg5M72PZ3JSk+++TM/-Tmp-/runxpcshelltests_leaks.log
Directory request for: CurWorkD that we (mailDirService.js) are not handling, leaving it to another handler.
*** test 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.

  <<<<<<<
}

I don't know whether this box is bad behaving, or if it's a side-effect of bug 495527 landing.
Previous reports were failing at "test_sendBackground.js :: anonymous :: line 63".

*****

{
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1244169209.1244173910.17753.gz
Linux comm-central unit test on 2009/06/04 19:33:29

[...]
TEST-PASS | /builds/slave/comm-central-linux-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js | [anonymous : 53] false == false
TEST-UNEXPECTED-FAIL | /builds/slave/comm-central-linux-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js | TypeError: real is undefined - See following stack:
JS frame :: /builds/slave/comm-central-linux-unittest/build/mozilla/testing/xpcshell/head.js :: do_throw :: line 134
JS frame :: /builds/slave/comm-central-linux-unittest/build/objdir/mozilla/_tests/xpcshell/test_compose/unit/test_sendBackground.js :: anonymous :: line 70
}

Actually, the failing check is
55       do_check_transaction(transaction,
because 'transaction' is undefined...
Depends on: 362433
Same case with other tests:

http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1244524272.1244525281.2300.gz
Linux comm-central check on 2009/06/08 22:11:12
test_compose/unit/test_bug474774.js | [anonymous : 54] false == false
test_compose/unit/test_bug474774.js :: anonymous :: line 68

http://tinderbox.mozilla.org/showlog.cgi?log=Thunderbird/1244559829.1244561061.5509.gz
Linux comm-central check on 2009/06/09 08:03:49
test_compose/unit/test_sendMessageLater.js | [anonymous : 64] false == false
test_compose/unit/test_sendMessageLater.js :: anonymous :: line 77
Summary: xpcshell-tests: test_sendBackground.js fails intermittently with "TypeError: real is undefined" → xpcshell-tests: test_sendBackground.js (and others) fails intermittently with "TypeError: real is undefined"
Whiteboard: [orange] → [See comment 4] [orange]
(In reply to comment #3)
> OS X 10.5 comm-1.9.1 unit test on 2009/06/02 08:43:22

Just ignore this unstable SeaMonkey-Ports box ftb.

*****

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1244638160.1244642768.11086.gz
Linux comm-central unit test on 2009/06/10 05:49:20
Summary: xpcshell-tests: test_sendBackground.js (and others) fails intermittently with "TypeError: real is undefined" → [Linux] xpcshell-tests: test_sendBackground.js (and others) fails intermittently with "TypeError: real is undefined"
http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1244738982.1244743609.12854.gz
Linux comm-central unit test on 2009/06/11 09:49:42
test_bug474774.js :: anonymous :: line 68
Yeah, I don't think we need any more logs especially when they are all saying pretty much the same thing.
Attached patch The fixSplinter Review
I've finally realised what this is. The check_transaction function is being passed a null value - the transaction is being assigned via .playTransaction just after performTest is being called, however we're in the callback here. So if everything goes just right, the callback gets called before we've hit the playTransaction call an check_transaction gets an undefined value.

Not sure why we aren't seeing this more often and on the other tests that do this but I'm updating them all to just pass the result of server.playTransaction when they need it.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #391861 - Flags: review?(bienvenu)
Comment on attachment 391861 [details] [diff] [review]
The fix

sorry for the delay - tests succeed w/ this patch for me on windows...
Attachment #391861 - Flags: review?(bienvenu) → review+
Checked in: http://hg.mozilla.org/comm-central/rev/d773b790cb3f
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: wanted-thunderbird3? → in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.0b4
Whiteboard: [See comment 4] [orange] → [See comment 4]
You need to log in before you can comment on or make changes to this bug.