Message8960

Author Adel
Recipients Adel
Date 2014-09-07.12:49:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1410094186.41.0.307888649429.issue2199@psf.upfronthosting.co.za>
In-reply-to
Content
You can duplicate the case by run the following code and monitor the memory:-
        public static void main(String[] args) {

		try {
			Thread.sleep(10 * 1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		
		PySystemState pySystemState = null;
		PythonInterpreter interp = null;
		for (int i = 1; i <= 100000; i++) {
			pySystemState = new PySystemState();
			interp = new PythonInterpreter(null, pySystemState);
			
			interp.cleanup();
			pySystemState.cleanup();
			
			System.out.println("PythonInterpreter number [" + i + "] has been created and cleanup.");
		}
		
		System.gc();
		
		// Please take Heap dump and check the number of objects for type "org.python.core.PySystemState$PySystemStateCloser$ShutdownCloser" 
		try {
			Thread.sleep(5 * 60 * 1000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}

	}
History
Date User Action Args
2014-09-07 12:49:46Adelsetmessageid: <1410094186.41.0.307888649429.issue2199@psf.upfronthosting.co.za>
2014-09-07 12:49:46Adelsetrecipients: + Adel
2014-09-07 12:49:46Adellinkissue2199 messages
2014-09-07 12:49:45Adelcreate