test_mixed_content_blocker_bug803225.html is causing docshell/test/navigation tests to fail

RESOLVED FIXED in Firefox 21

Status

RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: jmaher, Assigned: mrbkap)

Tracking

Trunk
mozilla22
x86_64
Windows 7

Firefox Tracking Flags

(firefox21 fixed)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
While working on rearranging some test directories, I found that docshell/test/navigation/test_bug13871.html and test_not_opener.html would fail miserably:

05:53:57     INFO -  237475 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237476 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237477 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237478 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237479 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237480 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237481 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237482 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237483 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237484 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237485 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237486 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237487 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237488 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | uncaught exception - TypeError: can't access dead object at :0
05:53:57     INFO -  237489 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237490 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237491 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237492 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237493 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237494 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:57     INFO -  237495 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:57     INFO -  237496 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:53:58     INFO -  237502 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | [SimpleTest.finish()] this test already called finish!
05:53:58     INFO -  237503 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_bug13871.html | called finish() multiple times
05:54:07     INFO -  237554 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237555 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237556 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237557 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237558 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237559 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237560 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237561 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237562 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237563 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237564 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237565 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237566 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237567 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | uncaught exception - TypeError: can't access dead object at :0
05:54:07     INFO -  237568 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237569 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237570 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237571 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237572 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237573 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:07     INFO -  237574 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:07     INFO -  237575 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times
05:54:08     INFO -  237580 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | [SimpleTest.finish()] this test already called finish!
05:54:08     INFO -  237581 ERROR TEST-UNEXPECTED-FAIL | /tests/docshell/test/mochitest/navigation/test_not-opener.html | called finish() multiple times

After tracking this down, I found that the problem is in test_mixed_content_blocker_bug803225.html, specifically the mailto part of the test.  

For some reason the mailto test in here is causing future tests to fail!  If we can't fix this asap, we should remove the mailto part of the test until we can fix it and ensure that it doesn't cause other tests to fail/pass unexpectedly.
(Reporter)

Comment 1

6 years ago
Created attachment 724428 [details] [diff] [review]
remove the mailto test (1.0)

here is a patch if we deem it ok to disable this
(Reporter)

Updated

6 years ago
Version: 18 Branch → Trunk
Thank you for figuring this out. I spent a day miserably trying to debug the failures.
(Reporter)

Comment 3

6 years ago
I just narrowed it down, maybe there is something with the way we use the observer and mailto stuff, or there is a bug in the product when it comes to mailto and app handlers.
(Reporter)

Comment 4

6 years ago
Comment on attachment 724428 [details] [diff] [review]
remove the mailto test (1.0)

I need to resolve this bug before other patches can work, lets disable this for now and when somebody has the time to fix it properly we can land the fix to the mailto/test code.
Attachment #724428 - Flags: review?(ted)
I think we should get signoff from the author of the test (or one of the reviewers) before blindly disabling this.
Flags: needinfo?(tanvi)

Comment 6

6 years ago
The mailto: test is to make sure nsMixedContentBlocker isn't blocking the mailto protocol - http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsMixedContentBlocker.cpp#267.  A mailto tab is opened, a post message is sent to the opener and the tab is closed - https://mxr.mozilla.org/mozilla-central/source/content/base/test/test_mixed_content_blocker_bug803225.html?force=1#130.

What is the issue with this test?  Is there a problem with the implementation?  Why does rearranging test directories make it fail?  Is the underlying issue in the test or our mailto protocol code?
Flags: needinfo?(tanvi)
(Reporter)

Comment 7

6 years ago
the issue with the mailto portion of this test is that when it runs it causes docshell tests to fail.  I have no idea why this happens, even if I don't move content/base, but move docshell tests around I get a failure which points back to the mailto portion of this test.

I am not am expert in the mailto protocol or what the test is doing, which is why I was hoping the original test author/reviewer could shed some light and a patch to fix this.  

The most concerning thing is that this specific part of the test causes side effects in other test cases which if I were a sheriff I would disable this test case immediately.
(Assignee)

Comment 8

6 years ago
Created attachment 725676 [details] [diff] [review]
Proposed fix

Hey Joel, I hope you don't mind, but I looked into this and found that the reason for the failures is that the test registers an observer (in content) for "content-document-global-created" and never unregisters it. Then, we GC, find that the only reference to the observer is from chrome, and sever chrome's link to it (in order to free the window). This causes tons of "can't access dead object" errors, which end up causing the docshell tests to barf.

I tried tracking down where in the docshell tests the exception causes problems, but failed and decided that wasn't important.
Assignee: nobody → mrbkap
Attachment #724428 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #724428 - Flags: review?(ted)
Attachment #725676 - Flags: review?(tanvi)

Comment 9

6 years ago
Comment on attachment 725676 [details] [diff] [review]
Proposed fix

Thanks for catching this Blake!  Patch looks good to me.
Attachment #725676 - Flags: review?(tanvi) → review+
https://hg.mozilla.org/mozilla-central/rev/4a21247a08eb
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Duplicate of this bug: 842146
Can this test fix also be pushed to mozilla-beta? As the test is failing on comm-beta/mozilla-beta SeaMonkey testboxen. Although the Firefox mozilla-beta testboxen don't seem to fail (why?).
(Assignee)

Comment 14

5 years ago
Comment on attachment 725676 [details] [diff] [review]
Proposed fix

Looking at the logs at http://tbpl-dev.callek.net/?tree=SeaMonkey-Beta I don't know how much this patch is going to help, but it's low-risk, applies cleanly, and I'm happy to check it in if release drivers are willing to take it.

[Approval Request Comment]
User impact if declined: None.
Testing completed (on m-c, etc.): The patch has been on m-c for a month.
Risk to taking this patch (and alternatives if risky): The patch has zero risk for users, it only changes a test to clean up after itself.
Attachment #725676 - Flags: approval-mozilla-beta?
Attachment #725676 - Flags: approval-mozilla-aurora?
Yeah, I'm currently working on getting this green again (but yeah, there are worse problems than this test bug :)
Comment on attachment 725676 [details] [diff] [review]
Proposed fix

Test only fix - don't think this is needed on Beta, but we'll take it nonetheless given zero-risk.
Attachment #725676 - Flags: approval-mozilla-beta?
Attachment #725676 - Flags: approval-mozilla-beta+
Attachment #725676 - Flags: approval-mozilla-aurora?
Attachment #725676 - Flags: approval-mozilla-aurora+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
Pushed to mozilla-beta: https://hg.mozilla.org/releases/mozilla-beta/rev/5f7ba4e3664f
Bug is already fixed on mozilla-aurora
status-firefox21: --- → fixed
Keywords: checkin-needed
Tagging [qa-] for verification since this poses zero risk to users.
Whiteboard: [qa-]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.