armon/bloomd

race condition in filtmgr_check_keys

thinkiny opened this issue · 1 comments

we current use bloomd to filter user browser history, bloomd' check performance is very good, about 300k (24 workers), BUT we recive SIGSEGV sometimes in bloomf_contains, because of there are so many filters, we have to change sata to ssd. yesterday i found filtmgr_check_keys has race condition that cause SIGSEGV, change pthread_rwlock_rdlock(&filt->rwlock); to pthread_rwlock_wrlock(&filt->rwlock);, sloves problem. because thread_safe_fault change sbf->filter,there's tiny change sbf->filter has been read wrong.

forgive my poor engish

armon commented

Fixed in 16a99fd, thanks for reporting!