Support for nsIWebSocketEventListener.send() API
Categories
(Core :: Networking, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: Honza, Assigned: sonakshisaxena1, Mentored)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file, 1 obsolete file)
(deleted),
text/x-phabricator-request
|
Details |
WebSocket Inspector in DevTools is based on nsIWebSocketEventService and nsIWebSocketEventListener and this API currently doesn't support sending WS messages (using an existing WS connection on the page).
The goal of this bug is to implement a send
method that would allow DevTools to implement a new (user facing) feature the user can use to send custom WS messages directly from DevTools UI. See Bug 1618711 for more details
See specifically bug 1618711 comment #c2 and bug 1618711 comment #c3
Honza
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Hey! I would like to work on this. Can you please guide me through it?
Comment 2•5 years ago
|
||
(In reply to Sonakshi Saxena from comment #1)
Hey! I would like to work on this. Can you please guide me through it?
Sure. Please have a look at https://bugzilla.mozilla.org/show_bug.cgi?id=1618711#c3 (note that in point 1 there should be WebSocketEventService instead of WebSocketEventSource). Then have a look at the following files where the changes need to be done and let me know what you don't understand.
https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketEventService.cpp
https://searchfox.org/mozilla-central/source/dom/websocket/WebSocket.cpp
https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketChannel.cpp
Assignee | ||
Comment 3•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #2)
(In reply to Sonakshi Saxena from comment #1)
Hey! I would like to work on this. Can you please guide me through it?
Sure. Please have a look at https://bugzilla.mozilla.org/show_bug.cgi?id=1618711#c3 (note that in point 1 there should be WebSocketEventService instead of WebSocketEventSource). Then have a look at the following files where the changes need to be done and let me know what you don't understand.
https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketEventService.cpp
https://searchfox.org/mozilla-central/source/dom/websocket/WebSocket.cpp
https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketChannel.cpp
Thanks for the guidance.
I am not sure what WebSocketImpl
mean and how exactly can we make anything a weak-reference
. Can you help with this too?
Comment 4•5 years ago
|
||
WebSocketImpl is an implementation (https://searchfox.org/mozilla-central/source/dom/websocket/WebSocket.cpp#79) of the websocket object available in JS. I.e. whenever new WebSocket(aURL) is called in JS a new WebSocketImpl object is created. Devtools get the information about new websocket channels, received and sent frame etc. from WebSocketEventService. To provide such information WebSocketEventService the does not need to keep a reference to WebSocketImpl. It receives the notifications from WebSocketImpl/WebSocketChannel, the websocket connection is identified by a serial number (https://searchfox.org/mozilla-central/rev/3f8c67d7fd836d559491e3fe497bc739f707c1a6/netwerk/protocol/websocket/nsIWebSocketChannel.idl#219) and the service forwards then these notifications to the registered listeners. When we want to allow devtools to send frames, WebSocketEventService needs to have a reference to WebSocketImpl. To avoid reference cycles, this should be a weak reference. WebSocketImpl already implements nsIWeakReference interface, so it just needs to register itself at WebSocketEventService when it's created. Here is an example how to get a strong reference from a weak reference: https://searchfox.org/mozilla-central/rev/3f8c67d7fd836d559491e3fe497bc739f707c1a6/dom/websocket/WebSocket.cpp#600
Assignee | ||
Comment 5•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #4)
WebSocketImpl is an implementation (https://searchfox.org/mozilla-central/source/dom/websocket/WebSocket.cpp#79) of the websocket object available in JS. I.e. whenever new WebSocket(aURL) is called in JS a new WebSocketImpl object is created. Devtools get the information about new websocket channels, received and sent frame etc. from WebSocketEventService. To provide such information WebSocketEventService the does not need to keep a reference to WebSocketImpl. It receives the notifications from WebSocketImpl/WebSocketChannel, the websocket connection is identified by a serial number (https://searchfox.org/mozilla-central/rev/3f8c67d7fd836d559491e3fe497bc739f707c1a6/netwerk/protocol/websocket/nsIWebSocketChannel.idl#219) and the service forwards then these notifications to the registered listeners. When we want to allow devtools to send frames, WebSocketEventService needs to have a reference to WebSocketImpl. To avoid reference cycles, this should be a weak reference. WebSocketImpl already implements nsIWeakReference interface, so it just needs to register itself at WebSocketEventService when it's created. Here is an example how to get a strong reference from a weak reference: https://searchfox.org/mozilla-central/rev/3f8c67d7fd836d559491e3fe497bc739f707c1a6/dom/websocket/WebSocket.cpp#600
Thanks :michal ! This is great info!
Some quick questions -
- So all the WebSocketImpl(starting from this https://searchfox.org/mozilla-central/source/dom/websocket/WebSocket.cpp#81) must be taken as a strong reference from a weak reference as per https://searchfox.org/mozilla-central/rev/3f8c67d7fd836d559491e3fe497bc739f707c1a6/dom/websocket/WebSocket.cpp#600 ? If that's correct, can you guide me to the ideal position where I should make this reference in https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketEventService.cpp ?
- Where exactly do we need to implement
nsIWebSocketEventService.send(aWebSocketSerialID, payload)
in WebSocketEventservice.cpp? Should I create a new function or add it in https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketEventService.cpp#316 (Correct me if I am wrong)?
Thanks!
Assignee | ||
Comment 6•5 years ago
|
||
Hey :michal
The following is the approach that I understood -
- Created a 'Weak ptr' of 'WebSocketImpl'
nsWeakPtr mWeakWebSocketImpl = do_GetWeakReference(this);
- Created a method in 'WebSocketEventService' which updates a hashtable with (key, value) as (serialId, weak ptr of websocketimpl). Called this method in WebSocket.cpp when we Initialise the connection (WebSocketImpl::InitializeConnection)
mService->SetSerialIDForWebSocketImpl(mChannel->Serial(), mWeakWebSocketImpl);
- Created a method in 'WebSocketEventService' called 'SendMessage', which takes SerialId and Message string as input. The method gets the WebSocketImpl's weak ptr through the hash table.
void WebSocketEventService::SendMessage(uint32_t aWebSocketSerialID, const nsAString& aMessage) {
nsWeakPtr aWeakWebSocketImpl = *(mWeakWebSocketImpl.Get(aWebSocketSerialID));
aWeakWebSocketImpl->Send(aMessage);
}
- Created a wrapper of Send method of 'WebSocket' which is getting called in the above code snippet.
Problems/Errors I'm facing -
- How to change the https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/nsIWebSocketEventService.idl file? How does this link to the methods in WebSocketEventService.cpp?
- In the code snippet above,
aWeakWebSocketImpl->Send(aMessage);
throws error because we haven't referenced the class 'WebSocketImpl' in this file. How to resolve that?
I can also create a patch for the above as it might help you identify and rectify my mistakes in a better way.
Comment 7•5 years ago
|
||
(In reply to Sonakshi Saxena from comment #6)
Problems/Errors I'm facing -
- How to change the https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/nsIWebSocketEventService.idl file? How does this link to the methods in WebSocketEventService.cpp?
nsIWebSocketEventService is an interface which is implemented by WebSocketEventService. Simply add a new method to the interface and then implement it in WebSocketEventService.
- In the code snippet above,
aWeakWebSocketImpl->Send(aMessage);
throws error because we haven't referenced the class 'WebSocketImpl' in this file. How to resolve that?
You must obtain a strong reference from the weak reference using do_QueryReferent().
Assignee | ||
Comment 8•5 years ago
|
||
Hey :michal, I made the required changes but I am still receiving an error here- (In reply to Sonakshi Saxena from comment #6)
- In the code snippet above,
aWeakWebSocketImpl->Send(aMessage);
throws error because we haven't referenced the class 'WebSocketImpl' in this file. How to resolve that?
Can you help me with this?
Thanks :)
Comment 9•5 years ago
|
||
(In reply to Sonakshi Saxena from comment #8)
Hey :michal, I made the required changes but I am still receiving an error here- (In reply to Sonakshi Saxena from comment #6)
- In the code snippet above,
aWeakWebSocketImpl->Send(aMessage);
throws error because we haven't referenced the class 'WebSocketImpl' in this file. How to resolve that?Can you help me with this?
Thanks :)
I've described in comment #7 what you need to do. Please, show me your patch.
Assignee | ||
Comment 10•5 years ago
|
||
Updated•5 years ago
|
Comment 11•5 years ago
|
||
Baku, do you have time to answer this question:
https://phabricator.services.mozilla.com/D68068#inline-403708
thanks
Reporter | ||
Comment 13•5 years ago
|
||
Sonakshi, the attached patch looks great thanks for helping with this bug!
There are some awaiting review comments. Do you have some time to look at them?
Honza
Assignee | ||
Comment 14•5 years ago
|
||
Hey Honza, apologies for the delay.
I have been working on the revisions and will update the patch by tonight :)
Thanks
Comment 15•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:sonakshisaxena1, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 16•5 years ago
|
||
Hey Michal, could you please try landing the patch, as I don't have the access to that.
Thanks.
Comment 17•5 years ago
|
||
Updated•5 years ago
|
Comment 18•5 years ago
|
||
Backed out changeset 537608d1e4cc (bug 1621345) for many ns related crashes
Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&fromchange=ae536cdfd0b0489a52d63ac735233d5a10239116&tochange=09ee9644127b939c8303c28650ea105f0224e5b0&selectedJob=299492626
Backout link: https://hg.mozilla.org/integration/autoland/rev/09ee9644127b939c8303c28650ea105f0224e5b0
Failures logs: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492578&repo=autoland&lineNumber=1573
...
[task 2020-04-26T23:01:19.623Z] 23:01:19 INFO - TEST-OK | remote/test/browser/browser_tabs.js | took 1778ms
[task 2020-04-26T23:01:19.628Z] 23:01:19 INFO - GECKO(9440) | [Child 10324: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0000016F38C89800 == 2 [pid = 10324] [id = {b1f9bdc2-cf8d-44c1-89c1-680e1376a203}]
...
[task 2020-04-26T23:01:23.235Z] 23:01:23 INFO - GECKO(9440) | [Parent 10136: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 11 (000001DA924B0C00) [pid = 10136] [serial = 8] [outer = 0000000000000000] [url = about:blank]
[task 2020-04-26T23:01:26.244Z] 23:01:26 INFO - GECKO(9440) | [Parent 10136: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 10 (000001DA8C983400) [pid = 10136] [serial = 26] [outer = 0000000000000000] [url = about:blank]
[task 2020-04-26T23:01:26.852Z] 23:01:26 INFO - GECKO(9440) | Completed ShutdownLeaks collections in process 10136
[task 2020-04-26T23:01:26.852Z] 23:01:26 INFO - TEST-START | Shutdown
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - Browser Chrome Test Summary
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - Passed: 23
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - Failed: 0
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - Todo: 0
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - Mode: e10s
[task 2020-04-26T23:01:26.853Z] 23:01:26 INFO - *** End BrowserChrome Test Results ***
[task 2020-04-26T23:01:27.216Z] 23:01:27 INFO - GECKO(9440) | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2020-04-26T23:01:27.216Z] 23:01:27 INFO - GECKO(9440) | ###!!! [Parent][RunMessage] Error: Channel closing: too late to send/recv, messages will be lost
[task 2020-04-26T23:01:27.218Z] 23:01:27 INFO - GECKO(9440) | [Child 8276: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 00000299D21C7C00 == 3 [pid = 8276] [id = {b36c8e71-3561-4054-9fe0-f40c677cd523}] [url = moz-extension://f8955003-5cb0-485c-99b7-bb055b16b2e6/_generated_background_page.html]
[task 2020-04-26T23:01:27.218Z] 23:01:27 INFO - GECKO(9440) | [Child 8276: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 00000299D21C5400 == 2 [pid = 8276] [id = {dc0cad3c-bf21-42e1-966d-1defdf98661e}] [url = moz-extension://3355b384-45fd-4a60-9c26-54ef6bd137bf/_generated_background_page.html]
...
[task 2020-04-26T23:01:28.181Z] 23:01:28 INFO - TEST-INFO | remote/test/browser/browser_tabs.js | This test created 1 hidden docshell(s)
[task 2020-04-26T23:01:28.182Z] 23:01:28 INFO - Buffered messages finished
[task 2020-04-26T23:01:28.182Z] 23:01:28 ERROR - TEST-UNEXPECTED-FAIL | Last test finished | application terminated with exit code 1
[task 2020-04-26T23:01:28.182Z] 23:01:28 INFO - runtests.py | Application ran for: 0:00:23.977000
[task 2020-04-26T23:01:28.183Z] 23:01:28 INFO - zombiecheck | Reading PID log: c:\users\task_1587940190\appdata\local\temp\tmpcntt02pidlog
[task 2020-04-26T23:01:28.183Z] 23:01:28 INFO - ==> process 10136 launched child process 2368 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.0.27684078\442569468" -parentBuildID 20200426222658 -prefsHandle 2180 -prefMapHandle 2172 -prefsLen 1 -prefMapSize 232229 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 2220 gpu)
[task 2020-04-26T23:01:28.183Z] 23:01:28 INFO - ==> process 10136 launched child process 10324 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.6.232502796\1715873649" -childID 1 -isForBrowser -prefsHandle 2856 -prefMapHandle 2852 -prefsLen 1569 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 2132 tab)
[task 2020-04-26T23:01:28.184Z] 23:01:28 INFO - ==> process 10136 launched child process 9684 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.13.25384772\2076124598" -childID 2 -isForBrowser -prefsHandle 5620 -prefMapHandle 5616 -prefsLen 2140 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 5632 tab)
[task 2020-04-26T23:01:28.184Z] 23:01:28 INFO - ==> process 10136 launched child process 8276 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.20.1240088086\548982961" -childID 3 -isForBrowser -prefsHandle 5864 -prefMapHandle 5860 -prefsLen 2180 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 5844 tab)
[task 2020-04-26T23:01:28.185Z] 23:01:28 INFO - ==> process 10136 launched child process 6760 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.27.1937048260\900289326" -childID 4 -isForBrowser -prefsHandle 5208 -prefMapHandle 5204 -prefsLen 11698 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 5192 tab)
[task 2020-04-26T23:01:28.185Z] 23:01:28 INFO - ==> process 10136 launched child process 6268 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.34.1398474895\2121772759" -childID 5 -isForBrowser -prefsHandle 3476 -prefMapHandle 4136 -prefsLen 12009 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 3448 tab)
[task 2020-04-26T23:01:28.186Z] 23:01:28 INFO - ==> process 10136 launched child process 1112 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.41.535606527\244812961" -childID 6 -isForBrowser -prefsHandle 4788 -prefMapHandle 4448 -prefsLen 12103 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 4032 tab)
[task 2020-04-26T23:01:28.186Z] 23:01:28 INFO - ==> process 10136 launched child process 4648 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.48.775649073\167013172" -childID 7 -isForBrowser -prefsHandle 4108 -prefMapHandle 3696 -prefsLen 12009 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 5428 tab)
[task 2020-04-26T23:01:28.187Z] 23:01:28 INFO - ==> process 10136 launched child process 10388 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.55.1181674787\545421903" -childID 8 -isForBrowser -prefsHandle 4928 -prefMapHandle 3776 -prefsLen 12103 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 4080 tab)
[task 2020-04-26T23:01:28.187Z] 23:01:28 INFO - ==> process 10136 launched child process 10464 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.62.911874592\367441131" -childID 9 -isForBrowser -prefsHandle 5568 -prefMapHandle 5088 -prefsLen 12009 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 3968 tab)
[task 2020-04-26T23:01:28.188Z] 23:01:28 INFO - ==> process 10136 launched child process 6216 ("Z:\task_1587940190\build\application\firefox\firefox.exe" -contentproc --channel="10136.69.922905445\692625954" -childID 10 -isForBrowser -prefsHandle 4464 -prefMapHandle 4076 -prefsLen 12103 -prefMapSize 232229 -parentBuildID 20200426222658 -appdir "Z:\task_1587940190\build\application\firefox\browser" - 10136 "\\.\pipe\gecko-crash-server-pipe.10136" 4596 tab)
[task 2020-04-26T23:01:28.188Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 2368
[task 2020-04-26T23:01:28.188Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 10464
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 10388
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 6760
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 8276
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 4648
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 9684
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 1112
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 10324
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 6268
[task 2020-04-26T23:01:28.189Z] 23:01:28 INFO - zombiecheck | Checking for orphan process with PID: 6216
[task 2020-04-26T23:01:28.190Z] 23:01:28 INFO - mozcrash Copy/paste: Z:/task_1587940190/fetches\minidump_stackwalk\minidump_stackwalk.exe c:\users\task_1587940190\appdata\local\temp\tmpxzmyv4.mozrunner\minidumps\385d58ec-a056-43c5-9188-4afaac2c7e6f.dmp Z:\task_1587940190\build\symbols
[task 2020-04-26T23:01:36.896Z] 23:01:36 INFO - mozcrash Saved minidump as Z:\task_1587940190\build\blobber_upload_dir\385d58ec-a056-43c5-9188-4afaac2c7e6f.dmp
[task 2020-04-26T23:01:36.898Z] 23:01:36 INFO - mozcrash Saved app info as Z:\task_1587940190\build\blobber_upload_dir\385d58ec-a056-43c5-9188-4afaac2c7e6f.extra
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - PROCESS-CRASH | Last test finished | application crashed [@ static nsTHashtable<nsBaseHashtableET<nsUint32HashKey,mozilla::UniquePtr<nsCOMPtr<nsIWeakReference>,mozilla::DefaultDelete<nsCOMPtr<nsIWeakReference> > > > >::s_ClearEntry(PLDHashTable*, PLDHashEntryHdr*)]
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Crash dump filename: c:\users\task_1587940190\appdata\local\temp\tmpxzmyv4.mozrunner\minidumps\385d58ec-a056-43c5-9188-4afaac2c7e6f.dmp
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Operating system: Windows NT
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - 10.0.17134
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - CPU: amd64
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - family 6 model 85 stepping 4
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - 8 CPUs
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO -
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - GPU: UNKNOWN
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO -
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Crash reason: EXCEPTION_ACCESS_VIOLATION_READ
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Crash address: 0xffffffff
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Process uptime: 24 seconds
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO -
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - Thread 0 (crashed)
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - 0 xul.dll!static nsTHashtable<nsBaseHashtableET<nsUint32HashKey,mozilla::UniquePtr<nsCOMPtr<nsIWeakReference>,mozilla::DefaultDelete<nsCOMPtr<nsIWeakReference> > > > >::s_ClearEntry(PLDHashTable*, PLDHashEntryHdr*) [nsTHashtable.h:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 512 + 0x29]
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - rax = 0x00007ffdb11d07c8 rdx = 0x10000004aaaaaaaa
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - rcx = 0x10000004aaaaaaaa rbx = 0x0000000000000010
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - rsi = 0x000000d9c4dfb198 rdi = 0x000001da9217bc80
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - rbp = 0x000000d9c4dff310 rsp = 0x000000d9c4dfee60
[task 2020-04-26T23:01:36.918Z] 23:01:36 INFO - r8 = 0x0000000000000010 r9 = 0xff64626875716452
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r10 = 0xfefefefefefefeff r11 = 0x8080808080808080
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r12 = 0x000001da9217bc40 r13 = 0x000001da954d8000
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r14 = 0x000001da95252ba0 r15 = 0x0000000000000010
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rip = 0x00007ffda90bb13e
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - Found by: given as instruction pointer in context
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - 1 xul.dll!PLDHashTable::~PLDHashTable() [PLDHashTable.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 290 + 0x46]
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rsp = 0x000000d9c4dfee90 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda88ed33f
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - 2 xul.dll!mozilla::net::WebSocketEventService::Release() [WebSocketEventService.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 207 + 0x58]
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rsp = 0x000000d9c4dfeef0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda90b5e17
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - 3 xul.dll!detail::ProxyRelease<nsISupports>(char const*, nsIEventTarget*, already_AddRefed<nsISupports>, bool) [nsProxyRelease.h:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 0 + 0x3]
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - rsp = 0x000000d9c4dfef30 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.919Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda89aa925
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - 4 xul.dll!static detail::ProxyReleaseChooser<1>::ProxyReleaseISupports(char const*, nsIEventTarget*, nsISupports*, bool) [nsProxyRelease.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 15 + 0x5]
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rsp = 0x000000d9c4dfefa0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda89aa792
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - 5 xul.dll!NS_ReleaseOnMainThread<mozilla::net::WebSocketEventService>(char const*, already_AddRefed<mozilla::net::WebSocketEventService>, bool) [nsProxyRelease.h:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 166 + 0x15]
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rsp = 0x000000d9c4dfefe0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda909e39e
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - 6 xul.dll!mozilla::net::WebSocketChannel::~WebSocketChannel() [WebSocketChannel.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 1169 + 0x14]
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - rsp = 0x000000d9c4dff030 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.920Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda909dc8d
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - 7 xul.dll!mozilla::net::WebSocketChannel::~WebSocketChannel() [WebSocketChannel.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 1144 + 0x5]
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rsp = 0x000000d9c4dff0b0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda90b7870
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - 8 xul.dll!mozilla::net::WebSocketChannel::Release() [WebSocketChannel.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 76 + 0x11]
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rsp = 0x000000d9c4dff0f0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda909d09d
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - 9 xul.dll!mozilla::xpcom::StaticModule::SetServiceInstance(already_AddRefed<nsISupports>) const [StaticComponents.cpp: : 11671 + 0x24]
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rsp = 0x000000d9c4dff130 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda8968191
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - 10 xul.dll!nsComponentManagerImpl::FreeServices() [nsComponentManager.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 1257 + 0x8]
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.921Z] 23:01:36 INFO - rsp = 0x000000d9c4dff160 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda8983e85
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - 11 xul.dll!mozilla::ShutdownXPCOM(nsIServiceManager*) [XPCOMInit.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 685 + 0x5]
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rsp = 0x000000d9c4dff1f0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffda89f5ccd
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - 12 xul.dll!ScopedXPCOMStartup::~ScopedXPCOMStartup() [nsAppRunner.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 1277 + 0x8]
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rsp = 0x000000d9c4dff260 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffdae8d95d2
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - 13 xul.dll!XREMain::XRE_main(int, char**, mozilla::BootstrapConfig const&) [nsAppRunner.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 4760 + 0x19]
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - rsp = 0x000000d9c4dff2c0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffdae8e6454
[task 2020-04-26T23:01:36.922Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - 14 xul.dll!XRE_main(int, char**, mozilla::BootstrapConfig const&) [nsAppRunner.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 4797 + 0x10]
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - rsp = 0x000000d9c4dff3f0 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffdae8e6d9a
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - 15 firefox.exe!NS_internal_main(int, char**, char**) [nsBrowserApp.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 331 + 0x139]
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - rsp = 0x000000d9c4dff560 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ff722fa158f
[task 2020-04-26T23:01:36.923Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - 16 firefox.exe!wmain(int, wchar_t**) [nsWindowsWMain.cpp:537608d1e4cc2fe44b386e4420fd0a776a489fe4 : 131 + 0x15]
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rsp = 0x000000d9c4dff750 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ff722fa120e
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - 17 firefox.exe!__scrt_common_main_seh() [exe_common.inl : 288 + 0x22]
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rsp = 0x000000d9c4dff810 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ff723032588
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - 18 kernel32.dll!BaseThreadInitThunk + 0x14
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - rsp = 0x000000d9c4dff850 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffdef573034
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.924Z] 23:01:36 INFO - 19 ntdll.dll!SdbpCheckMatchingFiles + 0x81
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO - rbx = 0x0000000000000010 rbp = 0x000000d9c4dff310
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO - rsp = 0x000000d9c4dff880 r12 = 0x000001da9217bc40
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO - r13 = 0x000001da954d8000 r14 = 0x000001da95252ba0
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO - r15 = 0x0000000000000010 rip = 0x00007ffdf10e1461
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO - Found by: call frame info
[task 2020-04-26T23:01:36.925Z] 23:01:36 INFO -
Other failures logs which seem to have started with these changes:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492850&repo=autoland&lineNumber=2921
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492626&repo=autoland&lineNumber=8006
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492315&repo=autoland&lineNumber=39646
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492880&repo=autoland&lineNumber=2814
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299493150&repo=autoland&lineNumber=2567
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492556&repo=autoland&lineNumber=106705
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492355&repo=autoland&lineNumber=45852
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299493195&repo=autoland&lineNumber=8911
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299493440&repo=autoland&lineNumber=105833
Reporter | ||
Comment 19•5 years ago
|
||
Michal, can you please help Sonakshi to fix the push failures?
Honza
Assignee | ||
Comment 20•5 years ago
|
||
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492850&repo=autoland&lineNumber=2921 https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=299492850&repo=autoland&lineNumber=2921
ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 …
The signal is caused by a READ memory access.
Hint: address points to the zero page.
.
.
.
~nsCOMPtr_base /builds/worker/workspace/obj-build/dist/include/nsCOMPtr.h:329:7
operator() /builds/worker/workspace/obj-build/dist/include/mozilla/UniquePtr.h:460:5
reset /builds/worker/workspace/obj-build/dist/include/mozilla/UniquePtr.h:302:7
~UniquePtr /builds/worker/workspace/obj-build/dist/include/mozilla/UniquePtr.h:253:18
~nsBaseHashtableET /builds/worker/workspace/obj-build/dist/include/nsBaseHashtable.h:72:32
nsTHashtable<nsBaseHashtableET<nsUint32HashKey, mozilla::UniquePtr<nsCOMPtr<nsIWeakReference>, mozilla::DefaultDelete<nsCOMPtr<nsIWeakReference> > > > >::s_ClearEntry(PLDHashTable*, PLDHashEntryHdr*) /builds/worker/workspace/obj-build/dist/include/nsTHashtable.h:512:37
operator() /builds/worker/checkouts/gecko/xpcom/ds/PLDHashTable.cpp:292:7
ForEachSlot<(lambda at /builds/worker/checkouts/gecko/xpcom/ds/PLDHashTable.cpp:290:51)> /builds/worker/workspace/obj-build/dist/include/PLDHashTable.h:357:9
ForEachSlot<(lambda at /builds/worker/checkouts/gecko/xpcom/ds/PLDHashTable.cpp:290:51)> /builds/worker/workspace/obj-build/dist/include/PLDHashTable.h:347:7
PLDHashTable::~PLDHashTable() /builds/worker/checkouts/gecko/xpcom/ds/PLDHashTable.cpp:290:15
~nsTHashtable /builds/worker/workspace/obj-build/dist/include/nsTHashtable.h:170:27
~WebSocketEventService /builds/worker/checkouts/gecko/netwerk/protocol/websocket/WebSocketEventService.cpp:221:1
mozilla::net::WebSocketEventService::Release() /builds/worker/checkouts/gecko/netwerk/protocol/websocket/WebSocketEventService.cpp:207:1
We have similar stack traces in other jobs too. So it seems that when we are calling the destructor of WebSocketEventService, in the process of cleaning things up ,it also calls the destructor of the nsTHashtable and we encounter SEGV error when removing entry from the hash table.
One more thing I noticed is that we generally clear the hashtable in Shutdown() method of classes. And I haven’t done that in WebSocketEventService::Shutdown(). Will doing that resolve the issue?
Comment 21•5 years ago
|
||
(In reply to Sonakshi Saxena from comment #20)
One more thing I noticed is that we generally clear the hashtable in Shutdown() method of classes. And I haven’t done that in WebSocketEventService::Shutdown(). Will doing that resolve the issue?
I think the reference counts are messed up due to nsClassHashtable. I've overlooked this during the review. I think you should use nsDataHashtable. See e.g. mIDToHttpChannelMap for an example https://searchfox.org/mozilla-central/search?q=symbol:F_%3CT_mozilla%3A%3Anet%3A%3AnsHttpHandler%3E_mIDToHttpChannelMap&redirect=false
Assignee | ||
Comment 22•5 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #21)
I think the reference counts are messed up due to nsClassHashtable. I've overlooked this during the review. I think you should use nsDataHashtable. See e.g. mIDToHttpChannelMap for an example https://searchfox.org/mozilla-central/search?q=symbol:F_%3CT_mozilla%3A%3Anet%3A%3AnsHttpHandler%3E_mIDToHttpChannelMap&redirect=false
Thanks for the info [:michal]
I have updated the patch. Please review and try to push it again, thanks!
Comment 23•5 years ago
|
||
Try is not green, see e.g. this failure https://treeherder.mozilla.org/#/jobs?repo=try&revision=39607f2dc5d6c1a81be6136103e3425b2155026d&selectedTaskRun=RYjGrqpzShSJTX6cJwmdJA-0
It fails because WebSocketImpl is destructed off the main thread and nsSupportsWeakReference isn't thread safe. You need to make sure that WebSocketImpl is always destructed on the main thread.
Reporter | ||
Comment 24•5 years ago
|
||
Sonakshi, the patch is so close to landing. Can you please look at the last comments from Michal?
https://phabricator.services.mozilla.com/D68068#2238902
This will allow us to implement great feature!
Honza
Assignee | ||
Comment 25•5 years ago
|
||
Hi Honza,
I'll make the changes as suggested in https://phabricator.services.mozilla.com/D68068#2238902 but I am not sure how to do this -
(In reply to Michal Novotny [:michal] from comment #23)
It fails because WebSocketImpl is destructed off the main thread and nsSupportsWeakReference isn't thread safe. You need to make sure that WebSocketImpl is always destructed on the main thread.
Reporter | ||
Comment 26•4 years ago
|
||
Michal, can you please help Sonakshi?
(see the question in previous comment)
Honza
Comment 27•4 years ago
|
||
(In reply to Sonakshi Saxena from comment #25)
It fails because WebSocketImpl is destructed off the main thread and nsSupportsWeakReference isn't thread safe. You need to make sure that WebSocketImpl is always destructed on the main thread.
We would either need to use NS_ReleaseOnMainThread() at every place where we release the reference to WebSocketImpl, or we could re-dispatch WebSocketImpl::Release() always to main thread. But WebSocketImpl expects [1] that Release() is called off the main thread when it was created off the main thread [2]. I don't know the reason. Maybe we should get rid of nsSupportsWeakReference and use SupportsThreadSafeWeakPtr instead. Baku, what do you think?
[1] https://searchfox.org/mozilla-central/rev/8827278483c337667cdfb238112eb1be397dd102/dom/websocket/WebSocket.cpp#2092
[2] https://searchfox.org/mozilla-central/rev/8827278483c337667cdfb238112eb1be397dd102/dom/websocket/WebSocket.cpp#114
Comment 28•4 years ago
|
||
WebSocketImpl is thread-safe because it is used for WebSockets created on the main-thread and on workers. When this class is used for main-thread WebSocket, mIsMainThread
is set to true.
The nsSupportsWeakReference interface is supposed to be used only for the main-thread ones to observe the window states: https://searchfox.org/mozilla-central/rev/5e4d4827aa005d031580d2d17a01bae1af138b2e/dom/websocket/WebSocket.cpp#1466-1477
Somehow, with this patch, the nsSupportsWeakReference is used on the worker WebSockets too. I would start checking why this happens.
If this is not strongly required, we can probably make nsISupportsWeakReference a conditional interface.
Comment 29•4 years ago
|
||
(In reply to Sonakshi Saxena from comment #25)
Hi Honza,
I'll make the changes as suggested in https://phabricator.services.mozilla.com/D68068#2238902 but I am not sure how to do this -(In reply to Michal Novotny [:michal] from comment #23)
It fails because WebSocketImpl is destructed off the main thread and nsSupportsWeakReference isn't thread safe. You need to make sure that WebSocketImpl is always destructed on the main thread.
So, all that needs to be done is to call AssociateWebSocketImplWithSerialID() only when mIsMainThread is true. Also please add MOZ_ASSERT(NS_IsMainThread()) to WebSocketEventService::SendMessage().
Comment 30•4 years ago
|
||
Updated•4 years ago
|
Comment 31•4 years ago
|
||
Reporter | ||
Comment 32•4 years ago
|
||
(In reply to Michal Novotny [:michal] from comment #31)
try looks good now: https://treeherder.mozilla.org/#/jobs?repo=try&revision=9dc06f38dcaad9d90c8b014866ac72b4ede97bc6
Excellent, thanks to all working on this!
Try is green and the patch seems to be ready to land.
Should we land it?
Honza
Comment 33•4 years ago
|
||
(In reply to Jan Honza Odvarko [:Honza] (always need-info? me) from comment #32)
Try is green and the patch seems to be ready to land.
Should we land it?
It still needs review from necko peer. I did reviews of the previous versions, but because I made the final version somebody else should do the review.
Comment 34•4 years ago
|
||
Comment 35•4 years ago
|
||
bugherder |
Description
•