tokio: subtraction overflow in tokio-threadpool

On current master, there seems to be a race condition in tokio-threadpool where occasionally I run into a subtraction overflow when logging the number of workers (https://github.com/tokio-rs/tokio/blob/master/tokio-threadpool/src/lib.rs#L1089).

thread panicked at 'attempt to subtract with overflow', /Users/srijs/.cargo/git/checkouts/tokio-377c595163f99a10/7b1306e/tokio-threadpool/src/
lib.rs:1089:53

Maybe the atomic ordering is not strict enough?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

@kamyuentse I’m not seeing this issue happen w/ the latest changes on master (#317). Are you able to confirm this?