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

ex_libpmem2/TEST5 failed memcheck #5635

Open
grom72 opened this issue May 15, 2023 · 0 comments
Open

ex_libpmem2/TEST5 failed memcheck #5635

grom72 opened this issue May 15, 2023 · 0 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

@grom72
Copy link
Contributor

grom72 commented May 15, 2023

ISSUE: ex_libpmem2/TEST5 failed under valgrind (self-hosted, rhel, RUNTESTS.py --force-enable memcheck)

Environment Information

  • PMDK package version(s): 37292d4
  • OS(es) version(s): Rocky Linux 9.1 (Blue Onyx)
  • ndctl version(s): 71.1
  • kernel version(s): 5.14.0-162.6.1.el9_1.x86_64
  • compiler, libraries, packaging and other related tools version(s):

Please provide a reproduction of the bug:

ex_libpmem2/TEST5 failed under valgrind (self-hosted, rhel, RUNTESTS.py --force-enable memcheck)
for cacheline and byte with: Conditional jump or move depends on uninitialised value(s)

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

Actual behavior:

ex_libpmem2/TEST5: SETUP	(medium/debug/memcheck/cacheline)
Last 24 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/memcheck5.log below (whole file has 24 lines):
==1188808== Memcheck, a memory error detector
==1188808== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1188808== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==1188808== Command: /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/examples/libpmem2/unsafe_shutdown/unsafe_shutdown read /mnt/pmem0/ex_libpmem2_5/testfile0
==1188808== Parent PID: 1178863
==1188808== 
==1188808== Conditional jump or move depends on uninitialised value(s)
==1188808==    at 0x484A1AC: strncat (vg_replace_strmem.c:377)
==1188808==    by 0x48662E0: pmem2_source_device_id (usc_ndctl.c:139)
==1188808==    by 0x4013D5: device_info_read (unsafe_shutdown.c:65)
==1188808==    by 0x4019B5: pool_state_check_and_maybe_init (unsafe_shutdown.c:361)
==1188808==    by 0x401B4E: pool_access_data (unsafe_shutdown.c:433)
==1188808==    by 0x401FA2: main (unsafe_shutdown.c:641)
==1188808== 
==1188808== 
==1188808== HEAP SUMMARY:
==1188808==     in use at exit: 0 bytes in 0 blocks
==1188808==   total heap usage: 4,1[70](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:71) allocs, 4,170 frees, 4,807,480 bytes allocated
==1188808== 
==1188808== All heap blocks were freed -- no leaks are possible
==1188808== 
==1188808== Use --track-origins=yes to see where uninitialised values come from
==1188808== For lists of detected and suppressed errors, rerun with: -s
==1188808== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Last 30 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/pmem2_5.log below (whole file has 44 lines):
<libpmem2>: <3> [init.c:272 use_avx_memcpy_memset] avx supported
<libpmem2>: <3> [init.c:280 use_avx_memcpy_memset] PMEM_AVX enabled
<libpmem2>: <3> [init.c:586 pmem2_arch_init] using clflush
<libpmem2>: <3> [init.c:595 pmem2_arch_init] using movnt AVX
<libpmem2>: <3> [map_posix.c:293 pmem2_map_new] cfg 0x5213470 src 0x5213400 map_ptr 0x5211370
<libpmem2>: <3> [source_posix.c:143 pmem2_source_alignment] type 2
<libpmem2>: <3> [source_posix.c:92 pmem2_source_size] type 2
<libpmem2>: <3> [map_posix.c:477 pmem2_map_new] mapped at 0x5800000
<libpmem2>: <3> [auto_flush_linux.c:86 check_domain_in_region] region_path: /sys/bus/nd/devices/region0
<libpmem2>: <3> [auto_flush_linux.c:30 check_cpu_cache] domain_path: /sys/bus/nd/devices/region0/persistence_domain
<libpmem2>: <3> [map_posix.c:522 pmem2_map_new] using libpmem2 default async mover
<libpmem2>: <3> [mover.c:181 mover_new] map 0x54cf860, vdm 0x1ffeffed18
<libpmem2>: <3> [map.c:32 pmem2_map_get_address] map 0x54cf860
<libpmem2>: <3> [usc_ndctl.c:25 pmem2_source_device_usc] type 2, uid 0x1ffeffedc0
<libpmem2>: <3> [region_namespace_ndctl.c:136 pmem2_region_namespace] ctx 0x55196f0 src 0x5213400 pregion 0x1ffeffeb30 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [region_namespace_ndctl.c:136 pmem2_region_namespace] ctx 0x55cd3c0 src 0x5213400 pregion 0x1ffeffeb20 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [region_namespace_ndctl.c:136 pmem2_region_namespace] ctx 0x59[71](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:72)0f0 src 0x5213400 pregion 0x1ffeffeb20 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54cf860
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [persist.c:312 pmem2_deep_flush_cache] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54cf860
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf860 ptr 0x5800000 size 10485[76](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:77)
<libpmem2>: <3> [persist.c:312 pmem2_deep_flush_cache] map 0x54cf860 ptr 0x5[80](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:81)0000 size 104[85](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:86)76
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf[86](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:87)0 ptr 0x5800010 size 8
<libpmem2>: <3> [persist.c:312 pmem2_deep_flush_cache] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [map_posix.c:580 pmem2_map_delete] map_ptr 0x52[113](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:114)70
<libpmem2>: <3> [libpmem2.c:44 libpmem2_fini] 
Last 1 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/out5.log below (whole file has 1 lines):
foobar
ex_libpmem2/TEST5: FAILED	(medium/debug/memcheck/cacheline)
Valgrind log validation failed
ex_libpmem2/TEST5: SETUP	(medium/debug/memcheck/byte)
Last 24 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/memcheck5.log below (whole file has 24 lines):
==1188842== Memcheck, a memory error detector
==1188842== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1188842== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==1188842== Command: /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/examples/libpmem2/unsafe_shutdown/unsafe_shutdown read /mnt/pmem0/ex_libpmem2_5/testfile0
==1188842== Parent PID: 1178863
==1188842== 
==1188842== Conditional jump or move depends on uninitialised value(s)
==1188842==    at 0x484A1AC: strncat (vg_replace_strmem.c:377)
==1188842==    by 0x48662E0: pmem2_source_device_id (usc_ndctl.c:139)
==1188842==    by 0x4013D5: device_info_read (unsafe_shutdown.c:65)
==1188842==    by 0x4019B5: pool_state_check_and_maybe_init (unsafe_shutdown.c:361)
==1188842==    by 0x401B4E: pool_access_data (unsafe_shutdown.c:433)
==1188842==    by 0x401FA2: main (unsafe_shutdown.c:641)
==1188842== 
==1188842== 
==1188842== HEAP SUMMARY:
==1188842==     in use at exit: 0 bytes in 0 blocks
==1188842==   total heap usage: 4,170 allocs, 4,170 frees, 4,807,480 bytes allocated
==1188842== 
==1188842== All heap blocks were freed -- no leaks are possible
==1188842== 
==1188842== Use --track-origins=yes to see where uninitialised values come from
==1188842== For lists of detected and suppressed errors, rerun with: -s
==1188842== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Last 30 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/pmem2_5.log below (whole file has 44 lines):
<libpmem2>: <3> [init.c:272 use_avx_memcpy_memset] avx supported
<libpmem2>: <3> [init.c:280 use_avx_memcpy_memset] PMEM_AVX enabled
<libpmem2>: <3> [init.c:586 pmem2_arch_init] using clflush
<libpmem2>: <3> [init.c:595 pmem2_arch_init] using movnt AVX
<libpmem2>: <3> [map_posix.c:293 pmem2_map_new] cfg 0x52[134](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:135)70 src 0x5213400 map_ptr 0x5211370
<libpmem2>: <3> [source_posix.c:143 pmem2_source_alignment] type 2
<libpmem2>: <3> [source_posix.c:92 pmem2_source_size] type 2
<libpmem2>: <3> [map_posix.c:477 pmem2_map_new] mapped at 0x5800000
<libpmem2>: <3> [auto_flush_linux.c:86 check_domain_in_region] region_path: /sys/bus/nd/devices/region0
<libpmem2>: <3> [auto_flush_linux.c:30 check_cpu_cache] domain_path: /sys/bus/nd/devices/region0/persistence_domain
<libpmem2>: <3> [map_posix.c:522 pmem2_map_new] using libpmem2 default async mover
<libpmem2>: <3> [mover.c:181 mover_new] map 0x54cf860, vdm 0x1ffeffecd8
<libpmem2>: <3> [map.c:32 pmem2_map_get_address] map 0x54cf860
<libpmem2>: <3> [usc_ndctl.c:25 pmem2_source_device_usc] type 2, uid 0x1ffeffed80
<libpmem2>: <3> [region_namespace_ndctl.c:[136](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:137) pmem2_region_namespace] ctx 0x55196f0 src 0x5213400 pregion 0x1ffeffeaf0 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [region_namespace_ndctl.c:136 pmem2_region_namespace] ctx 0x55cd3c0 src 0x5213400 pregion 0x1ffeffeae0 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [region_namespace_ndctl.c:136 pmem2_region_namespace] ctx 0x59710f0 src 0x5213400 pregion 0x1ffeffeae0 pnamespace (nil)
<libpmem2>: <3> [region_namespace_ndctl.c:66 ndctl_match_fsdax] st_dev 66304 devname pmem1
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54cf860
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [persist.c:338 pmem2_deep_flush_byte] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54cf860
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf860 ptr 0x5800000 size 1048576
<libpmem2>: <3> [persist.c:338 pmem2_deep_flush_byte] map 0x54cf860 ptr 0x5800000 size 1048576
<libpmem2>: <3> [deep_flush.c:21 pmem2_deep_flush] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [persist.c:338 pmem2_deep_flush_byte] map 0x54cf860 ptr 0x5800010 size 8
<libpmem2>: <3> [map_posix.c:580 pmem2_map_delete] map_ptr 0x521[137](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:138)0
<libpmem2>: <3> [libpmem2.c:44 libpmem2_fini] 
Last 1 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/ex_libpmem2/out5.log below (whole file has 1 lines):
foobar
ex_libpmem2/TEST5: FAILED	(medium/debug/memcheck/byte)
Valgrind log validation failed

Expected behavior:

Details

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? (Yes, No) No

Requested priority: Medium

@grom72 grom72 added the Type: Bug A previously unknown bug in PMDK label May 15, 2023
@grom72 grom72 added this to the 1.13 on GHA milestone May 15, 2023
@grom72 grom72 changed the title ex_libpmem2/TEST5 failed ex_libpmem2/TEST5 failed memcheck May 15, 2023
@grom72 grom72 added libpmem2 libpmem- and libpmem2-related examples src/examples and src/test/ex_* Exposure: Low Priority: 2 high and removed examples src/examples and src/test/ex_* Exposure: Low labels May 15, 2023
@grom72 grom72 modified the milestones: 1.13 on GHA, 1.14 May 15, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 22, 2023
Disable ex_libpmem2/TEST5 with memcheck until issue pmem#5635 is fixed.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 added the CI: Disabled Temporarily disabled from testing label May 22, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 22, 2023
Disable ex_libpmem2/TEST5 with memcheck until issue pmem#5635 is fixed.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 modified the milestones: 1.14, 1.15 May 25, 2023
@grom72 grom72 added the QA: CI .github/ and utils/ related to automated testing label Jun 1, 2023
@janekmi janekmi modified the milestones: 2.0.1, 2.0.2 Nov 23, 2023
@janekmi janekmi added won't do The requested improvement is not planned to be done. and removed won't do The requested improvement is not planned to be done. labels Feb 8, 2024
@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

4 participants