Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Jan 2016 17:33:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 206334] [ath] panic integer divide fault
Message-ID:  <bug-206334-6-8GndRXehjB@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-206334-6@https.bugs.freebsd.org/bugzilla/>
References:  <bug-206334-6@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206334

John Baldwin <jhb@FreeBSD.org> 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 <jhb@FreeBSD.org> ---
>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 on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206334-6-8GndRXehjB>