lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D2B6707.3070908@cisco.com>
Date:	Mon, 10 Jan 2011 13:07:35 -0700
From:	David Ahern <daahern@...co.com>
To:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
CC:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>, tzanussi@...il.com,
	Paul Mackerras <paulus@...ba.org>, imunsie@....ibm.com,
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: perf: commit 55b4462 causes perf record to hang



On 01/10/11 13:00, Arnaldo Carvalho de Melo wrote:
> Em Mon, Jan 10, 2011 at 11:47:43AM -0700, David Ahern escreveu:
>> With latest version of perf-core branch, a variant of perf record hangs:
>> # /tmp/build-perf/perf record -v -e cs -fo /tmp/perf.data  -- sleep 1
>> [ perf record: Captured and wrote 0.003 MB /tmp/perf.data (~120 samples) ]
>>
>> It sits there forever. Back trace is:
>>
>> (gdb) bt
>> #0  0x0000000000447658 in __perf_session__process_events (session=0xab9500, data_offset=208, data_size=2896, file_size=3104, ops=0x685580) at util/session.c:1006
>> #1  0x00000000004107dd in process_buildids () at builtin-record.c:466
>> #2  0x000000000041084d in atexit_header () at builtin-record.c:477
>  
>> git bisect traced the hang to
>>
>> commit 55b44629f599a2305265ae9c77f9d9bcfd6ddc17
>> Author: Thomas Gleixner <tglx@...utronix.de>
>> Date:   Tue Nov 30 17:49:46 2010 +0000
> 
> Can you try with this patch, not reverting tglx's patch?
> 
> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
> index 6fb4694..313dac2 100644
> --- a/tools/perf/util/session.c
> +++ b/tools/perf/util/session.c
> @@ -1007,7 +1007,7 @@ more:
>  	if (size == 0)
>  		size = 8;
>  
> -	if (head + event->header.size >= mmap_size) {
> +	if (head + event->header.size > mmap_size) {
>  		if (mmaps[map_idx]) {
>  			munmap(mmaps[map_idx], mmap_size);
>  			mmaps[map_idx] = NULL;


That does the trick -- perf-record exits fine.

David


> --
> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ