collector.collect got called without ensuring that collector.run had terminated, so it could have happened that collector.run adds another sample while collector.collect is reading them.