Open Bug 1238702 Opened 4 years ago Updated 2 years ago

[e10s] Frequent dom/workers/test/serviceworkers/test_xslt.html | application crashed [@ mozilla::dom::ContentProcessManager::GetTabContextByContentProcess(mozilla::dom::IdType<mozilla::dom::ContentParent> const &)]

Categories

(Core :: DOM: Workers, defect, P5)

defect

Tracking

()

Tracking Status
e10s + ---
firefox46 --- affected

People

(Reporter: jgriffin, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: crash)

On Windows 7 debug, in e10s mode, the test dom/workers/test/serviceworkers/test_xslt.html frequently crashes with:

application crashed [@ mozilla::dom::ContentProcessManager::GetTabContextByContentProcess(mozilla::dom::IdType<mozilla::dom::ContentParent> const &)] 

This happens frequently enough the test will be disabled on that config so the rest of the suite can be enabled.

Log: https://treeherder.mozilla.org/logviewer.html#?job_id=15247191&repo=try

Stack trace:

 09:49:34     INFO -   0  xul.dll!mozilla::dom::ContentProcessManager::GetTabContextByContentProcess(mozilla::dom::IdType<mozilla::dom::ContentParent> const &) [ContentProcessManager.cpp:4286811af4fe : 244 + 0x1e]
 09:49:34     INFO -      eip = 0x606ff2b5   esp = 0x002df45c   ebp = 0x002df46c   ebx = 0x0dfc5420
 09:49:34     INFO -      esi = 0x6259d6c8   edi = 0x000000f4   eax = 0x62465efc   ecx = 0x69730ad9
 09:49:34     INFO -      edx = 0x00127019   efl = 0x00200206
 09:49:34     INFO -      Found by: given as instruction pointer in context
 09:49:34     INFO -   1  xul.dll!mozilla::dom::ContentParent::GetManagedTabContext() [ContentParent.cpp:4286811af4fe : 5236 + 0x26]
 09:49:34     INFO -      eip = 0x606fe918   esp = 0x002df474   ebp = 0x002df488
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   2  xul.dll!mozilla::dom::workers::`anonymous namespace'::NotifySoftUpdateIfPrincipalOkRunnable::Run() [ServiceWorkerManagerService.cpp:4286811af4fe : 62 + 0x15]
 09:49:34     INFO -      eip = 0x6077c83f   esp = 0x002df490   ebp = 0x002df4a8
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   3  xul.dll!nsThread::ProcessNextEvent(bool,bool *) [nsThread.cpp:4286811af4fe : 989 + 0xe]
 09:49:34     INFO -      eip = 0x5ed4d57e   esp = 0x002df4b0   ebp = 0x002df590
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   4  xul.dll!NS_ProcessNextEvent(nsIThread *,bool) [nsThreadUtils.cpp:4286811af4fe : 297 + 0xd]
 09:49:34     INFO -      eip = 0x5ed7ad10   esp = 0x002df598   ebp = 0x002df5a4
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   5  xul.dll!nsThread::Shutdown() [nsThread.cpp:4286811af4fe : 799 + 0xa]
 09:49:34     INFO -      eip = 0x5ed51801   esp = 0x002df5ac   ebp = 0x002df5bc
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   6  xul.dll!nsUrlClassifierDBService::Shutdown() [nsUrlClassifierDBService.cpp:4286811af4fe : 1668 + 0xd]
 09:49:34     INFO -      eip = 0x610b44ec   esp = 0x002df5c4   ebp = 0x002df5d0
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   7  xul.dll!nsUrlClassifierDBService::Observe(nsISupports *,char const *,wchar_t const *) [nsUrlClassifierDBService.cpp:4286811af4fe : 1613 + 0xb]
 09:49:34     INFO -      eip = 0x610af81d   esp = 0x002df5d8   ebp = 0x002df64c
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   8  xul.dll!nsObserverList::NotifyObservers(nsISupports *,char const *,wchar_t const *) [nsObserverList.cpp:4286811af4fe : 113 + 0x1a]
 09:49:34     INFO -      eip = 0x5ed0dffc   esp = 0x002df654   ebp = 0x002df66c
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -   9  xul.dll!nsObserverService::NotifyObservers(nsISupports *,char const *,wchar_t const *) [nsObserverService.cpp:4286811af4fe : 307 + 0xe]
 09:49:34     INFO -      eip = 0x5ed0e108   esp = 0x002df674   ebp = 0x002df688
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  10  xul.dll!nsXREDirProvider::DoShutdown() [nsXREDirProvider.cpp:4286811af4fe : 937 + 0x15]
 09:49:34     INFO -      eip = 0x610d3632   esp = 0x002df690   ebp = 0x002df6b4
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  11  xul.dll!ScopedXPCOMStartup::~ScopedXPCOMStartup() [nsAppRunner.cpp:4286811af4fe : 1474 + 0xb]
 09:49:34     INFO -      eip = 0x610c8552   esp = 0x002df6bc   ebp = 0x002df6c8
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  12  xul.dll!mozilla::DefaultDelete<ScopedXPCOMStartup>::operator()(ScopedXPCOMStartup *) [UniquePtr.h:4286811af4fe : 482 + 0xe]
 09:49:34     INFO -      eip = 0x610c8a80   esp = 0x002df6d0   ebp = 0x002df6d0
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  13  xul.dll!XREMain::XRE_main(int,char * * const,nsXREAppData const *) [nsAppRunner.cpp:4286811af4fe : 4411 + 0x12]
 09:49:34     INFO -      eip = 0x610ce30b   esp = 0x002df6d8   ebp = 0x002df6f0
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  14  xul.dll!XRE_main [nsAppRunner.cpp:4286811af4fe : 4487 + 0x12]
 09:49:34     INFO -      eip = 0x610d0cf7   esp = 0x002df6f8   ebp = 0x002df804
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  15  firefox.exe!do_main [nsBrowserApp.cpp:4286811af4fe : 212 + 0x15]
 09:49:34     INFO -      eip = 0x00bc259d   esp = 0x002df80c   ebp = 0x002df9a4
 09:49:34     INFO -      Found by: call frame info
 09:49:34     INFO -  16  firefox.exe!NS_internal_main(int,char * *) [nsBrowserApp.cpp:4286811af4fe : 352 + 0xc]
Assignee: nobody → bkelly
Status: NEW → ASSIGNED
This code has the following race:

1) Background thread saves the list of PBackground actors
2) Dispatch to main thread
3) Main thread extracts tabs from the actors' corresponding PContent
4) Dispatch back to background thread
5) Call IPC method

Between 2 and 3 the actors can get destroyed.

I think it would be cleaner and less racy to just send the soft update to every known parent actor.  Then we can check the appId on the child side before notifying the ServiceWorkerManager.

Fernando, what do you think?
Flags: needinfo?(ferjmoreno)
Sounds good to me. Feel free to assign me the bug if you don't have the time to make the change you suggest.
Flags: needinfo?(ferjmoreno)
Actually, I think we want to do something like bug 1238990 which will probably fix the issue for this test.
Blocks: e10s-tests
tracking-e10s: --- → +
Jonathon, is there any chance you could help me re-trigger this test in a try build?

I don't know what I am doing wrong.  I applied your patches to force e10s in comment 5 build.  I also included the patch to remove the skip-if statements for windows/debug builds in the mochitest.ini.

As far as I can tell, though, dom/workers/test/serviceworkers didn't run at all in any of the mochitest runs on windows debug.
Flags: needinfo?(jgriffin)
(In reply to Ben Kelly [:bkelly] from comment #6)
> Jonathon, is there any chance you could help me re-trigger this test in a
> try build?
> 
> I don't know what I am doing wrong.  I applied your patches to force e10s in
> comment 5 build.  I also included the patch to remove the skip-if statements
> for windows/debug builds in the mochitest.ini.
> 
> As far as I can tell, though, dom/workers/test/serviceworkers didn't run at
> all in any of the mochitest runs on windows debug.

You'll need to adjust this line:
https://hg.mozilla.org/try/file/c565ff77bc89/dom/workers/test/serviceworkers/mochitest.ini#l2
Flags: needinfo?(jgriffin)
I could never really reproduce this.  I'm not working it at the moment.
Assignee: bkelly → nobody
Status: ASSIGNED → NEW
Keywords: crash
Priority: -- → P3
Priority: P3 → P5
You need to log in before you can comment on or make changes to this bug.