[tor-bugs] #33211 [Circumvention/Snowflake]: proxy-go sometimes gets into a 100+% CPU state

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Feb 25 22:28:41 UTC 2020


#33211: proxy-go sometimes gets into a 100+% CPU state
-------------------------------------+-----------------------------
 Reporter:  dcf                      |          Owner:  cohosh
     Type:  defect                   |         Status:  merge_ready
 Priority:  Medium                   |      Milestone:
Component:  Circumvention/Snowflake  |        Version:
 Severity:  Normal                   |     Resolution:
 Keywords:                           |  Actual Points:
Parent ID:                           |         Points:
 Reviewer:                           |        Sponsor:
-------------------------------------+-----------------------------

Comment (by cohosh):

 I haven't been able to reproduce this yet, but I'm going to try running it
 outside of a Docker container to see if that helps. I'm using
 attachment:0001-Add-logging-for-pion-library-calls.patch to log debug
 messages from the pion library.

 One thing I did notice, just from staring at the code, is that there's a
 race condition to access the `inflightQueue` chunkmap (which is
 essentially a map between the TSNs and payloads of unacknowledged
 packets). This map is written to when packets are
 [https://github.com/pion/sctp/blob/master/association.go#L1744 pushed] and
 [https://github.com/pion/sctp/blob/master/association.go#L1177 popped],
 and read from in many places. In particular, the function that's the
 source of the problem is when packets are marked for retransmission which
 [https://github.com/pion/sctp/blob/master/payload_queue.go#L163 iterates
 over the range of the map]. This should always occur in a
 [https://github.com/pion/sctp/blob/master/rtx_timer.go#L144 separate
 goroutine] from the rest of the map accesses.

 I added some print statements to try to confirm this, but like I said I
 haven't been able to reproduce the bug yet.

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


More information about the tor-bugs mailing list