[Varnish] #897: sess_mem "leak" on hyper-threaded cpu
Varnish
varnish-bugs at varnish-cache.org
Sun Apr 10 05:59:23 CEST 2011
#897: sess_mem "leak" on hyper-threaded cpu
-------------------------------------------------+--------------------------
Reporter: askalski | Type: defect
Status: new | Priority: normal
Milestone: | Component: build
Version: trunk | Severity: major
Keywords: sess_mem leak n_sess race condition |
-------------------------------------------------+--------------------------
Comment(by askalski):
I wrote a short program to test the increment/decrement race condition,
and ran it on a dual socket quad core machine with HT. The program runs
through a series of 2-thread trials, with each trial setting thread CPU
affinities to a different pair (ex: thread A runs on cpu0, thread B runs
on cpu1.)
{{{
for (i = arg->iterations; i > 0; --i) {
++counter;
--counter;
}
}}}
Cpu0 and cpu8 share the same physical id and core id.
{{{
$ ./racetest
cpu0 vs cpu0 (1000000000 iterations)... counter drift = 2
cpu0 vs cpu1 (1000000000 iterations)... counter drift = 318
cpu0 vs cpu2 (1000000000 iterations)... counter drift = 709
cpu0 vs cpu3 (1000000000 iterations)... counter drift = 313
cpu0 vs cpu4 (1000000000 iterations)... counter drift = 690
cpu0 vs cpu5 (1000000000 iterations)... counter drift = 336
cpu0 vs cpu6 (1000000000 iterations)... counter drift = 578
cpu0 vs cpu7 (1000000000 iterations)... counter drift = 359
cpu0 vs cpu8 (1000000000 iterations)... counter drift = 13720798
cpu0 vs cpu9 (1000000000 iterations)... counter drift = 325
cpu0 vs cpu10 (1000000000 iterations)... counter drift = 581
cpu0 vs cpu11 (1000000000 iterations)... counter drift = 361
cpu0 vs cpu12 (1000000000 iterations)... counter drift = 685
cpu0 vs cpu13 (1000000000 iterations)... counter drift = 316
cpu0 vs cpu14 (1000000000 iterations)... counter drift = 637
cpu0 vs cpu15 (1000000000 iterations)... counter drift = 337
}}}
--
Ticket URL: <http://www.varnish-cache.org/trac/ticket/897#comment:1>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list