kernel trap 19 with interrupts disabled

Don Bowman don at
Thu Jun 10 14:11:56 GMT 2004

From: Bruce Evans [mailto:bde at]
> ... NMI, output but no debugger, hang, patch to workaround ...

I have applied the patch, and will await the next hang.

Out of curiousity, why not use something like this, so the
timeout is fixed in time, rather than a #? I used the tsc here.

static int
my_stop_cpus(u_int map)
    unsigned long long end_ts = rdtsc() +
                                1ULL * tsc_freq;
    /* send the Xcpustop IPI to all CPUs in map */
    selected_apic_ipi(map, XCPUSTOP_OFFSET, APIC_DELMODE_FIXED);
    while ((stopped_cpus & map) != map)
       /* Wait 1 second */
       if ( rdtsc() > end_ts )
           return 0;
    return 1;

Has anyone else been observing system hangs with
SMP Xeon (P4-based Xeon)? I have been observing this
for more than a year with 4.7. We came up with a workaround
by having a periodic NMI from the perfmon registers,
and having it check for hardclock still incrementing.
The problem we found is that hardclock would stop.
I was hoping it was a race condition in the stable
kernel, but now that i see what is most likely the
same issue on current, i'm starting to wonder. I have
a dual p3 system which has never experienced this problem.


More information about the freebsd-current mailing list