[tor-bugs] #21312 [Obfuscation/Snowflake]: snowflake-client is pegged at 100% cpu

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Aug 17 04:17:06 UTC 2017


#21312: snowflake-client is pegged at 100% cpu
-----------------------------------+------------------------
 Reporter:  arlolra                |          Owner:  (none)
     Type:  defect                 |         Status:  new
 Priority:  Medium                 |      Milestone:
Component:  Obfuscation/Snowflake  |        Version:
 Severity:  Normal                 |     Resolution:
 Keywords:                         |  Actual Points:
Parent ID:                         |         Points:
 Reviewer:                         |        Sponsor:
-----------------------------------+------------------------

Comment (by yawning):

 Replying to [comment:15 arlolra]:
 > For what it's worth (and probably not much),
 `rtc::scoped_refptr<PeerConnectionFactoryInterface> pc_factory;` should be
 automatically deallocated when the `Peer` goes out of scope, so isn't
 exactly leaking.  The culprit is `vector<rtc::scoped_refptr<Peer>>
 localPeers;` which never releases the `Peer`s.  See,
 https://github.com/keroserene/go-webrtc/issues/35#issuecomment-233465318

 I guess?

 The Peer dtor needs to call delete on the created Threads, because the
 PeerConnectionFactory's dtor will not if you explicitly provide one.  It's
 not immediately obvious to me what handles tearing down the SocketServer
 either, but there's a limit to how much I want to look at the bindings or
 the webrtc code.

 I can't tell where worker_thread_ in the PeerConnectionFactory is supposed
 to be terminated either, though the PeerConnectionFactory dtor appears to
 shut down the signalling thread.  At least if the worker_thread_ magically
 gets terminated somehow (which it may) the code will only be leaking
 memory and maybe some file descriptors.

 But at this point I'm done wasting my time even thinking about this.  Good
 luck.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21312#comment:16>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list