Opened 3 years ago

Last modified 3 months ago

#18641 assigned enhancement

Teach the OOM handler about uploaded descriptors on a dirauth.

Reported by: nickm Owned by:
Priority: High Milestone: Tor: unspecified
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-dos, tor-dirauth, oom
Cc: Actual Points:
Parent ID: Points: 3
Reviewer: Sponsor:

Description

The OOM handler should know to do something with the descriptors that a dirauth has received via upload.

Child Tickets

Change History (17)

comment:1 Changed 3 years ago by nickm

Owner: set to nickm
Status: newaccepted

comment:2 Changed 3 years ago by mikeperry

Keywords: tor-dos added; dos removed

Canonicalize dos tag to tor-dos

comment:3 Changed 3 years ago by isabela

Points: medium3

comment:4 Changed 3 years ago by nickm

Parent ID: #17293

comment:5 Changed 3 years ago by andrea

Owner: changed from nickm to andrea
Status: acceptedassigned

Taking ownership for 0.2.9 triage

comment:6 Changed 3 years ago by nickm

Keywords: nickm-deferred-20160905 added
Milestone: Tor: 0.2.9.x-finalTor: 0.3.0.x-final

Deferring some andrea-assigned items from 0.2.9. Andrea, please move any of these back if you disagree; this is just a first approximation.

comment:7 Changed 3 years ago by nickm

Parent ID: #17293

Unparenting these from #17293; holding for future work.

comment:8 Changed 3 years ago by nickm

Owner: changed from andrea to nickm

comment:9 Changed 3 years ago by nickm

Ug. This is not going to be simple. We don't really want to re-compute the total amount of space allocated in-memory for descriptors every time we check our memory usage... and so we'll want to have it be something that we track as we go along. I *think* that the only places where we allocate more RAM here are in routerparse.c:

router->cache_info.signed_descriptor_body = tor_malloc(len+1);
...
extrainfo->cache_info.signed_descriptor_body = tor_memdup_nulterm(s,end-s);
...
cert->cache_info.signed_descriptor_body = tor_malloc(len+1);

And we free them several places in routerlist.c:

src/or/routerlist.c:        tor_free(sd->signed_descriptor_body); // sets it to null
src/or/routerlist.c:  tor_free(router->cache_info.signed_descriptor_body);
src/or/routerlist.c:  tor_free(extrainfo->cache_info.signed_descriptor_body);
src/or/routerlist.c:  tor_free(sd->signed_descriptor_body);
src/or/routerlist.c:  tor_free(sd->signed_descriptor_body);
src/or/routerlist.c:  tor_free(cert->cache_info.signed_descriptor_body);

but if we miss even one, the value gets out of sync, and we flip out.

I guess maybe we could re-sync once every few minutes?

comment:10 Changed 3 years ago by nickm

Keywords: triaged-out-20160116 added
Milestone: Tor: 0.3.0.x-finalTor: unspecified

comment:11 Changed 3 years ago by nickm

Keywords: triaged-out-20170116 added; triaged-out-20160116 removed

comment:12 Changed 2 years ago by nickm

Keywords: nickm-deferred-20160905 removed

comment:13 Changed 2 years ago by nickm

Keywords: tor-dirauth oom added; triaged-out-20170116 removed

comment:14 Changed 2 years ago by nickm

Sponsor: SponsorU-canSponsorV-can

comment:15 Changed 4 months ago by gaba

Removing sponsor V as we do not have more time to include this tickets in the sponsor.

comment:16 Changed 4 months ago by gaba

Sponsor: SponsorV-can

Removing sponsor from tickets that we do not have time to fit in the remain of this sponsorship.

comment:17 Changed 3 months ago by nickm

Owner: nickm deleted

I am not actually working on these tickets, so they shouldn't be assigned to me.

Note: See TracTickets for help on using tickets.