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: data_mover memory leak - pmem2_integration/TEST[39,41]: failed memcheck #5637

Closed
grom72 opened this issue May 15, 2023 · 1 comment
Closed
Labels
libpmem2 libpmem- and libpmem2-related miniasync async related issue Priority: 3 medium Type: Bug A previously unknown bug in PMDK
Milestone

Comments

@grom72
Copy link
Contributor

grom72 commented May 15, 2023

ISSUE: pmem2: data_mover memory leak - pmem2_integration/TEST[39,41] 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:

pmem2_integration/TEST39 failed under valgrind (self-hosted, rhel, RUNTESTS.py --force-enable memcheck)
wit error message:

HEAP SUMMARY:
==1218060==     in use at exit: 144 bytes in 2 blocks
==1218060==   total heap usage: 893 allocs, 891 frees, 2,882,026 bytes allocated
==1218060== 
==1218060== 144 (64 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2

fro page/byte configurations in all build types.

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

Actual behavior:

pmem2_integration/TEST39: SETUP	(medium/debug/memcheck/cacheline)
Last 30 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/memcheck39.log below (whole file has 30 lines):
==1[2180](https://github.com/pmem/pmdk/actions/runs/4969298952/jobs/8892382286#step:6:2181)09== Memcheck, a memory error detector
==1218009== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==1218009== Using Valgrind-3.20.0 and LibVEX; rerun with -h for copyright info
==1218009== Command: /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/pmem2_integration test_map_from_existing /mnt/pmem0/pmem2_integration_39/testfile
==1218009== Parent PID: 1178863
==1218009== 
==1218009== 
==1218009== HEAP SUMMARY:
==1218009==     in use at exit: 144 bytes in 2 blocks
==1218009==   total heap usage: 898 allocs, 896 frees, 2,894,888 bytes allocated
==1218009== 
==1218009== 144 (64 direct, 80 indirect) bytes in 1 blocks are definitely lost in loss record 2 of 2
==1218009==    at 0x48447AB: malloc (vg_replace_malloc.c:393)
==1218009==    by 0x486AC19: _Malloc (alloc.c:72)
==1218009==    by 0x4865BAC: pmem2_malloc (pmem2_utils.c:21)
==1218009==    by 0x4861CDC: mover_new (mover.c:183)
==1218009==    by 0x485F1F0: pmem2_map_from_existing (map.c:274)
==1218009==    by 0x405731: test_map_from_existing (pmem2_integration.c:975)
==1218009==    by 0x4028E1: TEST_CASE_PROCESS (unittest.h:700)
==1218009==    by 0x405AE7: main (pmem2_integration.c:1030)
==1218009== 
==1218009== LEAK SUMMARY:
==1218009==    definitely lost: 64 bytes in 1 blocks
==1218009==    indirectly lost: 80 bytes in 1 blocks
==1218009==      possibly lost: 0 bytes in 0 blocks
==1218009==    still reachable: 0 bytes in 0 blocks
==1218009==         suppressed: 0 bytes in 0 blocks
==1218009== 
==1218009== For lists of detected and suppressed errors, rerun with: -s
==1218009== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Last 30 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/pmem2_39.log below (whole file has 36 lines):
<libpmem2>: <1> [out.c:230 out_init] compiled with support for Valgrind drd
<libpmem2>: <1> [out.c:235 out_init] compiled with support for shutdown state
<libpmem2>: <1> [out.c:240 out_init] compiled with libndctl 63+
<libpmem2>: <3> [libpmem2.c:29 libpmem2_init] 
<libpmem2>: <3> [init.c:558 pmem2_arch_init] 
<libpmem2>: <3> [init.c:472 pmem_cpuinfo_to_funcs] 
<libpmem2>: <3> [init.c:475 pmem_cpuinfo_to_funcs] clflush supported
<libpmem2>: <3> [init.c:527 pmem_cpuinfo_to_funcs] WC workaround = 1
<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> [source_posix.c:92 pmem2_source_size] type 2
<libpmem2>: <3> [map_posix.c:293 pmem2_map_new] cfg 0x52381d0 src 0x5238250 map_ptr 0x1ffeffed10
<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 0x54f4630, vdm 0x1ffeffec18
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54f4630
<libpmem2>: <3> [map.c:57 pmem2_map_get_store_granularity] map 0x54f4630
<libpmem2>: <3> [map_posix.c:580 pmem2_map_delete] map_ptr 0x1ffeffed50
<libpmem2>: <3> [mover.c:181 mover_new] map 0x54f48a0, vdm 0x54f4928
<libpmem2>: <3> [map.c:32 pmem2_map_get_address] map 0x54f48a0
<libpmem2>: <3> [map.c:44 pmem2_map_get_size] map 0x54f48a0
<libpmem2>: <3> [map.c:57 pmem2_map_get_store_granularity] map 0x54f48a0
<libpmem2>: <3> [map_posix.c:580 pmem2_map_delete] map_ptr 0x1ffeffed50
<libpmem2>: <3> [libpmem2.c:44 libpmem2_fini] 
Last 3 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/out39.log below (whole file has 3 lines):
pmem2_integration/TEST39: START: pmem2_integration
 /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/pmem2_integration test_map_from_existing /mnt/pmem0/pmem2_integration_39/testfile
pmem2_integration/TEST39: DONE
Last 0 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/err39.log below (whole file has 0 lines):
Last 3 lines of /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/trace39.log below (whole file has 3 lines):
{pmem2_integration.c:1029 main} pmem2_integration/TEST39: START: pmem2_integration
 /home/pmdkuser/actions-runner/_work/pmdk/pmdk/src/test/pmem2_integration/pmem2_integration test_map_from_existing /mnt/pmem0/pmem2_integration_39/testfile
{pmem2_integration.c:1031 main} pmem2_integration/TEST39: DONE
pmem2_integration/TEST39: FAILED	(medium/debug/memcheck/cacheline)

Expected behavior:

Details

Additional information about Priority and Help Requested:

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

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

@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 pmem2_integration/TEST39: FAILED pmem2_integration/TEST39: failed memcheck May 15, 2023
@grom72 grom72 added libpmem2 libpmem- and libpmem2-related Exposure: Medium labels May 15, 2023
@grom72
Copy link
Contributor Author

grom72 commented May 15, 2023

  • fix
    or
  • disable and move 1.14

@grom72 grom72 changed the title pmem2_integration/TEST39: failed memcheck pmem2_integration/TEST[39,41]: failed memcheck May 15, 2023
@grom72 grom72 modified the milestones: 1.13 on GHA, 1.14 May 15, 2023
@grom72 grom72 added the miniasync async related issue label May 15, 2023
@grom72 grom72 self-assigned this May 22, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 22, 2023
Disable pmem2_integration/TEST[39,41] with memcheck
until pmem#5637 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 pmem2_integration/TEST[39,41] with memcheck
until pmem#5637 is fixed.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
grom72 added a commit to grom72/pmdk that referenced this issue May 23, 2023
Automatically created data_mover is deleted during
the map delete process.

Fixes: pmem#5637

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 removed the CI: Disabled Temporarily disabled from testing label May 23, 2023
@grom72 grom72 modified the milestones: 1.14, 1.13 on GHA May 23, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 23, 2023
Automatically created data_mover is deleted during
the map delete process.

Fixes: pmem#5637

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 removed their assignment May 23, 2023
grom72 added a commit to grom72/pmdk that referenced this issue May 23, 2023
Automatically created data_mover is deleted during
the map delete process.

Fixes: pmem#5637

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
@grom72 grom72 closed this as completed May 25, 2023
@grom72 grom72 changed the title pmem2_integration/TEST[39,41]: failed memcheck pmem2: data_mover memory leak - pmem2_integration/TEST[39,41]: failed memcheck May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libpmem2 libpmem- and libpmem2-related miniasync async related issue Priority: 3 medium Type: Bug A previously unknown bug in PMDK
Projects
None yet
Development

No branches or pull requests

1 participant