Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp1289094imm; Fri, 12 Oct 2018 15:30:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV622i3toPA07znz/4OKjmEl49uC9CX/w3cQ3sUFErrBGXgJbE6xMOagIGg8PLJ0SPPE3FvEw X-Received: by 2002:a63:5f03:: with SMTP id t3-v6mr7261986pgb.68.1539383404597; Fri, 12 Oct 2018 15:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539383404; cv=none; d=google.com; s=arc-20160816; b=MeU1j8wAZRH7SCoj65GCShJ2ikO3LbCkVVQcm3+OLjj90+pkOtn0VLAGmA/Z9WCfIG hvj87BfTt9qz1N2WkqbwimmF635Yo0ytcS/m27Sfkb3YRAq9Fq4HkG8/rxAoTzILfRBy YzxT+MFIeoQQ9bsT1PNQCCIDeMCqY/1n9ZdJVAQA46k2nDaISlhUFPnMeoQgfgs6KVzc eKDUfhbWhHKPFKPOWh0Dhg9wW9T8+Wt/nZyviQXaxqQJ9Rg4x1KfPsE4L+JOfrQa+uX8 0/RCBp7cMDV9oQsxggfZ0Jpf8L6hu+ehylVVpJQScv1dMaRDOVRZJy8Ru1LZ8rE0Frzk 3pVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9mBxd8++5iLWLQeHP6Fc2ciLAvBMooDMBM2xaKUOwqY=; b=cUnbe4SD2ja7suR3LOLVtSw0B5YBHJyaXRXu/PxDyEny4FA4DM1P1vMHsmqgsIPWQm hzR/3DAz5srX8fgrZgOSWwnieWSeg0ydb98SJIXj0n336Bnq8seBP11BffaW9cOZS342 U6KENvhKxiDiO/Rl7PxveZkUiJ50Dzw52IcPiY8/FL4oRnJIyqlVAe/SLGiQU5WBlrRz iktxr2RuzyofMBRLAU3dmY1B2vfEInl1GriaDD38xNsVq0X6nUGTJSjSM1CQ5hCYBLQ8 B2NFoJqTfkWeKn/jlcJO7h9b/wv+RPpPHq7NuhHIbISLV99G03iyPQP1++ZeN9WfBVDw G5hw== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s130-v6si2599856pfc.81.2018.10.12.15.29.49; Fri, 12 Oct 2018 15:30:04 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726292AbeJMGCV (ORCPT + 99 others); Sat, 13 Oct 2018 02:02:21 -0400 Received: from mga04.intel.com ([192.55.52.120]:24036 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725918AbeJMGCU (ORCPT ); Sat, 13 Oct 2018 02:02:20 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2018 15:27:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,374,1534834800"; d="scan'208";a="99807650" Received: from ssarabia-mobl7.amr.corp.intel.com ([10.7.189.87]) by orsmga002.jf.intel.com with ESMTP; 12 Oct 2018 15:27:47 -0700 Date: Fri, 12 Oct 2018 15:27:44 -0700 From: Solio Sarabia To: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, len.brown@intel.com Cc: solio.sarabia@intel.com, shiny.sebastian@intel.com Subject: Re: turbostat-17.06.23 floating point exception Message-ID: <20181012222743.GA14100@ssarabia-MOBL7.amr.corp.intel.com> References: <20181012182630.GA13352@ssarabia-MOBL7.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20181012182630.GA13352@ssarabia-MOBL7.amr.corp.intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 11:26:30AM -0700, Solio Sarabia wrote: > Hi -- > > turbostat 17.06.23 is throwing an exception on a custom linux-4.16.12 > kernel, on Xeon E5-2699 v4 Broadwell EP, 2S, 22C/S, 44C total, HT off, > VTx off. > > Initially the system had 4.4.0-137. Then I built and installed > linux-4.16.12-default. turbostat works fine for these two versions. > After building linux-4.16.12 for a second time, the older kernel is > renamed and now `ls -l /boot/` (I'm using version without .old suffix): > > vmlinuz-4.16.12-default+ > vmlinuz-4.16.12-default+.old > > grep -i 'turbostat' /var/log/kern.log > > kernel: [ 159.140836] capability: warning: `turbostat' uses 32-bit > capabilities (legacy support in use) > kernel: [ 164.149264] traps: turbostat[1801] trap divide error > ip:407625 sp:7ffe4b0df000 error:0 in turbostat[400000+17000] > > (gdb) > cpu22: MSR_PKGC3_IRTL: 0x00000000 (NOTvalid, 0 ns) > cpu22: MSR_PKGC6_IRTL: 0x00000000 (NOTvalid, 0 ns) > cpu22: MSR_PKGC7_IRTL: 0x00000000 (NOTvalid, 0 ns) > > Program received signal SIGFPE, Arithmetic exception. > 0x0000000000407625 in compute_average (t=0x61a3b0, c=0x61a3d0, p=0x61a480) at turbostat.c:1378 > 1378 average.threads.tsc /= topo.num_cpus; > Why would the cpu topology report 0 cpus? I added a debug entry to cpu_usage_stat and /proc/stat showed it as an extra column. Then fscanf parsing in for_all_cpus() failed, causing the SIGFPE. This is not an issue. Thanks. > Let me know if you need more details. > > Thanks, > -SS