Opened 8 months ago

Closed 8 months ago

Last modified 7 months ago

#25128 closed defect (fixed)

Bug: src/or/dos.c:312: cc_stats_refill_bucket: Non-fatal assertion new_circuit_bucket_count >= stats->circuit_bucket failed

Reported by: dgoulet Owned by: dgoulet
Priority: Very High Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-sched, tor-dos
Cc: Actual Points:
Parent ID: #24902 Points:
Reviewer: Sponsor:

Description

I changed the DoSCircuitCreationBurst value in my torrc and this BUG() was triggered:

Feb 02 21:52:55.902 [warn] tor_bug_occurred_(): Bug: src/or/dos.c:312: cc_stats_refill_bucket: Non-fatal assertion new_circuit_bucket_count >= stats->circuit_bucket failed. (on Tor 0.3.3.1-alpha-dev eafa252b26ecf83a)
Feb 02 21:52:55.903 [warn] Bug: Non-fatal assertion new_circuit_bucket_count >= stats->circuit_bucket failed in cc_stats_refill_bucket at src/or/dos.c:312. Stack trace: (on Tor 0.3.3.1-alpha-dev eafa252b26ecf83a)
Feb 02 21:52:55.903 [warn] Bug:     /root/git/tor/src/or/tor(log_backtrace+0x42) [0x557248c2bbd2] (on Tor 0.3.3.1-alpha-dev eafa252b26ecf83a)
Feb 02 21:52:55.903 [warn] Bug:     /root/git/tor/src/or/tor(tor_bug_occurred_+0xb9) [0x557248c46f69] (on Tor 0.3.3.1-alpha-dev eafa252b26ecf83a)
Feb 02 21:52:55.903 [warn] Bug:     /root/git/tor/src/or/tor(dos_cc_new_create_cell+0x263) [0x557248bf1e63] (on Tor 0.3.3.1-alpha-dev eafa252b26ecf83a)

This is because of:

  /* This function is not allowed to make the bucket count smaller */
  tor_assert_nonfatal(new_circuit_bucket_count >= stats->circuit_bucket);

We actually can make it smaller if the Burst or Rate is changed at runtime.

Child Tickets

Change History (3)

comment:1 Changed 8 months ago by dgoulet

Status: assignedneeds_review

See commit 78d6cb58707ff464 in branch ticket24902_029_05 which is mergeable into master.

comment:2 Changed 8 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

lgtm; merged it to master. It will get backported along with the rest of #24902. Also, thanks for using tor_assert_nonfatal in the first place! ;)

comment:3 Changed 7 months ago by teor

Parent ID: #24902
Note: See TracTickets for help on using tickets.