NetBSD-Bugs archive

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

Re: kern/48586: Kern complains proc table full even when it is is not



The following reply was made to PR kern/48586; it has been noted by GNATS.

From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/48586: Kern complains proc table full even when it is is not
Date: Mon, 10 Feb 2014 18:56:58 +0000

 On Mon, Feb 10, 2014 at 04:05:00PM +0000, kivinen%iki.fi@localhost wrote:
 > >Number:         48586
 > >Category:       kern
 > >Synopsis:       The kernel complais that proc table is full even when it is 
 > >not
 > 
 > The problem occurred with GENERIC kernel too, so that change should
 > not cause it.
 > 
 > >Description:
 > 
 >      I am creating garmin maps using the java tools (osmosis,
 >      splitter, mkgmap). The java tools use sun-jre7-7.0.45 from
 >      pkgsrc. After 15 or so hours of continously running scripts
 >      the scripts start to complain:
 ...
 >      Feb 10 17:24:37 haste /netbsd: proc: table is full - increase 
 > kern.maxproc or NPROC
 
 Hmmm.. confusing error messages.
 Nothing wrong with the the 'proc table' the count of active processes
 (aka nproc) had exceeded kern.maxproc.
 
 (The table itself also holds entries for process groups (etc), and is
 fully dynamically sized.)
 
 >      Looking at my kern.maxproc (8000) and number of times I have
 >      run those linux emulation java programs, it might be that
 >      actually every single linux emulation java program leaks one
 >      kernel proc table entry.
 
 A quick bit of analysis:
 The linux_clone_nptl() code allocated a 'pid' for the lwps 'lid'
 (netbsd usually uses per-process lid values).
 This is counted against nproc.
 The flag LWP_PIDLID is passed to lwp_create() which then allocates
   a pid and sets LP_PIDLID.
 When the lwp exits proc_free_pid() is called to free the pid slot
   which then decrements nprocs.
 
 Somewhere that must be going wrong.
 It isn't actually clear whether a pid number actually gets allocated
 and this isn't freed.
 I think some values in the linux /proc show the value of nproc (but
 we know that goes up).
 If a lot of pid number are actually allocated then values larger than
 30000 will start being issued.
 
 Might be worth a kernel with a few printfs...
 
        David
 
 -- 
 David Laight: david%l8s.co.uk@localhost
 


Home | Main Index | Thread Index | Old Index