tech-kern archive

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

assertion "solocked(sb->sb_so)" failed [Re: diagnostic assertion "solocked2(so, so2)" failed]

On Wed, Aug 12, 2009 at 04:53:19PM +0200, Manuel Bouyer wrote:
> On Tue, Aug 11, 2009 at 11:09:32AM +0200, Manuel Bouyer wrote:
> > Hi,
> > I got this panic on a netbsd-5 kernel:
> > panic: kernel diagnostic assertion "solocked2(so, so2)" failed: file 
> > "/home/bouyer/src-5/src/sys/kern/uipc_usrreq.c", line 559                   
> >                
> ad@ pointed me to kern/38968 which is the same problem. From his
> analysis it's a broken assertion. I could just remove the KASSERT
> but I suspect other assertions using solocked2() are also broken; this needs
> to be analysed. For now I'm just going to change solocked2() to always return
> true, as suggected by ad.

After doing so I got this panic:

panic: kernel diagnostic assertion "solocked(sb->sb_so)" failed: file 
"/home/bouyer/src-5/src/sys/kern/uipc_socket2.c", line 726                      
fatal breakpoint trap in supervisor mode
trap type 1 code 0 eip c03d033c cs 8 eflags 246 cr2 8077132 ilevel 4
Stopped in pid 16273.1 (sendmail) at    netbsd:breakpoint+0x4:  popl    %ebp
 at netbsd:breakpoint+0x4
 at netbsd:panic+0x1b0
 at netbsd:__kernassert+0x39
at netbsd:sbappend+0x92
uipc_usrreq(c31b6a54,9,c2e6a200,0,0,d18ad300,3,ad8be0,c31b6aac,0) at 
sosend(c31b6a54,0,d5ad8c94,c2e6a200,0,0,d18ad300,9,0,2) at netbsd:sosend+0x403
 at netbsd:soo_write+0x3e
 at netbsd:do_filewritev+0x190
at netbsd:sys_writev+0x37
syscall(d5ad8d48,b3,ab,2b,2b,1,bfbfc3d8,bfbfc398,bb92a0b0,0) at 

this sbappend() is called a few lines after the KASSERT(solocked2(so, so2))
that was triggered before. m is not NULL. At this point this KASSERT
doens't look bogus, it doesn't look safe to get there without a lock held.
Any idea, someone ?

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index