• Martin Blix Grydeland's avatar
    Fix race in the VSL segment counter initialization · 3e19f335
    Martin Blix Grydeland authored
    Fix a stupid misstake where the segment counter in the VSL segment was
    set just before the entire struct was cleared during
    initialization. This didn't cause problems in the common case because
    it would be set correctly on the very first log line produced. But it
    did open a race where an unfortunate early log client would assume it
    was lagging indefinetely behind varnishd on the log reading and report
    overflow error. This was most commonly experienced with varnishtest.
    
    Fixes: #2241
    3e19f335
cache_shmlog.c 11.6 KB