Closed Bug 1332790 Opened 4 years ago Closed 4 years ago

Intermittent toolkit/components/extensions/test/xpcshell/test_ext_downloads_misc.js | xpcshell return code: 1

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox52 unaffected, firefox53 fixed, firefox54 fixed)

RESOLVED FIXED
mozilla54
Tracking Status
firefox52 --- unaffected
firefox53 --- fixed
firefox54 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: nika)

References

Details

(Keywords: intermittent-failure, Whiteboard: [stockwell fixed])

Attachments

(1 file)

ASAN-only failure:

[task 2017-01-20T14:40:27.533840Z] 14:40:27     INFO -  PROCESS | 11063 | Assertion failure: mLastWindowLeft, at /home/worker/workspace/build/src/dom/base/TabGroup.cpp:61
[task 2017-01-20T14:40:27.535455Z] 14:40:27     INFO -  PROCESS | 11063 | #01: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x48c4ad0]
[task 2017-01-20T14:40:27.537136Z] 14:40:27     INFO -  PROCESS | 11063 | #02: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x47d7bea]
[task 2017-01-20T14:40:27.538834Z] 14:40:27     INFO -  PROCESS | 11063 | #03: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x47d7d20]
[task 2017-01-20T14:40:27.540357Z] 14:40:27     INFO -  PROCESS | 11063 | #04: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x49b5b01]
[task 2017-01-20T14:40:27.541934Z] 14:40:27     INFO -  PROCESS | 11063 | #05: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x49b88cc]
[task 2017-01-20T14:40:27.543503Z] 14:40:27     INFO -  PROCESS | 11063 | #06: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x7e8a55e]
[task 2017-01-20T14:40:27.545177Z] 14:40:27     INFO -  PROCESS | 11063 | #07: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1ed1ca5]
[task 2017-01-20T14:40:27.546924Z] 14:40:27     INFO -  PROCESS | 11063 | #08: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1ed1897]
[task 2017-01-20T14:40:27.548502Z] 14:40:27     INFO -  PROCESS | 11063 | #09: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1ed82ea]
[task 2017-01-20T14:40:27.550115Z] 14:40:27     INFO -  PROCESS | 11063 | #10: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1ed7aad]
[task 2017-01-20T14:40:27.551704Z] 14:40:27     INFO -  PROCESS | 11063 | #11: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1ed7745]
[task 2017-01-20T14:40:27.553264Z] 14:40:27     INFO -  PROCESS | 11063 | #12: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x1edb6ab]
[task 2017-01-20T14:40:27.554848Z] 14:40:27     INFO -  PROCESS | 11063 | #13: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x205366c]
[task 2017-01-20T14:40:27.556392Z] 14:40:27     INFO -  PROCESS | 11063 | #14: ???[/home/worker/workspace/build/application/firefox/libxul.so +0x37c3a9b]
[task 2017-01-20T14:40:27.557948Z] 14:40:27     INFO -  PROCESS | 11063 | #15: ???[/home/worker/workspace/build/application/firefox/xpcshell +0xdf072]
[task 2017-01-20T14:40:27.559516Z] 14:40:27     INFO -  PROCESS | 11063 | #16: __libc_start_main[/lib/x86_64-linux-gnu/libc.so.6 +0x217ed]
[task 2017-01-20T14:40:27.561066Z] 14:40:27     INFO -  PROCESS | 11063 | #17: ???[/home/worker/workspace/build/application/firefox/xpcshell +0x1b989]
[task 2017-01-20T14:40:27.562666Z] 14:40:27     INFO -  PROCESS | 11063 | ASAN:DEADLYSIGNAL
[task 2017-01-20T14:40:27.564211Z] 14:40:27     INFO -  PROCESS | 11063 | =================================================================
[task 2017-01-20T14:40:27.565834Z] 14:40:27     INFO -  PROCESS | 11063 | ==11063==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fccc5d2729a bp 0x7ffd87344280 sp 0x7ffd87344260 T0)
[task 2017-01-20T14:40:27.567586Z] 14:40:27     INFO -  PROCESS | 11063 |     #0 0x7fccc5d27299 in mozilla::dom::TabGroup::~TabGroup() /home/worker/workspace/build/src/dom/base/TabGroup.cpp:61:3
[task 2017-01-20T14:40:27.569263Z] 14:40:27     INFO -  PROCESS | 11063 |     #1 0x7fccc5d29acf in mozilla::dom::TabGroup::Release() /home/worker/workspace/build/src/dom/base/TabGroup.cpp:242:1
[task 2017-01-20T14:40:27.571124Z] 14:40:27     INFO -  PROCESS | 11063 |     #2 0x7fccc5c3cbe9 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:40:5
[task 2017-01-20T14:40:27.572760Z] 14:40:27     INFO -  PROCESS | 11063 |     #3 0x7fccc5c3cbe9 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:394
[task 2017-01-20T14:40:27.574507Z] 14:40:27     INFO -  PROCESS | 11063 |     #4 0x7fccc5c3cbe9 in ~RefPtr /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:78
[task 2017-01-20T14:40:27.576142Z] 14:40:27     INFO -  PROCESS | 11063 |     #5 0x7fccc5c3cbe9 in mozilla::dom::DocGroup::~DocGroup() /home/worker/workspace/build/src/dom/base/DocGroup.cpp:64
[task 2017-01-20T14:40:27.577791Z] 14:40:27     INFO -  PROCESS | 11063 |     #6 0x7fccc5c3cd1f in mozilla::dom::DocGroup::Release() /home/worker/workspace/build/src/dom/base/DocGroup.cpp:66:1
[task 2017-01-20T14:40:27.579502Z] 14:40:27     INFO -  PROCESS | 11063 |     #7 0x7fccc5e1ab00 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:40:5
[task 2017-01-20T14:40:27.581138Z] 14:40:27     INFO -  PROCESS | 11063 |     #8 0x7fccc5e1ab00 in Release /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:394
[task 2017-01-20T14:40:27.582826Z] 14:40:27     INFO -  PROCESS | 11063 |     #9 0x7fccc5e1ab00 in ~RefPtr /home/worker/workspace/build/src/obj-firefox/dist/include/mozilla/RefPtr.h:78
[task 2017-01-20T14:40:27.584467Z] 14:40:27     INFO -  PROCESS | 11063 |     #10 0x7fccc5e1ab00 in nsIDocument::~nsIDocument() /home/worker/workspace/build/src/dom/base/nsDocument.cpp:1365
[task 2017-01-20T14:40:27.586214Z] 14:40:27     INFO -  PROCESS | 11063 |     #11 0x7fccc5e1d8cb in nsDocument::~nsDocument() /home/worker/workspace/build/src/dom/base/nsDocument.cpp:1520:1
[task 2017-01-20T14:40:27.587874Z] 14:40:27     INFO -  PROCESS | 11063 |     #12 0x7fccc92ef55d in mozilla::dom::XULDocument::~XULDocument() /home/worker/workspace/build/src/dom/xul/XULDocument.cpp:212:1
[task 2017-01-20T14:40:27.589631Z] 14:40:27     INFO -  PROCESS | 11063 |     #13 0x7fccc3336ca4 in SnowWhiteKiller::~SnowWhiteKiller() /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:2664:9
[task 2017-01-20T14:40:27.591302Z] 14:40:27     INFO -  PROCESS | 11063 |     #14 0x7fccc3336896 in nsCycleCollector::FreeSnowWhite(bool) /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:2839:3
[task 2017-01-20T14:40:27.593013Z] 14:40:27     INFO -  PROCESS | 11063 |     #15 0x7fccc333d2e9 in nsCycleCollector::BeginCollection(ccType, nsICycleCollectorListener*) /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:3825:3
[task 2017-01-20T14:40:27.595027Z] 14:40:27     INFO -  PROCESS | 11063 |     #16 0x7fccc333caac in nsCycleCollector::Collect(ccType, js::SliceBudget&, nsICycleCollectorListener*, bool) /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:3650:9
[task 2017-01-20T14:40:27.596762Z] 14:40:27     INFO -  PROCESS | 11063 |     #17 0x7fccc333c744 in nsCycleCollector::ShutdownCollect() /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:3591:10
[task 2017-01-20T14:40:27.598595Z] 14:40:27     INFO -  PROCESS | 11063 |     #18 0x7fccc33406aa in Shutdown /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:3882:5
[task 2017-01-20T14:40:27.600253Z] 14:40:27     INFO -  PROCESS | 11063 |     #19 0x7fccc33406aa in nsCycleCollector_shutdown(bool) /home/worker/workspace/build/src/xpcom/base/nsCycleCollector.cpp:4200
[task 2017-01-20T14:40:27.601912Z] 14:40:27     INFO -  PROCESS | 11063 |     #20 0x7fccc34b866b in mozilla::ShutdownXPCOM(nsIServiceManager*) /home/worker/workspace/build/src/xpcom/build/XPCOMInit.cpp:1016:3
[task 2017-01-20T14:40:27.603600Z] 14:40:27     INFO -  PROCESS | 11063 |     #21 0x7fccc4c28a9a in XRE_XPCShellMain(int, char**, char**, XREShellData const*) /home/worker/workspace/build/src/js/xpconnect/src/XPCShellImpl.cpp:1631:10
[task 2017-01-20T14:40:27.605185Z] 14:40:27     INFO -  PROCESS | 11063 |     #22 0x4df071 in main /home/worker/workspace/build/src/js/xpconnect/shell/xpcshell.cpp:69:18
[task 2017-01-20T14:40:27.606812Z] 14:40:27     INFO -  PROCESS | 11063 |     #23 0x7fccbe59e7ec in __libc_start_main /build/eglibc-oqps9y/eglibc-2.15/csu/libc-start.c:226
[task 2017-01-20T14:40:27.608440Z] 14:40:27     INFO -  PROCESS | 11063 |     #24 0x41b988 in _start (/home/worker/workspace/build/application/firefox/xpcshell+0x41b988)
[task 2017-01-20T14:40:27.609909Z] 14:40:27     INFO -  PROCESS | 11063 | AddressSanitizer can not provide additional info.
[task 2017-01-20T14:40:27.611667Z] 14:40:27     INFO -  PROCESS | 11063 | SUMMARY: AddressSanitizer: SEGV /home/worker/workspace/build/src/dom/base/TabGroup.cpp:61:3 in mozilla::dom::TabGroup::~TabGroup()
[task 2017-01-20T14:40:27.613087Z] 14:40:27     INFO -  PROCESS | 11063 | ==11063==ABORTING
:mystor - related to bug 1332095?
Flags: needinfo?(michael)
I immediately thought of the following fix, which might make the problem go away?

I'm honestly surprised that this assertion isn't hit on every run of Firefox, as we should be theoretically hitting it during every debug shutdown.

Farre, do you know why the sChromeTabGroup may not be being freed sometimes?

MozReview-Commit-ID: 33C5lF31HDI
Attachment #8832080 - Flags: review?(wmccloskey)
Attachment #8832080 - Flags: feedback?(afarre)
Assignee: nobody → michael
Flags: needinfo?(michael)
No idea off the top of my head. I still need to try to reproduce why I didn't see ~TabGroup for non-chrome as well. Will look at that (and this) tomorrow.
Comment on attachment 8832080 [details] [diff] [review]
Don't assert mLastWindowLeft in ~TabGroup when destroying the chrome TabGroup

Review of attachment 8832080 [details] [diff] [review]:
-----------------------------------------------------------------

Just wanted to make a few notes in case anyone from the future visits this bug:
1. We treat the chrome tabgroup specially in Leave because it's possible to leave and then re-join the chrome tabgroup. That's not possible for other tabgroups.
2. The bug here is that we were asserting mLastWindowLeft even though we never are supposed to set it for the chrome tabgroup.
3. The reason we don't always assert is that we normally leave the chrome tabgroup after shutdown, which means sChromeTabGroup has been cleared. In that case, we *do* set mLastWindowLeft and so the assertion doesn't fire.
Attachment #8832080 - Flags: review?(wmccloskey) → review+
Also, I did a little testing on the lifetime of TabGroup. I saw the TabGroup being destroyed at the same time as the outer window, as expected. Andreas, you may need to wait a bit for this to happen. It doesn't happen immediately upon closing the tab. We need to wait for the snow white killer (and maybe the cycle collector) to run, and those are on a timer.
Pushed by michael@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e9b9944b527c
Don't assert mLastWindowLeft in ~TabGroup when destroying the chrome TabGroup, r=billm
https://hg.mozilla.org/mozilla-central/rev/e9b9944b527c
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Please request Aurora approval on this when you get a chance.
Flags: needinfo?(michael)
Comment on attachment 8832080 [details] [diff] [review]
Don't assert mLastWindowLeft in ~TabGroup when destroying the chrome TabGroup

Approval Request Comment
[Feature/Bug causing the regression]: bug 1332095
[User impact if declined]: Intermittent shutdown crash
[Is this code covered by automated tests?]: There is an intermittent shutdown crash on infra which should be fixed.
[Has the fix been verified in Nightly?]: Yes. It is in nightly
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: No
[Is the change risky?]: No
[Why is the change risky/not risky?]: Very small change to avoid incorrect MOZ_RELEASE_ASSERT.
[String changes made/needed]: None
Flags: needinfo?(michael)
Attachment #8832080 - Flags: approval-mozilla-aurora?
Comment on attachment 8832080 [details] [diff] [review]
Don't assert mLastWindowLeft in ~TabGroup when destroying the chrome TabGroup

Crash/test fix, let's uplift to aurora.
Attachment #8832080 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Attachment #8832080 - Flags: feedback?(afarre) → feedback+
Duplicate of this bug: 1326566
Whiteboard: [stockwell fixed]
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.