Received: by 10.192.165.148 with SMTP id m20csp3422701imm; Mon, 23 Apr 2018 06:24:06 -0700 (PDT) X-Google-Smtp-Source: AIpwx489i71HQtGO5v3gYqMImzHgtaGcdYVU8wQ/qCSq9Ced56P0Ft3rqqlacC7Isw5bPUMtQq4f X-Received: by 10.99.150.18 with SMTP id c18mr17081594pge.361.1524489846703; Mon, 23 Apr 2018 06:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524489846; cv=none; d=google.com; s=arc-20160816; b=eWFj75R/TkWJOEgZuBOJfUKT4yxVegr7rWe3y5vFnP/9ws4/lOgsXsjMeqTTEbHioQ 6bZMlSzRrE2fiJ7BUyKorTh7VKpOeNvfbHtWcg2QrMtMqB/PwWGGGR7cP0vEc3uPQrOl l5KXIW3LJqXrNA6ahAcZaBTMzAVs0IKp3H4guY8T8YXk+alQLG3fqeHTM1mvwbh1XZtS rJ/sS5eiG+J0Khe4odlIuXqwkzw/4Q7v4rcqNtBEjczIVT9HP9LIuN+ZHLN1q0WvSxyb DW93yLOp2ZDbKLx8W8S/5mbc803zovfV5bcII7+z8iH2Nv61BugvvMuhJeXU+2Cyif14 pldA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:arc-authentication-results; bh=WTe+LJYE5SiYDETJOtInAE/ixyuuKkMrFrHCR4xa3UA=; b=QGARMI+p37HgJEQKMlLboT6XwUw+CDuMyMl/nQ7bkD5rGrdpBW6LGpT+yJFYVp+flt Gkt9ZBuQz7CksRhaMBaXhccsJKXURh7yaCTKNgDEKknwFjMifjjn+0UEttOs8dOpXsvu JwKOZyca/Zh7N3iSfE7WErdu7Wxq4Q9j7ONp7BQoV7mRpvT7589oDKveeggegnAbQtG/ vlYDr9ru28+jqY8Vh8zzlQnDANl2zQAdhxrTSnK/YjAgvfQG3jq/0bMOujRmXwO6U5NE sTlsjgLbBtDzvGC9NlE04zn3c+7kroo4D6oYfL4kT6DlCMWNGTc7BspXqg1pKivNp91z 2NvQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2si6490541pgm.360.2018.04.23.06.23.52; Mon, 23 Apr 2018 06:24:06 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755262AbeDWNWT convert rfc822-to-8bit (ORCPT + 99 others); Mon, 23 Apr 2018 09:22:19 -0400 Received: from mga05.intel.com ([192.55.52.43]:42541 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755209AbeDWNWQ (ORCPT ); Mon, 23 Apr 2018 09:22:16 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Apr 2018 06:22:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,318,1520924400"; d="scan'208";a="222604731" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga005.fm.intel.com with ESMTP; 23 Apr 2018 06:22:15 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Apr 2018 06:22:14 -0700 Received: from crsmsx103.amr.corp.intel.com (172.18.63.31) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 23 Apr 2018 06:22:14 -0700 Received: from crsmsx101.amr.corp.intel.com ([169.254.1.16]) by CRSMSX103.amr.corp.intel.com ([169.254.4.11]) with mapi id 14.03.0319.002; Mon, 23 Apr 2018 07:22:11 -0600 From: "Wan, Kaike" To: Thomas Gleixner CC: "Marciniszyn, Mike" , "Dalessandro, Dennis" , "Weiny, Ira" , "Fleck, John" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: RE: hrtimer (rdmavt RNR timer) was lost Thread-Topic: hrtimer (rdmavt RNR timer) was lost Thread-Index: AdPYjd2ThjlA5Zo8QY6oOpfcrqyjeQCpnQoAAAvh6fA= Date: Mon, 23 Apr 2018 13:22:11 +0000 Message-ID: <3F128C9216C9B84BB6ED23EF16290AFB634C9420@CRSMSX101.amr.corp.intel.com> References: <3F128C9216C9B84BB6ED23EF16290AFB634C8C87@CRSMSX101.amr.corp.intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzA0MmJjYTktOTllYS00MTZhLTkzMDYtZmYzM2MxMTYyOWZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJuMHdXdDdORncxSXUzaFwvZkZ0RlR3b3pMZk9rMzZvMjZvVFFxd1hJejBSNmxWbGJOTWdnU014ZXZJV1ZaRlU0SyJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.18.205.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Monday, April 23, 2018 8:53 AM > To: Wan, Kaike > Cc: Marciniszyn, Mike ; Dalessandro, Dennis > ; Weiny, Ira ; Fleck, > John ; linux-kernel@vger.kernel.org; linux- > rdma@vger.kernel.org > Subject: Re: hrtimer (rdmavt RNR timer) was lost > > On Fri, 20 Apr 2018, Wan, Kaike wrote: > > Please do not send html mail. It's rejected by the list server. > > > -0 [001] d.h. 3598473310671: hrtimer_start: > hrtimer=00000000708914d7 function=rvt_rc_rnr_retry [rdmavt] > expires=712172295802 softexpires=712172295802mode=REL > base=0000000066dda1ea next=0000000039cae92b > > -0 [001] d.h. 3598473311561: hrtimer_post_add: > hrtimer=00000000708914d7 function=rvt_rc_rnr_retry [rdmavt] > base=0000000066dda1ea next=0000000039cae92b > > > > > --> The target was first added. The expires was 712172295802. The call > > was made from cpu 1 while the timer base was on cpu 3. > > > -0 [003] dn.. 3598605305357: hrtimer_start: > hrtimer=0000000004346740 function=tick_sched_timer > expires=716767000000 softexpires=716767000000mode=ABS|PINNED > base=0000000066dda1ea next=00000000708914d7 > > -0 [003] dn.. 3598605305781: hrtimer_post_add: > hrtimer=0000000004346740 function=tick_sched_timer > base=0000000066dda1ea next=00000000708914d7 > > > > --> the target timer was the next one to trigger. The call was from cpu 3. > > > > -0 [003] dN.. 3598605306604: hrtimer_pre_remove: > hrtimer=0000000004346740 function=tick_sched_timer > base=0000000066dda1ea next=00000000708914d7 > > -0 [003] dN.. 3598605306802: hrtimer_post_remove: > hrtimer=0000000004346740 function=tick_sched_timer > base=0000000066dda1ea next=00000000708914d7 > > > > --> The tick_sched_timer was removed > > > > -0 [003] dN.. 3598605307236: hrtimer_start: > hrtimer=0000000004346740 function=tick_sched_timer > expires=712171000000 softexpires=712171000000mode=ABS|PINNED > base=0000000066dda1ea next=00000000708914d7 > > -0 [003] dN.. 3598605307601: hrtimer_post_add: > hrtimer=0000000004346740 function=tick_sched_timer > base=0000000066dda1ea next=0000000004346740 > > > > --> The tick_sched_timer was added again with a new expires > > --> (712171000000 > > < 716767000000), which replaced the target (712172295802) as the > > head->next. > > > > -0 [002] d.h. 3598605313255: hrtimer_start: > hrtimer=00000000662d2dd8 function=rvt_rc_rnr_retry [rdmavt] > expires=712172915662 softexpires=712172915662mode=REL > base=0000000066dda1ea next=0000000004346740 > > -0 [002] d.h. 3599538740786: hrtimer_post_add: > hrtimer=00000000662d2dd8 function=rvt_rc_rnr_retry [rdmavt] > base=0000000066dda1ea next=00000000662d2dd8 > > > > > > --> A new hrtimer (00000000662d2dd8) was added (from cpu 2). Its > > --> expires > > (712172915662) was larger than the target's (712172295802). How could > > it become the next hrtimer to trigger??? The next pointer was not set > > properly here. > > I have no idea how that can happen assumed that you did not strip anything > from the trace. If you stripped stuff, please send me the full trace or upload > it somewhere. > > Can you apply the following debug patch and enable the hrtimer_start trace > point and send me the full trace or upload it somewhere? The original trace was about 29GB and I filtered it with "0000000066dda1ea" (the offending base) to generate a 1.4GB file that I could open and investigate. I am not sure how I can send them to you. Do you have somewhere I can upload to? I can try your debug patch and again I am anticipating a big trace file. Kaike > > Thanks, > > tglx > > 8<------------------------- > --- a/lib/timerqueue.c > +++ b/lib/timerqueue.c > @@ -57,6 +57,10 @@ bool timerqueue_add(struct timerqueue_he > rb_link_node(&node->node, parent, p); > rb_insert_color(&node->node, &head->head); > > + trace_printk("head %p next %p next->exp %llu node %p node- > >exp %llu\n", > + head, head->next, head->next ? head->next->expires : > 0ULL, > + node, node->expires); > + > if (!head->next || node->expires < head->next->expires) { > head->next = node; > return true; > @@ -84,6 +88,11 @@ bool timerqueue_del(struct timerqueue_he > > head->next = rb_entry_safe(rbn, struct timerqueue_node, > node); > } > + > + trace_printk("head %p next %p next->exp %llu node %p node- > >exp %llu\n", > + head, head->next, head->next ? head->next->expires : > 0ULL, > + node, node->expires); > + > rb_erase(&node->node, &head->head); > RB_CLEAR_NODE(&node->node); > return head->next != NULL;