Received: by 10.223.164.202 with SMTP id h10csp1487576wrb; Wed, 15 Nov 2017 22:04:19 -0800 (PST) X-Google-Smtp-Source: AGs4zMaHY7eozifbmf6oezKVb9hqjUFFYqR4C3xWM2sDLt6FfVgzLhYlx4Kl9skn7+MDntceHany X-Received: by 10.99.95.133 with SMTP id t127mr605150pgb.368.1510812259330; Wed, 15 Nov 2017 22:04:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510812259; cv=none; d=google.com; s=arc-20160816; b=zpDLZDuHxFvTdAKyd5gFzv9SwRH/+np8gEIAcLysXqdMKloypfdD+wcA+0hdoCwin8 OvN9k8p+oMGrJ0EBL/bXMnG7+bTceLLK9BDCyFzYP3eDL67h3vxvW5tJmkLOxirqBWZl f6UU328Fm8RhcjeQ8F19pdBHSNiZoZr+KMonwWI3RnrCx+ONJ1CuEOkEvEINZbbFeLa9 vxOQ06+BossP3ExVotycnVQnQlrkD6UrovvGnuoLJWMjQDcaFToXj+5AuZxSZ0yWq8R1 qYyZCUJ2zA60qIz2EWhJc7BxwO80cGZnZnEpnQrfGM9EtrEBkV6t7uub3fsDwMkiCftY ciqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:cc:to:subject:arc-authentication-results; bh=ly9RM7mhUf/BrGgJu06DteOBrf8mkgcra9obDKCAd7w=; b=w8ZiDfh//LXd3JdF6nBwUQV58uxF9HzJU9ZCz/jvACRM2zdGwBuPGDEvyxuYl1W5al /IDSfwZR0XsKmz/JdxGXOdcwld1Ouhb4U7YoOXjUOwUKH9Crpc2tflrV2b+5YEy6dl5x NdKPuHRBcwVwC16PqG+LPTWgDUqhmHJSrqIWmPd0AINY6MiMqCQ1F5grG+qu0PlLdwUI FwDCgrZl5rLTa/2yF7KxmalJHF2OdkyOLQ0s31ICSKNm3AHC5zfrsBIVsq0lwlR2ioa0 a1aHKS+9efrYengtzaGnFuu6i4nw4Gu7mC1c1E4iD0Fdh2rG5kovc0dB2PRVMv6cZGjJ pwDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61si308459plb.218.2017.11.15.22.04.07; Wed, 15 Nov 2017 22:04:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758612AbdKPE1i (ORCPT + 89 others); Wed, 15 Nov 2017 23:27:38 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:45758 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755109AbdKPE1d (ORCPT ); Wed, 15 Nov 2017 23:27:33 -0500 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAG4OEjv061812 for ; Wed, 15 Nov 2017 23:27:32 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0b-001b2d01.pphosted.com with ESMTP id 2e91wyvcbw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 15 Nov 2017 23:27:32 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 16 Nov 2017 04:27:30 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 16 Nov 2017 04:27:27 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAG4RQIk48562176; Thu, 16 Nov 2017 04:27:26 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33F68AE04D; Thu, 16 Nov 2017 04:20:50 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 71128AE055; Thu, 16 Nov 2017 04:20:48 +0000 (GMT) Received: from [9.124.35.112] (unknown [9.124.35.112]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 16 Nov 2017 04:20:48 +0000 (GMT) Subject: Re: [PATCH 16/35] perf annotate: Add samples into struct annotation_line To: Jiri Olsa Cc: Jiri Olsa , Arnaldo Carvalho de Melo , lkml , Ingo Molnar , Namhyung Kim , David Ahern , Peter Zijlstra , Andi Kleen , ravi.bangoria@linux.vnet.ibm.com References: <20171011150158.11895-1-jolsa@kernel.org> <20171011150158.11895-17-jolsa@kernel.org> <20171113201438.GB26900@krava> <20171114093114.GA25679@krava> <2d6af5ff-dad9-f2a1-e183-5dc79f91702b@linux.vnet.ibm.com> <20171114102954.GA29512@krava> <20171115140429.GA3661@krava> From: Ravi Bangoria Date: Thu, 16 Nov 2017 09:57:45 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171115140429.GA3661@krava> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17111604-0020-0000-0000-000003CCDEB2 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17111604-0021-0000-0000-000042621652 Message-Id: <41102853-a663-d3a1-8822-3bbfbc5c1aa8@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-16_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711160060 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jiri, On 11/15/2017 07:34 PM, Jiri Olsa wrote: > On Tue, Nov 14, 2017 at 11:29:54AM +0100, Jiri Olsa wrote: >> On Tue, Nov 14, 2017 at 03:45:27PM +0530, Ravi Bangoria wrote: >>> Hi Jiri, >>> >>> On 11/14/2017 03:01 PM, Jiri Olsa wrote: >>>> On Mon, Nov 13, 2017 at 09:14:38PM +0100, Jiri Olsa wrote: >>>>> On Mon, Nov 13, 2017 at 09:16:20PM +0530, Ravi Bangoria wrote: >>>>>> Hi Jiri, >>>>>> >>>>>> This patch seems to be causing segfault with "perf top --stdio". >>>>>> >>>>>> Steps to reproduce: >>>>>> 1. start "perf top --stdio" in one terminal >>>>>> 2. run some simple workload in another terminal, let it get finished. >>>>>> 3. annotate function from previous workload in perf top (press 'a' followed >>>>>> by 's') >>>>>> >>>>>> Perf will crash with: >>>>>> >>>>>>   perf: Segmentation fault >>>>>>   Obtained 8 stack frames. >>>>>>   ./perf(sighandler_dump_stack+0x3e) [0x4f1b6e] >>>>>>   /lib64/libc.so.6(+0x36a7f) [0x7ff3aa7e4a7f] >>>>>>   ./perf() [0x4a27fd] >>>>>>   ./perf(symbol__annotate+0x199) [0x4a4439] >>>>>>   ./perf() [0x44e32d] >>>>>>   ./perf() [0x44f098] >>>>>>   /lib64/libpthread.so.0(+0x736c) [0x7ff3acee836c] >>>>>>   /lib64/libc.so.6(clone+0x3e) [0x7ff3aa8bee1e] >>>>>> >>>>>> Can you please check. >>>>> hum, I'm getting following crash after resizing the terminal window: >>>>> >>>>> perf: Floating point exception >>>>> Obtained 8 stack frames. >>>>> ./perf(dump_stack+0x2e) [0x510c89] >>>>> ./perf(sighandler_dump_stack+0x2e) [0x510d69] >>>>> /lib64/libc.so.6(+0x36a80) [0x7f9419588a80] >>>>> ./perf(perf_top__header_snprintf+0x208) [0x4f42c1] >>>>> ./perf() [0x453c09] >>>>> ./perf() [0x454ddb] >>>>> /lib64/libpthread.so.0(+0x736d) [0x7f941bc8c36d] >>>>> /lib64/libc.so.6(clone+0x3f) [0x7f9419662e1f] >>>>> Floating point exception (core dumped) >>>>> >>>>> working on fix >>>> so my crash is caused by bogus resize code, I have it working with fix for >>>> memory corruption happening in SIGWINCH signal handler (attached) >>>> could you please check if that fixes the code for you? >>> Yes, this fixes the crash caused by resize. >>> >>> But original crash I reported is still there. Issue seems to be with evsel >>> being NULL and we are trying to de-reference it somewhere inside >>> annotation_line__new(). >>> >>> Will try to spend more time on it. >> right, I can see it now.. we are passing NULL as evsel in >> the top but does not check on that.. attached patch prevents >> the crash for me, but I'll need to double check if that's >> correct fix > I ended up with few other annotation fixes, could you please > check following branch if it's working for you? > > https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git > perf/fixes Changes looks good to me. Thanks, Ravi From 1584144611993874960@xxx Wed Nov 15 15:00:29 +0000 2017 X-GM-THRID: 1580974192078564530 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread