Re: (lightbulb goes off) Re: sockstat not working

看板DFBSD_bugs作者時間21年前 (2005/02/03 15:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
Matthew Dillon wrote: > Ah ha! I think I'm on to something here. It looks like sysctl is being > asked to report the buffer size but then the second call which fills the > buffer is returning ENOMEM, meaning that the supplied buffer is not > large enough, meaning that sysctl is not calculating the correct buffer > size. > > I think what is going on is that the sysctl code in kern_descrip.c is > not counting threaded processes (which share their descriptor tables) > properly. > > Since your system has a lot of threaded processes, and my system doesn't, > you are hitting the bug and I am not. > > Please try the enclosed patch. I have committed this to HEAD as well > and will slip the stable tag on it once I get confirmation that it > fixes the problem. > > -Matt > Matthew Dillon > <dillon@backplane.com> > >Index: kern_descrip.c >=================================================================== >RCS file: /cvs/src/sys/kern/kern_descrip.c,v >retrieving revision 1.38 >diff -u -r1.38 kern_descrip.c >--- kern_descrip.c 14 Jan 2005 19:28:10 -0000 1.38 >+++ kern_descrip.c 2 Feb 2005 20:33:47 -0000 > > [snip] Looks like this did the trick Matt, I think it safely can be slipped to Stable. - Erik
文章代碼(AID): #120Smt00 (DFBSD_bugs)
文章代碼(AID): #120Smt00 (DFBSD_bugs)