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

Re: [tor-bugs] #23676 [Core Tor/Tor]: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a conn that's closed



#23676: kist on 0.3.2.1-alpha-dev beats its head against a wall trying to flush a
conn that's closed
-------------------------------------------------+-------------------------
 Reporter:  arma                                 |          Owner:  (none)
     Type:  defect                               |         Status:
                                                 |  needs_review
 Priority:  High                                 |      Milestone:  Tor:
                                                 |  0.3.2.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  regression, cpu, tor-sched, 0.3.2.2  |  Actual Points:
  -alpha-must                                    |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------

Comment (by arma):

 {{{
 diff --git a/src/or/scheduler_kist.c b/src/or/scheduler_kist.c
 index 7b53f08..7f5a720 100644
 --- a/src/or/scheduler_kist.c
 +++ b/src/or/scheduler_kist.c
 @@ -417,12 +417,12 @@ update_socket_written(socket_table_t *table,
 channel_t *c
 han, size_t bytes)
   * have to, and we now do this in more than once place in
 kist_scheduler_run.
   */
  static void
 -add_chan_to_readd_list(smartlist_t *to_readd, channel_t *chan)
 +add_chan_to_readd_list(smartlist_t **to_readd, channel_t *chan)
  {
 -    if (!to_readd) {
 -      to_readd = smartlist_new();
 +    if (!*to_readd) {
 +      *to_readd = smartlist_new();
      }
 -    smartlist_add(to_readd, chan);
 +    smartlist_add(*to_readd, chan);
  }

  /*
 @@ -611,7 +611,7 @@ kist_scheduler_run(void)
                   "likely the issue) and stop scheduling it this round.",
                   channel_state_to_string(chan->state));
          chan->scheduler_state = SCHED_CHAN_WAITING_TO_WRITE;
 -        add_chan_to_readd_list(to_readd, chan);
 +        add_chan_to_readd_list(&to_readd, chan);
          continue;
        }
      }
 @@ -660,7 +660,7 @@ kist_scheduler_run(void)
         * in the next scheduling round.
         */
        chan->scheduler_state = SCHED_CHAN_WAITING_TO_WRITE;
 -      add_chan_to_readd_list(to_readd, chan);
 +      add_chan_to_readd_list(&to_readd, chan);
        log_debug(LD_SCHED, "chan=%" PRIu64 " now waiting_to_write",
                  chan->global_identifier);
      } else {
 }}}

 is now the patch I am running on moria1. :)

 I encourage somebody -- maybe pastly? -- to !fixup that into pastly's
 ce363803 commit, so we can erase the history of this buglet.

 David, I wonder if this fix helps in your crazy debugging stuff too?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/23676#comment:16>
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