pmem / pmdk

Persistent Memory Development Kit
https://pmem.io
Other
1.34k stars 509 forks source link

Valgrind/pmemcheck does not comprehend byte granularity #5633

Open janekmi opened 1 year ago

janekmi commented 1 year ago

ISSUE:

Environment Information

Please provide a reproduction of the bug:

5618

How often bug is revealed: (always, often, rare): always

Actual behavior:

False negative.

Expected behavior:

  1. Either all tests/examples which make use of byte granularity have to be instrumented directly or
  2. These kinds of tests/examples when run under byte granularity should not allow for Valgrind/pmemcheck.

Details

Valgrind/pmemcheck does not differentiate between granularities which is not a problem for page and cacheline granularities since both of them require dedicated API calls to make data persistent. These API calls can be instrumented to inform Valgrind about the changed state for given chunks of data. It is no longer the case for byte granularity which makes these dedicated API calls redundant in some cases. Hence, the Valgrind instrumentation has no chance of informing of the changes that took place. Which results in false negatives.

Additional information about Priority and Help Requested:

Requested priority: (Showstopper, High, Medium, Low) Medium

janekmi commented 10 months ago

Next step: Investigate the possible impact.