Opened 3 years ago

Closed 3 years ago

#20406 closed defect (duplicate)

compute_num_cpus() purports to clamp to 16, but doesn't.

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points: 0
Reviewer: Sponsor:

Description

Our compute_num_cpus() code is not supposed to report more than MAX_DETECTABLE_CPUS, since if you are somehow running Tor on a 64-core system, you should have to ask Tor before it decides to use all 64.

But it doesn't: the code logs a notice, and then does nothing.

This causes the following test failure on systems with more than 16 cores:

util/num_cpus: 
  FAIL ../src/test/test_util.c:3827: assert(num OP_LE 16): 18 vs 16

029 rationale: this is apparently making our tests fail in the debian reproducible build QA system.

Child Tickets

Change History (3)

comment:1 Changed 3 years ago by nickm

Owner: set to nickm
Status: newaccepted

comment:2 Changed 3 years ago by cypherpunks

This is a duplicate of #19968.

comment:3 Changed 3 years ago by nickm

Resolution: duplicate
Status: acceptedclosed

Good catch; closing as duplicate.

Note: See TracTickets for help on using tickets.