From owner-freebsd-bugs@freebsd.org Fri Jan 22 17:33:03 2016 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 568E5A8DCB1 for ; Fri, 22 Jan 2016 17:33:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30E1D19A0 for ; Fri, 22 Jan 2016 17:33:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0MHX3Hm085277 for ; Fri, 22 Jan 2016 17:33:03 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 206334] [ath] panic integer divide fault Date: Fri, 22 Jan 2016 17:33:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: jhb@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: rep_platform cc short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 17:33:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206334 John Baldwin changed: What |Removed |Added ---------------------------------------------------------------------------- Hardware|amd64 |Any CC| |adrian@freebsd.org, | |jhb@FreeBSD.org Summary|panic integer divide fault |[ath] panic integer divide | |fault --- Comment #1 from John Baldwin --- >From the core.txt, the crash occurred due to a divide by zero in the ath(4) driver. Specifically, this line in ar9300_ani.c: ofdm_phy_err_rate =3D ani_state->ofdm_phy_err_count * 1000 / ani_state->listen_time; This means 'listen_time' must be zero. Some other places in the debugging code handle the listen_time =3D=3D 0 case explicitly, e.g.: /* express ofdm_phy_err_count as errors/second */ log_data.ofdm_phy_err_count =3D ani_state->listen_time ? ani_state->ofdm_phy_err_count * 1000 / ani_state->listen_time := 0; /* express cck_phy_err_count as errors/second */ log_data.cck_phy_err_count =3D ani_state->listen_time ? ani_state->cck_phy_err_count * 1000 / ani_state->listen_time := 0; There is this comment here where listen_time is updated: /* XXX beware of overflow? */ ani_state->listen_time +=3D listen_time; I suspect you were bitten by the overflow wrapping to zero. I've added Adr= ian who might have a suggestion on how best to handle the overflow to zero. The code is the same in HEAD so I suspect this is busted there as well. --=20 You are receiving this mail because: You are the assignee for the bug.=