[tor-bugs] #20406 [Core Tor/Tor]: compute_num_cpus() purports to clamp to 16, but doesn't.

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 19 13:22:52 UTC 2016


#20406: compute_num_cpus() purports to clamp to 16, but doesn't.
------------------------------+--------------------------------
     Reporter:  nickm         |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.2.9.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:
Actual Points:                |  Parent ID:
       Points:  0             |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------
 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.''

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


More information about the tor-bugs mailing list