On Sat, Aug 20, 2016 at 9:34 AM, Christophe JAILLET <[email protected]> wrote: > Hi, > > shouldn't "queue_info->idlers" on line 138 of "mpm/worker/fdqueue.c" be read > using "apr_atomic_read32" ?
Actually both apr_atomic_read32() and current volatile declaration are racy here, 'idlers' may become 0 between the check and apr_atomic_dec32(), and we don't expect negative idlers in worker/fdqueue.c... The right thing to do would be "if (apr_atomic_dec32() == 0)" (or rather "apr_atomic_add32(&idlers, -1) <= zero_pt" like in event/fdqueue.c). Time to put a single fdqueue implementation in fdqueue_common? Regards, Yann.
