linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [linus:master] [perf pmu] a0c41caeba: kmsg.sanitizer.direct_leak/__interceptor_malloc/perf_cpu_map__alloc/perf_cpu_map__empty_new/cpu_map__from_range/cpu_map__new_data/perf_event__fprintf_event_update
       [not found] <202307271322.40c2fc50-oliver.sang@intel.com>
@ 2023-07-28  4:08 ` Ian Rogers
  0 siblings, 0 replies; only message in thread
From: Ian Rogers @ 2023-07-28  4:08 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-lkp, lkp, linux-kernel, Arnaldo Carvalho de Melo, Kan Liang,
	Adrian Hunter, Alexander Shishkin, Ali Saidi, Athira Rajeev,
	Dmitrii Dolgov, Huacai Chen, Ingo Molnar, James Clark, Jing Zhang,
	Jiri Olsa, John Garry, Kajol Jain, Kang Minchul, Leo Yan,
	Madhavan Srinivasan, Mark Rutland, Mike Leach, Ming Wang,
	Namhyung Kim, Peter Zijlstra, Ravi Bangoria, Rob Herring,
	Sandipan Das, Sean Christopherson, Suzuki Poulouse,
	Thomas Richter, Will Deacon, Xing Zhengjun, linux-perf-users

On Thu, Jul 27, 2023 at 6:07 PM kernel test robot <oliver.sang@intel.com> wrote:
>
>
>
> Hello,
>
> kernel test robot noticed "kmsg.sanitizer.direct_leak/__interceptor_malloc/perf_cpu_map__alloc/perf_cpu_map__empty_new/cpu_map__from_range/cpu_map__new_data/perf_event__fprintf_event_update" on:
>
> commit: a0c41caebab2fa224454d50dd4e29ae008ead25f ("perf pmu: Add CPU map for "cpu" PMUs")
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
>
> [test failed on linus/master 18b44bc5a67275641fb26f2c54ba7eef80ac5950]
> [test failed on linux-next/master 0ba5d07205771c50789fd9063950aa75e7f1183f]
>
> in testcase: perf-test
> version: perf-test-x86_64-git-1_20220520
> with following parameters:
>
>         type: lkp
>         group: group-01
>
> test-description: The internal Perf Test suite.
>
>
> compiler: gcc-12
> test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480+ (Sapphire Rapids) with 256G memory
>
> (please refer to attached dmesg/kmsg for entire log/backtrace)
>
>
> we also noticed there are 2 other "Direct leak" but exist on both this commit
> and parent. (there are 3 "Indrect leak", but since exist on both this commit
> and parent, we don't highlight below, details are in attached dmesg)
>
> we are not sure enough the impact of those 2 other "Direct leak", which we will
> check further if we can capture the first commit caused them. we just report
> this difference we found in our tests FYI.
>
>
> 1578e63d3ac292ab a0c41caebab2fa224454d50dd4e
> ---------------- ---------------------------
>        fail:runs  %reproduction    fail:runs
>            |             |             |
>           6:6            0%           6:6     kmsg.sanitizer.direct_leak/__interceptor_calloc/map__new2/machine__addnew_module_map/machine__process_kernel_mmap_event/machine__process_mmap_event/perf_event__process_mmap
>           6:6            0%           6:6     kmsg.sanitizer.direct_leak/__interceptor_malloc/__maps__insert/maps__insert/thread__insert_map/machine__process_mmap2_event/perf_event__process_mmap2
>            :6          100%           6:6     kmsg.sanitizer.direct_leak/__interceptor_malloc/perf_cpu_map__alloc/perf_cpu_map__empty_new/cpu_map__from_range/cpu_map__new_data/perf_event__fprintf_event_update
>
>
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202307271322.40c2fc50-oliver.sang@intel.com
>
>
>
> =================================================================
> ==16107==ERROR: LeakSanitizer: detected memory leaks
>
> Direct leak of 17544 byte(s) in 51 object(s) allocated from:     <----- also happens on parent
>     #0 0x7f77a26ad037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
>     #1 0x55eae21bcf4a in map__new2 util/map.c:226
>     #2 0x55eae21a1b8b in machine__addnew_module_map util/machine.c:1039
>     #3 0x55eae21a80d9 in machine__process_kernel_mmap_event util/machine.c:1809
>     #4 0x55eae21aa396 in machine__process_mmap_event util/machine.c:1996
>     #5 0x55eae2069f1c in perf_event__process_mmap util/event.c:371
>     #6 0x55eae21daa15 in machines__deliver_event util/session.c:1565
>     #7 0x55eae21dc2f5 in perf_session__deliver_event util/session.c:1645
>     #8 0x55eae21df380 in perf_session__process_event util/session.c:1881
>     #9 0x55eae21e622c in process_simple util/session.c:2442
>     #10 0x55eae21e527c in reader__read_event util/session.c:2371
>     #11 0x55eae21e5bbc in reader__process_events util/session.c:2420
>     #12 0x55eae21e69e5 in __perf_session__process_events util/session.c:2467
>     #13 0x55eae21e991d in perf_session__process_events util/session.c:2633
>     #14 0x55eae1d248dc in __cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:989
>     #15 0x55eae1d30f76 in cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:1709
>     #16 0x55eae200824f in run_builtin /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:323
>     #17 0x55eae2008ad1 in handle_internal_command /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:377
>     #18 0x55eae2009003 in run_argv /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:421
>     #19 0x55eae200972f in main /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:537
>     #20 0x7f77a1854d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)

This was already fixed by:
https://lore.kernel.org/r/20230608232823.4027869-20-irogers@google.com

Thanks,
Ian

> Direct leak of 904 byte(s) in 1 object(s) allocated from:
>     #0 0x7f77a26ace8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>     #1 0x55eae2648cdd in perf_cpu_map__alloc (/usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf+0x19a5cdd)
>     #2 0x55eae22f7525 in perf_cpu_map__empty_new util/cpumap.c:163
>     #3 0x55eae22f6dae in cpu_map__from_range util/cpumap.c:121
>     #4 0x55eae22f7278 in cpu_map__new_data util/cpumap.c:144
>     #5 0x55eae2179b4c in perf_event__fprintf_event_update util/header.c:4348
>     #6 0x55eae217a084 in perf_event__process_event_update util/header.c:4410
>     #7 0x55eae21dcbb1 in perf_session__process_user_event util/session.c:1679
>     #8 0x55eae21df1b7 in perf_session__process_event util/session.c:1867
>     #9 0x55eae21e622c in process_simple util/session.c:2442
>     #10 0x55eae21e527c in reader__read_event util/session.c:2371
>     #11 0x55eae21e5bbc in reader__process_events util/session.c:2420
>     #12 0x55eae21e69e5 in __perf_session__process_events util/session.c:2467
>     #13 0x55eae21e991d in perf_session__process_events util/session.c:2633
>     #14 0x55eae1d248dc in __cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:989
>     #15 0x55eae1d30f76 in cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:1709
>     #16 0x55eae200824f in run_builtin /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:323
>     #17 0x55eae2008ad1 in handle_internal_command /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:377
>     #18 0x55eae2009003 in run_argv /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:421
>     #19 0x55eae200972f in main /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:537
>     #20 0x7f77a1854d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)
>
> Direct leak of 64 byte(s) in 2 object(s) allocated from:     <----- also happens on parent
>     #0 0x7f77a26ace8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
>     #1 0x55eae21c15b1 in __maps__insert util/maps.c:43
>     #2 0x55eae21c1a2a in maps__insert util/maps.c:70
>     #3 0x55eae22038ba in thread__insert_map util/thread.c:355
>     #4 0x55eae21a9bed in machine__process_mmap2_event util/machine.c:1959
>     #5 0x55eae2069f70 in perf_event__process_mmap2 util/event.c:379
>     #6 0x55eae21dac1e in machines__deliver_event util/session.c:1569
>     #7 0x55eae21dc2f5 in perf_session__deliver_event util/session.c:1645
>     #8 0x55eae21c7f35 in ordered_events__deliver_event util/session.c:188
>     #9 0x55eae21f7824 in do_flush util/ordered-events.c:245
>     #10 0x55eae21f863f in __ordered_events__flush util/ordered-events.c:324
>     #11 0x55eae21f8b1a in ordered_events__flush util/ordered-events.c:342
>     #12 0x55eae21e6a08 in __perf_session__process_events util/session.c:2471
>     #13 0x55eae21e991d in perf_session__process_events util/session.c:2633
>     #14 0x55eae1d248dc in __cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:989
>     #15 0x55eae1d30f76 in cmd_report /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/builtin-report.c:1709
>     #16 0x55eae200824f in run_builtin /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:323
>     #17 0x55eae2008ad1 in handle_internal_command /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:377
>     #18 0x55eae2009003 in run_argv /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:421
>     #19 0x55eae200972f in main /usr/src/perf_selftests-x86_64-rhel-8.3-bpf-a0c41caebab2fa224454d50dd4e29ae008ead25f/tools/perf/perf.c:537
>     #20 0x7f77a1854d09 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x23d09)
>
>
>
> To reproduce:
>
>         git clone https://github.com/intel/lkp-tests.git
>         cd lkp-tests
>         sudo bin/lkp install job.yaml           # job file is attached in this email
>         bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run
>         sudo bin/lkp run generated-yaml-file
>
>         # if come across any failure that blocks the test,
>         # please remove ~/.lkp and /lkp dir to run from a clean state.
>
>
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
>
>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-28  4:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202307271322.40c2fc50-oliver.sang@intel.com>
2023-07-28  4:08 ` [linus:master] [perf pmu] a0c41caeba: kmsg.sanitizer.direct_leak/__interceptor_malloc/perf_cpu_map__alloc/perf_cpu_map__empty_new/cpu_map__from_range/cpu_map__new_data/perf_event__fprintf_event_update Ian Rogers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).