RE: TCP socket shutdown race condition

2003-08-20 Thread Ed Maste
>Well, I guess the spl() fix is probably going to be the quickest here >then, please send it to me once you've pounded on it, Ed. So my spl() fix seems to eliminate the problem for me but while I'm looking at this stuff I want to make sure there aren't any related cases left in. My current patch i

RE: TCP socket shutdown race condition

2003-08-14 Thread Mike Silbersack
On Wed, 13 Aug 2003, Ed Maste wrote: > I think I've found the problem. > > crfree() is called from a lot of places (I counted at least 20) including > sodealloc() in the socket code, crcopy() etc. It's called at splnet() from > sodealloc(). I'm not sure what spl (if any) it might be called at

RE: TCP socket shutdown race condition

2003-08-14 Thread John Baldwin
On 13-Aug-2003 Mike Silbersack wrote: > > On Wed, 13 Aug 2003, Ed Maste wrote: > >> I think I've found the problem. >> >> crfree() is called from a lot of places (I counted at least 20) including >> sodealloc() in the socket code, crcopy() etc. It's called at splnet() from >> sodealloc(). I'm

RE: TCP socket shutdown race condition

2003-08-14 Thread Mike Silbersack
On Thu, 14 Aug 2003, John Baldwin wrote: > In that case, CPU 2 uses an IPI to "push" the interrupt over to CPU 1 > since CPU 1 is in the kernel. CPU 2 will not handle an interrupt unless > it can get the giant lock. > > -- > > John Baldwin <[EMAIL PROTECTED]> <>< http://www.FreeBSD.org/~jhb/

RE: TCP socket shutdown race condition

2003-08-14 Thread Ed Maste
Mike "Silby" Silbersack wrote: >Well, as ui_ref is the best bet, redoing your tests with it expanded to >ui_int is where we need to start before looking further. :) > >I believe that a uidinfo->ui_ref over/underflow could cause random memory >corruption, so maybe the panic you're seeing comes abou

RE: TCP socket shutdown race condition

2003-08-05 Thread Scot Loach
PM To: Scot Loach Cc: '[EMAIL PROTECTED]' Subject: RE: TCP socket shutdown race condition On Sat, 2 Aug 2003, Scot Loach wrote: > I don't think that's the problem, although it does seem suspicious. > > Here's the struct ucred pointed to by the socket: > > (

RE: TCP socket shutdown race condition

2003-08-02 Thread Mike Silbersack
On Sat, 2 Aug 2003, Scot Loach wrote: > I don't think that's the problem, although it does seem suspicious. > > Here's the struct ucred pointed to by the socket: > > (kgdb) p *so.so_cred > $2 = {cr_ref = 3279453304, cr_uid = 3486088556, cr_ngroups = 1, cr_groups = > { > 0, 3276863080, 3277717

RE: TCP socket shutdown race condition

2003-08-02 Thread Scot Loach
scot. -Original Message- From: Mike Silbersack [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 10:51 PM To: Scot Loach Cc: '[EMAIL PROTECTED]' Subject: Re: TCP socket shutdown race condition On Fri, 1 Aug 2003, Scot Loach wrote: > Earlier this week one of our FreeBS

RE: TCP socket shutdown race condition

2003-08-01 Thread Mike Silbersack
On Fri, 1 Aug 2003, Don Bowman wrote: > > u_short ui_ref; /* reference count */ > > }; > > > > We are pushing in the ~50-~70K TCP connections to this process. > > I think i see what you are suggesting :) > > --don Bingo. Change that u_short to a u_int, and see if that ca

RE: TCP socket shutdown race condition

2003-08-01 Thread Don Bowman
> From: Mike Silbersack [mailto:[EMAIL PROTECTED] > On Fri, 1 Aug 2003, Scot Loach wrote: > > > Earlier this week one of our FreeBSD 4.7 boxes panic'd. > I've posted the > > stack trace at the end of this message. Using google, I've > found several > > references to this panic over the past th

Re: TCP socket shutdown race condition

2003-08-01 Thread Mike Silbersack
On Fri, 1 Aug 2003, Scot Loach wrote: > Earlier this week one of our FreeBSD 4.7 boxes panic'd. I've posted the > stack trace at the end of this message. Using google, I've found several > references to this panic over the past three years, but it seems its never > been taken to root cause. > >