Re: resource leak in linux emulation?

2014-05-05 Thread Matthew Mondor
On Mon, 5 May 2014 15:43:56 +1200 Mark Davies m...@ecs.vuw.ac.nz wrote: On Mon, 05 May 2014, Christos Zoulas wrote: I wrote: So can someone suggest where exactly the patch should go. And isn't proc_lock held at this point (entered at line 344, exit at line 569)? How about this?

Re: resource leak in linux emulation?

2014-05-05 Thread Sergio Lopez
On 05/05/2014 07:22 AM, Matthew Mondor wrote: I also see emulation-code specific exit hooks support, I've not checked if it's really possible, but could that linux-specific case be solved there instead of in the generic code if so? This is a bug in the generic LWP code. It just happens that,

Re: resource leak in linux emulation?

2014-05-05 Thread Thor Lancelot Simon
On Mon, May 05, 2014 at 09:54:04AM +0200, Sergio Lopez wrote: On 05/05/2014 07:22 AM, Matthew Mondor wrote: I also see emulation-code specific exit hooks support, I've not checked if it's really possible, but could that linux-specific case be solved there instead of in the generic code if so?

Re: resource leak in linux emulation?

2014-05-05 Thread Christos Zoulas
On May 5, 3:43pm, m...@ecs.vuw.ac.nz (Mark Davies) wrote: -- Subject: Re: resource leak in linux emulation? | On Mon, 05 May 2014, Christos Zoulas wrote: | I wrote: | So can someone suggest where exactly the patch should go. And | isn't proc_lock held at this point (entered at line 344, exit

Re: resource leak in linux emulation?

2014-05-04 Thread Christos Zoulas
In article 201405040936.21907.m...@ecs.vuw.ac.nz, Mark Davies m...@ecs.vuw.ac.nz wrote: On Thu, 24 Apr 2014 07:18:10 David Laight wrote: To fix, this should be added somewhere, probably at sys/kern/kern_exit.c:487 (but I'm not sure if there's a better location): if ((l-l_pflag

Re: resource leak in linux emulation?

2014-05-04 Thread Mark Davies
On Mon, 05 May 2014, Christos Zoulas wrote: I wrote: So can someone suggest where exactly the patch should go. And isn't proc_lock held at this point (entered at line 344, exit at line 569)? How about this? Seems good to me and can confirm that its fixed the increasing proc count

Re: resource leak in linux emulation?

2014-05-03 Thread Mark Davies
On Thu, 24 Apr 2014 07:18:10 David Laight wrote: To fix, this should be added somewhere, probably at sys/kern/kern_exit.c:487 (but I'm not sure if there's a better location): if ((l-l_pflag LP_PIDLID) != 0 l-l_lid != p-p_pid) { proc_free_pid(l-l_lid);

Re: resource leak in linux emulation?

2014-04-23 Thread David Laight
On Thu, Apr 17, 2014 at 01:23:15AM +0200, Sergio L?pez wrote: 2014-04-03 11:57 GMT+02:00 Mark Davies m...@ecs.vuw.ac.nz: Note that nprocs (2nd to last value in the /proc/loadavg output) increments every time javac runs until it hits maxproc. You're right, the problem appears when the last

Re: resource leak in linux emulation?

2014-04-16 Thread Sergio López
2014-04-03 11:57 GMT+02:00 Mark Davies m...@ecs.vuw.ac.nz: Note that nprocs (2nd to last value in the /proc/loadavg output) increments every time javac runs until it hits maxproc. You're right, the problem appears when the last thead alive in a multithreaded linux process is not the main

Re: resource leak in linux emulation?

2014-04-03 Thread Mark Davies
On Thursday 27 March 2014 14:00:37 I wrote: So what resource could this be running out of? Coming back to this, looks like nprocs isn't being incremented/decremented properly in some circumstances: test# cat HelloWorld.java public class HelloWorld { public static void main(String[]

Re: resource leak in linux emulation?

2014-03-27 Thread David Laight
On Thu, Mar 27, 2014 at 02:00:37PM +1300, Mark Davies wrote: On a NetBSD/amd64 6.1_STABLE system, I have a perl script that effectively calls /usr/pkg/java/sun-7/bin/javac twice. It doesn't really matter what java file its compiling. If I call this script in an infinite loop, after an hour