Subject: Re: sun-jre14 Java VM issues - out of memory
To: None <port-i386@netbsd.org>
From: David Brownlee <abs@NetBSD.org>
List: port-i386
Date: 03/15/2005 11:39:39
 	Further to this, switching to sun-jre15 does not help,
 	but using '-server -XX:MaxPermSize=128m' does seem to
 	help things run for longer before the failure occurs.

 	http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4957990

 	Dropping -server also seems to help, but not as much
 	as using '-server -XX:MaxPermSize=128m'.

 	So... a partial workaround, but still no fix


On Thu, 10 Mar 2005, David Brownlee wrote:

> 	Anyone seeing strangeness with sun-jre14 under NetBSD 2.0?
> 	Using the suse91 libraries, running a largist tomcat application.
> 	Sooner or later it gets into a tight loop running the garbage
> 	collector continually and reporting out of memory.
>
> 	Running with -Xloggc gives a log full of:
>
> 	    603.217: [Full GC 128686K->128686K(303808K), 0.7896230 secs]
> 	    604.008: [Full GC 128686K->128686K(303808K), 0.8244400 secs]
> 	    [...]
>
> 	Its run with:
>
> 	     -server -Xss1m -Xms300m -Xmx300m -Djava.awt.headless=true
>
> 	values from 200m to 800m have been tried  - the number in
> 	parenthesis reflected the desired memory to use, but it always
> 	gets to around 130M and hits this loop.
>
> 	The shell is unlimited before starting the java process, a
> 	sample list of limits would be:
>
> 	    proc.29527.corename = %n.core
> 	    proc.29527.rlimit.cputime.soft = unlimited
> 	    proc.29527.rlimit.cputime.hard = unlimited
> 	    proc.29527.rlimit.filesize.soft = unlimited
> 	    proc.29527.rlimit.filesize.hard = unlimited
> 	    proc.29527.rlimit.datasize.soft = 1073741824
> 	    proc.29527.rlimit.datasize.hard = 1073741824
> 	    proc.29527.rlimit.stacksize.soft = 2093056
> 	    proc.29527.rlimit.stacksize.hard = 33554432
> 	    proc.29527.rlimit.coredumpsize.soft = unlimited
> 	    proc.29527.rlimit.coredumpsize.hard = unlimited
> 	    proc.29527.rlimit.memoryuse.soft = unlimited
> 	    proc.29527.rlimit.memoryuse.hard = unlimited
> 	    proc.29527.rlimit.memorylocked.soft = unlimited
> 	    proc.29527.rlimit.memorylocked.hard = unlimited
> 	    proc.29527.rlimit.maxproc.soft = 4085
> 	    proc.29527.rlimit.maxproc.hard = 4085
> 	    proc.29527.rlimit.descriptors.soft = 65536
> 	    proc.29527.rlimit.descriptors.hard = 65536
> 	    proc.29527.stopfork = 0
> 	    proc.29527.stopexec = 0
> 	    proc.29527.stopexit = 0
>
> 	maxproc is 4096 and maxfiles is 65536, and neither of those
> 	should be being hit.
>
> 	Interestingly a ktrace of an affected process includes:
>
> 16955 java     CALL  mincore(0xae5ff438,0)
> 16955 java     RET   mincore 0
> 16955 java     CALL  ntp_gettime(2,0,0xae5ff228,8)
> 16955 java     RET   ntp_gettime 0
> 16955 java     CALL  #179 (unimplemented)(0xae5ff228,8)
> 11961 java     CALL  kill(0x7298, SIGPWR)
> 11961 java     RET   kill 0
> 29336 java     RET   #179 (unimplemented) -1 errno -4 Unknown error: 
> 4294967292
> 29336 java     PSIG  SIGRT0 caught handler=0x48076fd0 mask=(3))
> 29336 java     CALL  #119 (obsolete resuba)(0xbd7ff3d4)
> 29336 java     RET   #119 (obsolete resuba) JUSTRETURN
> 29336 java     CALL  ntp_gettime(2,0,0xbd7ff440,8)
> 29336 java     RET   ntp_gettime 0
> 29336 java     CALL  #179 (unimplemented)(0xbd7ff440,8)
> 11961 java     CALL  kill(0x7298, SIGPWR)
> 11961 java     RET   kill 0
> 29336 java     RET   #179 (unimplemented) -1 errno -4 Unknown error: 
> 4294967292
> 29336 java     PSIG  SIGRT0 caught handler=0x48076fd0 mask=(3))
> 29336 java     CALL  #119 (obsolete resuba)(0xbd7ff3cc)
> 29336 java     RET   #119 (obsolete resuba) JUSTRETURN
> 29336 java     CALL  ntp_gettime(2,0,0xbd7ff510,8)
> 29336 java     RET   ntp_gettime 0
> 29336 java     CALL  #179 (unimplemented)(0xbd7ff510,8)
> 11961 java     CALL  kill(0x7298, SIGPWR)
> 11961 java     RET   kill 0
> 29336 java     RET   #179 (unimplemented) -1 errno -4 Unknown error: 
> 4294967292
> 29336 java     PSIG  SIGRT0 caught handler=0x48076fd0 mask=(3))
> 29336 java     CALL  #119 (obsolete resuba)(0xbd7ff49c)
> 29336 java     RET   #119 (obsolete resuba) JUSTRETURN
> 29336 java     CALL  ntp_gettime(2,0,0xbd7ff4c4,8)
> 29336 java     RET   ntp_gettime 0
> 29336 java     CALL  #179 (unimplemented)(0xbd7ff4c4,8)
> 11961 java     CALL  kill(0x7298, SIGPWR)
> 11961 java     RET   kill 0
> 29336 java     RET   #179 (unimplemented) -1 errno -4 Unknown error: 
> 4294967292
> 29336 java     PSIG  SIGRT0 caught handler=0x48076fd0 mask=(3))
> 29336 java     CALL  #119 (obsolete resuba)(0xbd7ff450)
> 29336 java     RET   #119 (obsolete resuba) JUSTRETURN
> 29336 java     CALL  ntp_gettime(2,0,0xbd7ff4f8,8)
> 29336 java     RET   ntp_gettime 0
> 29336 java     CALL  #179 (unimplemented)(0xbd7ff4f8,8)
> 11961 java     CALL  kill(0x7298, SIGPWR)
> 11961 java     RET   kill 0
> 29336 java     RET   #179 (unimplemented) -1 errno -4 Unknown error: 
> 4294967292
> 29336 java     PSIG  SIGRT0 caught handler=0x48076fd0 mask=(3))
> 29336 java     CALL  #119 (obsolete resuba)(0xbd7ff484)
> 29336 java     RET   #119 (obsolete resuba) JUSTRETURN
> 29336 java     CALL  ntp_gettime(2,0,0xbd7ff494,8)
> 29336 java     RET   ntp_gettime 0
> 29336 java     CALL  #179 (unimplemented)(0xbd7ff494,8)
> 11961 java     CALL  ntp_gettime(2,0,0xbd9ff544,8)
> 11961 java     RET   ntp_gettime 0
> 11961 java     CALL  #179 (unimplemented)(0xbd9ff544,8)
> 12631 java     CALL  mincore(0xbdbff9cc,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  mincore(0xbdbff9cc,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  mincore(0xbdbff878,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  mincore(0xbdbff88c,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  mincore(0xbdbff878,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  mincore(0xbdbff734,0)
> 12631 java     RET   mincore 0
> 12631 java     CALL  write(3,0x64284000,0x11)
> 12631 java     GIO   fd 3 wrote 17 bytes
>       "424.229: [Full GC"
>
>
>
>

-- 
 		David/absolute       -- www.NetBSD.org: No hype required --