mozilla :: #media

18 Mar 2017
00:29jesupsheppy-offline: mt: ./services/crypto/component/IdentityCryptoService.cpp: nsresult rv = NS_NewNamedThread("KeyPair Sign", getter_AddRefs(thread), r);
00:29jesupmt: See above; sheppy had dozens of threads for KeyPair Sign
00:32jesupFeh, the bug is obvious. Passing an initial event to a thread does NOT mean it will exit after running the event (though there might be use for that type of transitory thread). Nor does it go away when the last nsCOMPtr reference to it goes away.
00:33jesupmt: wow, 2012: Bug 753238 - Identity (BrowserID) module. r=dolske,rrelyea
00:33firebothttps://bugzil.la/753238 FIXED, benadida@mozilla.com Create a shared Identity.jsm module
00:34jesupthread got named recently (December): Bug 1323100 - Assign names to all remaining threads that are created through NS_NewThread and create them using NS_NewNamedThread instead. r=froydnj
00:34firebothttps://bugzil.la/1323100 FIXED, mstange@themasta.com Register the remaining threads with the profiler / TaskTracer
00:35mstangejesup: is this https://bugzilla.mozilla.org/show_bug.cgi?id=1337342 ?
00:35firebotBug 1337342 NEW, nobody@mozilla.org Profiler Leaks thread handles until it is stopped
00:35mstangewait
00:35mstangenot that one
00:35mstangejesup: is this https://bugzilla.mozilla.org/show_bug.cgi?id=1347007 ?
00:35firebotBug 1347007 FIXED, mrbkap@mozilla.com Profiler registration creates too many nsThreads
00:35jesupmstange: sheppy sees dozens of leaked KeyPair Sign threads
00:36jesupunless the runnable itself destroys the thread, that's going to leak
00:37* jesup checks the runnable
00:37sheppy-offlineHmm.
00:37sheppy-offlineI'm casually o serving
00:37mstangehmm, doesn't look like the runnable destroyes the thread either
00:37mstangeso was this just a long-standing bug?
00:37sheppy-offlineObserving
00:37sheppy-offlineHeh. That was a bizarre chance discovery...
00:39jesupYup, it just calls (void) mCallback->GenerateKeyPairFinished(mRv, mKeyPair); when it sends the runnable back to mainthread. it needs to kill the thread... or it needs to keep 1 thread around as a service, and shut it down when idle (for long enough) - we have thread variants that do that
00:39jesupmstange: very long-standing
00:39mstangefun
00:41jesupI have a patch that will assert on leaked threads at shutdown (note that the ThreadManager will shut them all down, so they don't cause leaks that get caught currently).. I used it to fix a bunch of these... missed this one though (probably didn't trigger it)
00:41* jesup should bite the bullet on screams of those who rely on ThreadManager shutdown, and just land it
00:43mstangesounds like a plan
00:43jesupI'd even be ok with a flag "this is a singleton shut down by ThreadManager" and not complain about those (to avoid largely-useless duplication of shutdown code/observers)
00:44jesupI wonder who's responsible for that code.... mt?
00:45jesupOne bug I found was that another Crypto API was leaking a thread for every request also (I think that was the JS API)
00:45* jesup goes to file some bugs
01:02jesupmstange: sheppy-offline mt: patch up for review
01:03sheppy-offlineWoot
01:04jesup35 min from discovery to patch up for review
01:14sheppy-offlineNice!
01:51mstangejesup: nice
02:37froydnjjesup: o.O that code...
04:06jesupfroydnj: which, the original (landed in 2012), or my quickie patch to see if it plugs the leak? :-)
11:26bencwhat does A/V sync for multistream means?
11:26benchttps://bugzilla.mozilla.org/show_bug.cgi?id=1176560
11:26firebotBug 1176560 NEW, nobody@mozilla.org Support A/V sync (lip-sync) for multistream
11:26bencthat two separate streams will be in sync?
11:27bencor that there is no lip-sync in a single stream when I have several streams?
12:31jesupMultiple video streams synced to a single audio stream. Syncing multiple audio streams in a webrtc call is more challenging... you need to run multiple jitter buffers in a synchronously-linked fashion (effectively keep the depth at the highest of any of them) after establishing initial sync. Not impossible though
12:31jesupbenc: ^
12:46jesupfroydnj: Looks like with this KeySign bug fixed, and one other bug (DOM Worker pool doesn't shut down), we could land my patch to go orange on thread leaks in automation. :-D
12:47jesupfroydnj: and I filed the DOM Worker bug 3 years ago....... bug 988872
12:48jesupfirebot is slow today
12:48firebotjesup: Sorry, I've no idea what 'is slow today' might be.
12:48jesupfirebot: bug 988872
12:48firebothttps://bugzil.la/988872 NEW, nobody@mozilla.org DOMWorker threads are frequently not ended by the end of xpcom-shutdown-threads
19:27mjfbwc: ping
19 Mar 2017
No messages
   
Last message: 69 days and 18 hours ago