concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.38k stars 313 forks source link

./ck_hp_fifo 48 1 16384 100 ERROR [31] Queue should never be empty. #165

Closed ConiKost closed 3 years ago

ConiKost commented 3 years ago

Hi! I have a system, where the tests are failing. I am not sure, if this could be related to a very high count of CPU cores (48)? I am not able to reproduce on my system, which has a much less count of CPU cores, only 12 (6+6HT).

Full log: https://pastebin.com/BW2hyFC3

----[ Testing hp....
make[2]: Entering directory '/var/tmp/portage/dev-libs/concurrencykit-0.7.0-r1/work/ck-0.7.0/regressions/ck_hp/validate'
./serial
Free 0x556372de32f0
Free 0x556372de32f0
Free 0x556372de32f0
Allocating entry and freeing in other HP record...
Free 0x556372de32f0
Free 0x556372de3750
./ck_hp_stack 48 100 1
Peak: 100 (0.00%)
Reclamations: 4999981

Peak: 100 (0.00%)
Reclamations: 4999936

Peak: 100 (0.00%)
Reclamations: 4999978

Peak: 100 (0.00%)
Reclamations: 4999991

Peak: 100 (0.00%)
Reclamations: 4999973

Peak: 100 (0.00%)
Reclamations: 4999907

Peak: 100 (0.00%)
Reclamations: 4999961

Peak: 100 (0.00%)
Reclamations: 4999908

Peak: 100 (0.00%)
Reclamations: 4999968

Peak: 100 (0.00%)
Reclamations: 4999932

Peak: 100 (0.00%)
Reclamations: 4999915

Peak: 100 (0.00%)
Reclamations: 4999962

Peak: 100 (0.00%)
Reclamations: 4999987

Peak: 100 (0.00%)
Reclamations: 4999990

Peak: 100 (0.00%)
Reclamations: 4999996

Peak: 100 (0.00%)
Reclamations: 4999914

Peak: 100 (0.00%)
Reclamations: 4999952

Peak: 100 (0.00%)
Reclamations: 4999927

Peak: 100 (0.00%)
Reclamations: 4999945

Peak: 100 (0.00%)
Reclamations: 4999947

Peak: 100 (0.00%)
Reclamations: 4999930

Peak: 100 (0.00%)
Reclamations: 4999996

Peak: 100 (0.00%)
Reclamations: 4999925

Peak: 100 (0.00%)
Reclamations: 4999956

Peak: 100 (0.00%)
Reclamations: 4999989

Peak: 100 (0.00%)
Reclamations: 4999948

Peak: 100 (0.00%)
Reclamations: 4999946

Peak: 100 (0.00%)
Reclamations: 4999982

Peak: 100 (0.00%)
Reclamations: 4999972

Peak: 100 (0.00%)
Reclamations: 4999913

Peak: 100 (0.00%)
Reclamations: 4999944

Peak: 100 (0.00%)
Reclamations: 4999978

Peak: 100 (0.00%)
Reclamations: 4999981

Peak: 100 (0.00%)
Reclamations: 4999949

Peak: 100 (0.00%)
Reclamations: 4999948

Peak: 100 (0.00%)
Reclamations: 4999980

Peak: 100 (0.00%)
Reclamations: 4999914

Peak: 100 (0.00%)
Reclamations: 4999941

Peak: 100 (0.00%)
Reclamations: 4999981

Peak: 100 (0.00%)
Reclamations: 4999951

Peak: 100 (0.00%)
Reclamations: 4999926

Peak: 100 (0.00%)
Reclamations: 4999938

Peak: 100 (0.00%)
Reclamations: 4999916

Peak: 100 (0.00%)
Reclamations: 4999936

Peak: 100 (0.00%)
Reclamations: 4999954

Peak: 100 (0.00%)
Reclamations: 4999993

Peak: 100 (0.00%)
Reclamations: 4999971

Peak: 100 (0.00%)
Reclamations: 4999938

./ck_hp_fifo 48 1 16384 100
ERROR [31] Queue should never be empty.
make[2]: *** [Makefile:10: check] Error 1
sbahra commented 3 years ago

Looking at the test, it should be using an execution barrier before moving on to the next phase, otherwise it is possible to observe an empty queue state. Will update the test and report back tomorrow. Thanks for reporting!

ConiKost commented 3 years ago

Yes, this is on x86_64.

sbahra commented 3 years ago

@ConiKost Are you able to reproduce this on latest master?

ConiKost commented 3 years ago

I will test and report back. Since this is not my system, please give me a few days.

ConiKost commented 3 years ago

Looks good, as it seems, so closing. Thanks!

sbahra commented 3 years ago

Thanks for testing