pmem / pmemstream

Other
9 stars 13 forks source link

Hanging on in a multithreaded future poll after async append #275

Open KFilipek opened 1 year ago

KFilipek commented 1 year ago

ISSUE: Hanging on in a multithreaded future poll after async append

Environment Information

and possibly:

git clone https://github.com/pmem/pmemstream
cd pmemstream
gh pr checkout 274
podman run --privileged --init -v $PWD/:$PWD/:Z --security-opt seccomp=unconfined --security-opt label=disable -w $PWD --user root -it ghcr.io/pmem/pmemstream:ubuntu-22.04-latest /bin/bash
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DTESTS_USE_FORCED_PMEM=1 -DUSE_LIBUNWIND=1
make -j
valgrind --tool=memcheck ./tests/timestamp /dev/shm/test

How often bug is revealed:

always

Actual behavior:

Actually, the test fails after timeout:

      Start 66: timestamp_0_memcheck
45/46 Test #66: timestamp_0_memcheck ...................***Timeout 800.10 sec

Expected behavior:

The test should be finished under 800s, e.g.:

      Start 66: timestamp_0_memcheck
45/46 Test #66: timestamp_0_memcheck ....................... Passed <800 sec

Details

This issue is related to PR #274. The main problem is hanging on future poll after async append. The problem occurs in the multithreaded environment under Valgrind's memcheck. A possible root cause is wrong timestamp assignment to future when multiple threads increase timestamps.

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? No

Requested priority: High