Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pmem2_map_prot/TEST7: failed (short/release/memcheck) #5599

Open
szadam opened this issue Apr 21, 2023 · 4 comments
Open

pmem2_map_prot/TEST7: failed (short/release/memcheck) #5599

szadam opened this issue Apr 21, 2023 · 4 comments
Labels
CI: Disabled Temporarily disabled from testing libpmem2 libpmem- and libpmem2-related Priority: 3 medium QA: CI .github/ and utils/ related to automated testing Type: Bug A previously unknown bug in PMDK
Milestone

Comments

@szadam
Copy link

szadam commented Apr 21, 2023

ISSUE:

Environment Information

  • PMDK package version(s): 50693c2
  • OS(es) version(s): openSUSE15_3
  • ndctl version(s): 71.1
  • kernel version(s): 5.3.18-150300.59.106

Please provide a reproduction of the bug:

[pmdk_thread_1] Last 30 lines of /home/jenkins-slave/workspace/PMDK-unittests-linux-py/pmdk_1/src/test/pmem2_map_prot/memcheck7.log below (whole file has 30036 lines):
[pmdk_thread_1] ==41698==    by 0x404AA4: TEST_CASE_PROCESS (unittest.h:700)
[pmdk_thread_1] ==41698==    by 0x405F36: main (pmem2_map_prot.c:571)
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] ==41698== More than 1000 different errors detected.  I'm not reporting any more.
[pmdk_thread_1] ==41698== Final error counts will be inaccurate.  Go fix your program!
[pmdk_thread_1] ==41698== Rerun with --error-limit=no to disable this cutoff.  Note
[pmdk_thread_1] ==41698== that errors may occur in your program without prior warning from
[pmdk_thread_1] ==41698== Valgrind, because errors are no longer being displayed.
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] vex amd64->IR: unhandled instruction bytes: 0xA7 0x8 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
[pmdk_thread_1] vex amd64->IR:   REX=0 REX.W=0 REX.R=0 REX.X=0 REX.B=0
[pmdk_thread_1] vex amd64->IR:   VEX=0 VEX.L=0 VEX.nVVVV=0x0 ESC=NONE
[pmdk_thread_1] vex amd64->IR:   PFX.66=0 PFX.F2=0 PFX.F3=0
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] ==41698== HEAP SUMMARY:
[pmdk_thread_1] ==41698==     in use at exit: 3,261 bytes in 40 blocks
[pmdk_thread_1] ==41698==   total heap usage: 6,656 allocs, 6,616 frees, 12,664,579 bytes allocated
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] ==41698== LEAK SUMMARY:
[pmdk_thread_1] ==41698==    definitely lost: 0 bytes in 0 blocks
[pmdk_thread_1] ==41698==    indirectly lost: 0 bytes in 0 blocks
[pmdk_thread_1] ==41698==      possibly lost: 0 bytes in 0 blocks
[pmdk_thread_1] ==41698==    still reachable: 3,149 bytes in 38 blocks
[pmdk_thread_1] ==41698==         suppressed: 112 bytes in 2 blocks
[pmdk_thread_1] ==41698== Reachable blocks (those to which a pointer was found) are not shown.
[pmdk_thread_1] ==41698== To see them, rerun with: --leak-check=full --show-leak-kinds=all
[pmdk_thread_1] ==41698== 
[pmdk_thread_1] ==41698== For lists of detected and suppressed errors, rerun with: -s
[pmdk_thread_1] ==41698== ERROR SUMMARY: 1982 errors from 1000 contexts (suppressed: 0 from 0)

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

always

Actual behavior:

Tests failed.

Expected behavior:

Tests should pass

@szadam szadam added the Type: Bug A previously unknown bug in PMDK label Apr 21, 2023
@janekmi janekmi added libpmem2 libpmem- and libpmem2-related Exposure: Medium labels Apr 24, 2023
@grom72 grom72 added this to the 1.13 on GHA milestone May 15, 2023
@grom72
Copy link
Contributor

grom72 commented May 15, 2023

Disable under Valgrind

@janekmi
Copy link
Contributor

janekmi commented May 15, 2023

This test writes an assembler code into mmap'ed memory in order to test executing it. It might confuse Valgrind and be unportable between architectures (?). It probably should not be run under Valgrind.

@grom72 grom72 added Priority: 3 medium QA: CI .github/ and utils/ related to automated testing and removed Exposure: Medium labels May 15, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 17, 2023
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 added the CI: Disabled Temporarily disabled from testing label May 17, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 17, 2023
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
grom72 added a commit that referenced this issue May 17, 2023
@grom72 grom72 modified the milestones: 1.13 on GHA, 1.14, 1.15 May 18, 2023
@janekmi
Copy link
Contributor

janekmi commented May 30, 2023

The latest manual execution does not show the exact issue as it was reported initially.

Source code: 1.13.0-115-g9e8754752
Comment out the code disabling the test here.
Command line: ./RUNTESTS.py pmem2_map_prot -u 7 --force-enable memcheck -o 1d

pmem2_map_prot_TES7_memcheck7.log

It might be due to a premature exit. The log is still not clean though.

==43049== Jump to the invalid address stated on the next line
==43049==    at 0x8200000: ???
==43049==    by 0x4046A3: TEST_CASE_PROCESS (unittest.h:700)
==43049==    by 0x405B35: main (pmem2_map_prot.c:571)
==43049==  Address 0x8200000 is 552,128 bytes inside an unallocated block of size 3,087,520 in arena "client"
==43049== 

@grom72 grom72 modified the milestones: 1.15, 1.14 May 30, 2023
@grom72
Copy link
Contributor

grom72 commented May 30, 2023

Let's check and fix it within 1.14

@janekmi janekmi modified the milestones: 2.0.0, 2.0.1 Jul 21, 2023
@janekmi janekmi modified the milestones: 2.0.1, 2.0.2 Nov 23, 2023
@janekmi janekmi modified the milestones: 2.1.0, 2.x Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Disabled Temporarily disabled from testing libpmem2 libpmem- and libpmem2-related Priority: 3 medium QA: CI .github/ and utils/ related to automated testing Type: Bug A previously unknown bug in PMDK
Projects
None yet
Development

No branches or pull requests

3 participants