Re: [9fans] panic
  Home FAQ Contact Sign in
comp.os.plan9 only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: [9fans] panic         

Group: comp.os.plan9 · Group Profile
Author: erik quanstrom
Date: Sep 17, 2008 06:23

> hi,
> i got the following panic in a kernel I compiled today:
>
> panic: D2B called on non-block f0d72af8 (double-free?)
> panic: D2B called on non-block f0d72af8 (double-free?)
> dumpstack disabled
> cpu0: exiting
>
> it happen evertime i plug a usb device in. i don't know how
> to debug this. any suggestions?
> with my old kernel(2008-04-30) everthing works fine.

it's very difficult to say without access to
a) the stack dump and
b) the kernel in question.
this is because it's hard to find this sort of problem without
knowing where the problem occurred. the stack dump
will provide addresses and the kernel image will be
enough to tie addresses to particular bits of code.

as an unrelated aside, this reference counting updates uninitialized memory.

/n/sources/plan9/sys/src/9/pc/usbohci.c:1454,1455
if(dirin == Dirout && bp)
_xinc(&bp->ref);

since the definition for _allocb is so

if((b = mallocz(sizeof(Block)+size+Hdrspc, 0)) == nil)
return nil;

b->next = nil;
b->list = nil;
b->free = 0;
b->flag = 0;
[...]

either the unused reference counting needs to be dropped, usbohci
needs to initialize its own reference count or _allocb needs to initialize
it to 1. i assume the reason blocks are not zeroed is for performance
reasons.

i'm not sure i understand a reference count for a Block, since i thought
part of deal was that each Block has a unique owner. am i wrong?

- erik
1 Comment
diggit! del.icio.us! reddit!

RELATED THREADS
SubjectArticles qty Group
Re: kern/89633: [sis] [panic] if_sis panic under extended load in 6.0-RELEASEfa.freebsd.bugs ·
Re: kern/111458: [panic] Panic on 6.2-RELEASE AMD in kern_mutexfa.freebsd.bugs ·