[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #10169 [Tor]: Extend OOM handler to cover channels/connection buffers
#10169: Extend OOM handler to cover channels/connection buffers
------------------------+----------------------------------------
Reporter: nickm | Owner:
Type: defect | Status: needs_review
Priority: major | Milestone: Tor: 0.2.5.x-final
Component: Tor | Version:
Resolution: | Keywords: tor-relay oom 024-backport
Actual Points: | Parent ID:
Points: |
------------------------+----------------------------------------
Comment (by nickm):
Replying to [comment:13 andrea]:
> Code review for NickM's bug10169_023 branch:
>
>
https://gitweb.torproject.org/nickm/tor.git/shortlog/refs/heads/bug10169_023
>
91ec6f7269bd7a5b73629f38e9779e84a0fb84f2..79c234e0e3fa22d76029bd3b5e2c52072709cff3
>
> 91ec6f7269bd7a5b73629f38e9779e84a0fb84f2:
> - I don't like the name buf_get_oldest_chunk_timestamp() for a function
that
> returns an age rather than a timestamp.
Okay, let's change that in the 0.2.5 version.
> - Can anything horrible happen with all this if the clock gets reset?
We could kill the wrong circuits if the clock goes backwards and then
doesn't catch up with itself before we hit an OOM.
> - Perhaps it would be wise to use clock_gettime(CLOCK_MONOTONIC, ...)
where
> available if we aren't doing so already.
Can that be an 0.2.5 only thing? Doing a portable monotonic timer is a
bit tricksy. On Linux, you want clock_gettime(CLOCK_MONOTONIC_COARSE).
On OSX, you want mach_absolute_time(). On other Unix, you want
clock_gettime(CLOCK_MONOTONIC) if possible. On Windows, there's a
complicated mishmash of things using QueryPerformanceCounter(),
GetTickCount64(), and GetTickCount(). As a fallback, you can use
gettimeofday() and check the result to make sure it doesn't go backwards.
I guess we could do just the fallback check-and-latch in 0.2.3/0.2.4, and
aim for the more complex ones in 0.2.5 or later?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10169#comment:14>
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