From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E8D78831 for ; Tue, 26 Nov 2024 05:46:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732600010; cv=none; b=TrsuBBKjlImkHeq9hYk3bo+F4PjR5uBku3Wc0Za4VPVoKwBR62c5e4L/2EgwfHSjIk2xCRZVWGRJwC5z3mLPu4wvYXWx7nomvShk3DDfSQpugUlNVO7ErdF85pgyuDVSumG6MxAI01D3NI7yhaLeymBeTxQkZFq07BvBOY7DiGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732600010; c=relaxed/simple; bh=WiXnmHqXp/DmGCZaQxA7MXweFtzFEm7/od9teO7wrec=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=O8ygv0W6oZAF3OUyCjBpQM4wJsoPdbdcLd4vL4aOiYqGIjj/XyKcoV6l+my1q8ICXwGkKF6g/B0WoHSOaj8L+CM9kdyL/L+UGmpcugWrN2APegQdum1M+s5vFaxVlrRWeaqBbSLqM3jdlyFP0+y5stEaBfS00eY/kbuJjUm2FFw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DOPvUNrd; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DOPvUNrd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC4C7C4CECF; Tue, 26 Nov 2024 05:46:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732600010; bh=WiXnmHqXp/DmGCZaQxA7MXweFtzFEm7/od9teO7wrec=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DOPvUNrdcSt93bRmTBKhFoVuSlPH+h/b8ig4tW7hKivYf/W0h0p1NsOlSNzytZcwJ L3JGo6GRcfAiynsRAQodLaDiQnZbscWSPmaWlkSb2xkai6R/x8BYVKpePcD1nQWvJ1 JKpcmW6HIFBmIpWxoKvRae+oh89lmq4XUHvpYL1wYLgITdNsNTDwlZ4vm/fWooXR0l 1WGeLTyJ2pbTW8hcYqZD47Z9PtN3bKpdnKnsok6GY4n7AUapcEwmVut1HgJBU943Aq LgHfIk1dNIPwoiRQeeBpuOHE8DF9HWRP0aujGL0HIyyZBlCLyVcmrOi+u3tC8kwCmq uh+a4wE8rq4yA== Date: Mon, 25 Nov 2024 21:46:48 -0800 From: Namhyung Kim To: Guilherme Amadio Cc: linux-perf-users@vger.kernel.org, acme@kernel.org, irogers@google.com Subject: Re: SIGSEGV on perf's 'Basic parsing test' Message-ID: References: Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Fri, Nov 22, 2024 at 10:49:31PM +0100, Guilherme Amadio wrote: > Dear Arnaldo, Namhyung, Ian, > > I noticed that on perf-tools-next, some new tests fail on my machine > with a segmentation fault. I am on perf-tools-next at the following > commit: 85c60a01b85ee956adf8d46c253fc50f75363e8f. I've added a couple of fixes for the HWMON tests. Can you please test it again with the latest branch? Thanks, Namhyung > > After compiling perf with DEBUG=1 and running the test on gdb, this is > the stack trace that I get from the crash: > > Reading symbols from ./perf... > (gdb) run > Starting program: /home/amadio/src/linux/tools/perf/perf test -F 11 > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/usr/lib64/libthread_db.so.1". > 11.1: Basic parsing test : Ok > event syntax error: 'temp_test_hwmon_event1' > \___ Bad event name > > Unable to find event on a PMU of 'temp_test_hwmon_event1' > > Program received signal SIGSEGV, Segmentation fault. > __GI___libc_free (mem=0x1c0b4908070c0a7a) at malloc.c:3375 > 3375 if (chunk_is_mmapped (p)) /* release mmapped memory. */ > (gdb) bt > #0 __GI___libc_free (mem=0x1c0b4908070c0a7a) at malloc.c:3375 > #1 0x000055555564fbc8 in __zfree (ptr=0x7ffff6c00031) at ../../lib/zalloc.c:13 > #2 0x000055555581997c in evsel__free_stat_priv (evsel=0x5555560d8ca0) at util/stat.c:148 > #3 0x0000555555819c90 in evlist__free_stats (evlist=0x5555560d7d30) at util/stat.c:215 > #4 0x000055555575d0dc in evlist__delete (evlist=0x5555560d7d30) at util/evlist.c:187 > #5 0x00005555557124d9 in do_test (i=0, with_pmu=false, with_alias=false) at tests/hwmon_pmu.c:198 > #6 0x0000555555712587 in test__hwmon_pmu (with_pmu=false) at tests/hwmon_pmu.c:212 > #7 0x000055555571263b in test__hwmon_pmu_without_pmu (test=0x55555605ae40 , subtest=1) at tests/hwmon_pmu.c:229 > #8 0x00005555556c8e9d in start_test (test=0x55555605ae40 , i=10, subi=1, child=0x5555560d7818, width=64, pass=1) at tests/builtin-test.c:424 > #9 0x00005555556c9588 in __cmd_test (suites=0x5555560d73e0, argc=1, argv=0x7fffffffe200, skiplist=0x0) at tests/builtin-test.c:571 > #10 0x00005555556ca0b5 in cmd_test (argc=1, argv=0x7fffffffe200) at tests/builtin-test.c:773 > #11 0x0000555555645459 in run_builtin (p=0x555556047050 , argc=3, argv=0x7fffffffe200) at perf.c:351 > #12 0x0000555555645704 in handle_internal_command (argc=3, argv=0x7fffffffe200) at perf.c:404 > #13 0x0000555555645865 in run_argv (argcp=0x7fffffffe00c, argv=0x7fffffffe000) at perf.c:448 > #14 0x0000555555645bb6 in main (argc=3, argv=0x7fffffffe200) at perf.c:560 > (gdb) quit > > > Please let me know what other information you'd like to have from my system. > The CPU is an AMD 3950X and the motherboard is an ASUS Pro WS X570-ACE if that > helps. > > $ uname -a > Linux gentoo.cern.ch 6.12.0-gentoo #1 SMP PREEMPT_DYNAMIC Mon Nov 18 16:50:03 CET 2024 x86_64 AMD Ryzen 9 3950X 16-Core Processor AuthenticAMD GNU/Linux > $ dmesg | sed -ne '/DMI/{p; q}' > [ 0.000000] DMI: ASUS System Product Name/Pro WS X570-ACE, BIOS 4902 08/29/2024 > > Best regards, > -Guilherme >