[tor-bugs] #25688 [Obfuscation/Snowflake]: proxy-go is still deadlocking occasionally

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Mar 30 15:07:56 UTC 2019


#25688: proxy-go is still deadlocking occasionally
--------------------------------------------+--------------------------
 Reporter:  dcf                             |          Owner:  cohosh
     Type:  defect                          |         Status:  assigned
 Priority:  Low                             |      Milestone:
Component:  Obfuscation/Snowflake           |        Version:
 Severity:  Normal                          |     Resolution:
 Keywords:  network-team-roadmap-2019-Q1Q2  |  Actual Points:
Parent ID:                                  |         Points:  3
 Reviewer:                                  |        Sponsor:
--------------------------------------------+--------------------------

Comment (by cohosh):

 I used delve ([https://github.com/go-
 delve/delve/blob/master/Documentation/usage/dlv.md gdb for Go]) on a
 deadlocked process and this is what I found:

 There is one proxy-go go routine running (the rest are helper routines for
 things like channels):
 {{{
 (dlv) goroutines
 * Goroutine 1 - User: /go/src/snowflake.git/proxy-go/snowflake.go:118
 main.main (0x6632ae)
   Goroutine 2 - User: /usr/local/go/src/runtime/proc.go:303 runtime.gopark
 (0x444d2b)
   Goroutine 3 - User: /usr/local/go/src/runtime/proc.go:303 runtime.gopark
 (0x444d2b)
   Goroutine 4 - User: /usr/local/go/src/runtime/proc.go:303 runtime.gopark
 (0x444d2b)
   Goroutine 6 - User: /usr/local/go/src/runtime/proc.go:303 runtime.gopark
 (0x444d2b)
   Goroutine 18 - User: /usr/local/go/src/runtime/proc.go:303
 runtime.gopark (0x444d2b)
   Goroutine 20 - User: /usr/local/go/src/runtime/proc.go:303
 runtime.gopark (0x444d2b)
   Goroutine 25 - User: /usr/local/go/src/runtime/proc.go:303
 runtime.gopark (0x444d2b)
 [8 goroutines]
 }}}

 This routine is waiting for more tokens to become available, and our
 tokens channel is empty despite the absence of other running go routines:
 {{{
 (dlv) frame 4
 > runtime.gopark() /usr/local/go/src/runtime/proc.go:303 (PC: 0x444d2b)
 Warning: debugging optimized function
 Frame 4: /go/src/snowflake.git/proxy-go/snowflake.go:118 (PC: 6632ae)
 (dlv) p tokens
 chan bool {
         qcount: 0,
         dataqsiz: 10,
         buf: *[10]bool
 [false,false,false,false,false,false,false,false,false,false],
         elemsize: 1,
         closed: 0,
         elemtype: *runtime._type {
                 size: 1,
                 ptrdata: 0,
                 hash: 335480517,
                 tflag: tflagUncommon|tflagExtraStar|tflagNamed (7),
                 align: 1,
                 fieldalign: 1,
                 kind: 129,
                 alg: *(*runtime.typeAlg)(0x14982a0),
                 gcdata: *1,
                 str: 8072,
                 ptrToThis: 122880,},
         sendx: 0,
         recvx: 0,
         recvq: waitq<bool> {
                 first: *(*sudog<bool>)(0xc000060ea0),
                 last: *(*sudog<bool>)(0xc000060ea0),},
         sendq: waitq<bool> {
                 first: *sudog<bool> nil,
                 last: *sudog<bool> nil,},
         lock: runtime.mutex {key: 0},}
 }}}

 So it seems that somehow WebRTC connections are exiting without calling
 retToken() to repopulate the channel.

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


More information about the tor-bugs mailing list