[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21312 [Obfuscation/Snowflake]: Memory and file descriptor leaks in programs that use go-webrtc



#21312: Memory and file descriptor leaks in programs that use go-webrtc
-----------------------------------+-------------------------
 Reporter:  arlolra                |          Owner:  arlolra
     Type:  defect                 |         Status:  closed
 Priority:  High                   |      Milestone:
Component:  Obfuscation/Snowflake  |        Version:
 Severity:  Major                  |     Resolution:  fixed
 Keywords:                         |  Actual Points:
Parent ID:                         |         Points:
 Reviewer:                         |        Sponsor:
-----------------------------------+-------------------------

Comment (by yawning):

 Replying to [comment:64 dcf]:
 > Replying to [comment:63 dcf]:
 > > So instead, I'm just using ulimit like this:
 > > {{{
 > > ulimit -v 409600
 > > exec chpst -u snowflake-proxy proxy-go
 > > }}}
 > > I originally gave each process 200 MB. But they were restarting (on
 average once during the 15 minutes I was watching). So I then bumped it up
 to 400 MB. Here are the timestamps:
 >
 > An update on this. `ulimit -v` (limit virtual memory) didn't work: it
 would still cause a hang after a while even with 800 MB. (5/6 processes
 had hung within about 10 hours.) I changed it to `ulimit -m` (limit
 resident memory) with 200 MB and now it seems fine.
 >
 > `top` showed that with `ulimit -v`, the processes had all hung, rather
 than crashed, when their virtual memory (`VIRT` column) was close to its
 limit.
 > {{{
 >   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
 COMMAND
 > 12864 snowfla+  20   0 1241148  56840  12464 S  11.0  2.8  14:24.84
 proxy-go  # no limit
 > 12847 snowfla+  20   0  810328  24952  13408 S   0.7  1.2   1:14.24
 proxy-go  # limit 819200
 > 12848 snowfla+  20   0  406892  21516  13376 S   0.0  1.0   0:11.57
 proxy-go  # limit 409600
 > 12849 snowfla+  20   0  398868  21208  13244 S   0.0  1.0   0:09.94
 proxy-go  # limit 409600
 > 13340 snowfla+  20   0  398864  21036  13228 S   0.0  1.0   0:24.22
 proxy-go  # limit 409600
 > 13978 snowfla+  20   0  408144  20784  13088 S   0.0  1.0   0:42.28
 proxy-go  # limit 409600
 > }}}

 Bad things may (probably will) happen regardless.  See
 https://github.com/golang/go/issues/5049 (Superseded by
 https://github.com/golang/go/issues/16843).

 The `runtime` and `runtime/debug` packages have methods for interacting
 with the garbage collector/memory allocator that may work better.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21312#comment:65>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs