Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: try KMGUARD and debug_freecheck=1



On Mon, Mar 12, 2012 at 11:36:57PM +0000, Mindaugas Rasiukevicius wrote:
> [...]
> Also, there is another debugging facility.  Try setting debug_freecheck
> to 1 early in DDB.  I wonder if we are doing good enough job in catching
> wrong kmem_free() arguments.

This makes the whole system very slow. After running for several hours, I
got:
freecheck_in: 0xfffffe811073c540 not out
freecheck_in: 0xfffffe81b5516a50 not out
fatal breakpoint trapfatal breakpoint trap in supervisor mode
 in supervisor mode
trap type 1 code 0 rip ffffffff80256715 cs 8 rflags 286 cr2  7f7fe9800060 cpl 0 
rsp fffffe810bf147d0
freecheck_in: 0xfffffe8110c01ea8 not out
fatal breakpoint trap in supervisor mode
                                        Stopped in pid 28522.1 (t_io) at        
netbsd:breakpoint+0x5:  leave
db{3}> tr          
breakpoint() at netbsd:breakpoint+0x5
pool_cache_put_paddr() at netbsd:pool_cache_put_paddr+0x2f
pmap_enter_ma() at netbsd:pmap_enter_ma+0x559
pmap_enter_default() at netbsd:pmap_enter_default+0x1d
uvm_fault_lower_enter() at netbsd:uvm_fault_lower_enter+0xfe
uvm_fault_internal() at netbsd:uvm_fault_internal+0xbe6
trap() at netbsd:trap+0x59c
--- trap (number 6) ---
7f7ff28090b7:
db{3}> 
(gdb) l *(pmap_enter_ma+0x559)
0xffffffff806126d7 is in pmap_enter_ma 
(/dsk/l1/misc/bouyer/quota2/src/sys/arch/x86/x86/pmap.c:4100).
4095                    pool_cache_put(&pmap_pv_cache, old_pve);
4096            }
4097            if (new_pve != NULL) {
4098                    pool_cache_put(&pmap_pv_cache, new_pve);
4099            }
4100            if (new_pve2 != NULL) {
4101                    pool_cache_put(&pmap_pv_cache, new_pve2);
4102            }

But note the multiple freecheck_in messages: it looks like several
CPUs started failing at the same time. Just as if freecheck suddendly
started failing. So maybe freecheck's lists got corrupted ?

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index