Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

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

Open
KFilipek opened this issue Oct 19, 2022 · 0 comments · May be fixed by #274
Open

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

KFilipek opened this issue Oct 19, 2022 · 0 comments · May be fixed by #274
Labels
Type: Bug Something isn't working

Comments

@KFilipek
Copy link
Contributor

KFilipek commented Oct 19, 2022

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

Environment Information

  • pmemstream version(s): 57d6d7
  • PMDK (libpmem2) package version(s): N/A
  • OS(es) version(s): Ubuntu 22.04
  • kernel version(s): 5.15
  • compiler, libraries, packaging and other related tools version(s): N/A

and possibly:

  • ndctl version(s): N/A

Recommended: Podman container

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

Please provide a reproduction of the bug:

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

@KFilipek KFilipek added the Type: Bug Something isn't working label Oct 19, 2022
@KFilipek KFilipek linked a pull request Oct 19, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant