cancel
Showing results for 
Search instead for 
Did you mean: 

Software Lifecycle Manager: java.lang.OutOfMemoryError

Former Member
0 Kudos

Hi experts,

while executing SUM, the following error appears on os level:

=======================================================================
> ./STARTUP
*** Checking if C++ runtime is installed ...
*** Starting from /saptrans/SUM/SUM/sdt...
** Checking username "sm1adm" for compliance...
Jan 2, 2013 2:12:44 PM [Info]: *************************
Jan 2, 2013 2:12:44 PM [Info]: Starting Server
Jan 2, 2013 2:12:44 PM [Info]: Reading server configuration.
Jan 2, 2013 2:12:48 PM [Info]: Reading service configuration UseCaseService.
Jan 2, 2013 2:12:48 PM [Info]: Configuring LogManager ...
Jan 2, 2013 2:12:48 PM [Info]:
*************************************************
Jan 2, 2013 2:12:48 PM [Info]: Starting SL Controller listening on port
4241 ...
Jan 2, 2013 2:12:48 PM [Info]: Starting StorageService ...
Jan 2, 2013 2:12:48 PM [Info]: Initializing SecurityManager ...
Jan 2, 2013 2:12:50 PM [Info]: Server certificate fingerprint is E9 9F F5
55 A8 2F D3 9A 76 6B DA AB 34 52 4C 78
Jan 2, 2013 2:12:50 PM [Info]: Configuring HTTPManager ...
Jan 2, 2013 2:12:50 PM [Info]: Starting WebstartService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting RoleService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting AlertService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting NotesService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting ProcessService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting MIDService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting FileService ...
Jan 2, 2013 2:12:50 PM [Info]: LogService switched off.
Jan 2, 2013 2:12:50 PM [Info]: Starting MailService ...
Jan 2, 2013 2:12:50 PM [Info]: Starting services ...
Jan 2, 2013 2:12:50 PM [Info]: Starting service "UseCaseService" ...
Jan 2, 2013 2:12:52 PM [Info]: Starting MIDService ...
Jan 2, 2013 2:13:06 PM [Info]: Service "UseCaseService" started
Jan 2, 2013 2:13:06 PM [Info]: Services started.
Jan 2, 2013 2:13:06 PM [Info]: Starting HTTP server listening on port
4239 ...
Jan 2, 2013 2:13:06 PM [Info]: HTTP server started.
Jan 2, 2013 2:13:06 PM [Info]: SL Controller started.
OS: [7977] 14:13:36 ***Warning: pthread_create failed (11, Resource
temporarily unavailable)
os::malloc: failed to malloc 1531616 bytes (errno 12).#
# A fatal error has been detected by SAP Java Virtual Machine:
#
# java.lang.OutOfMemoryError: requested 1531616 bytes for Chunk::new -
os::malloc. Out of swap space or heap resource limit exceeded (check with
limits or ulimit)?
#
# Internal Error (allocation.cpp:334), pid=10092668, tid=3599
# Error: Chunk::new - os::malloc
#
# JRE version: 6.0_31
# Java VM: SAP Java Server VM (6.1.038 19.1-b02 Feb 14 2012 12:53:28 -
61_REL - optU - aix ppc64 - 6 - bas2:166762 (mixed mode) compressed oops)
# An error report file with more information is saved as:
# /saptrans/SUM/SUM/sdt/hs_err_pid10092668.log
[thread 7977 also had an error]
#
# If you would like to submit a bug report, please visit:
# http://service.sap.com/message
#
IOT/Abort trap(coredump)

=======================================================================

I've raised xms from 2048 MB to 4096 MB and MaxPermSize from 512 MB to 1024 MB. But it doesn't solve the problem.

Any idea?

Thanks and best regards,

Max Power

Accepted Solutions (1)

Accepted Solutions (1)

hemanth2
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Max,

Hope you are doing good.

In this case the OutOfMemory exception was triggered because the native process memory was exhausted (OS level) and therefore the process could not create new threads. Kindly set the ulimit stack to unlimited (check this with the limits or ulimit command ->incase of any issues, please do get in touch with the OS admin for more info..)

Thank you and have a nice day :).

_____________

Kind Regards,

Hemanth

nicholas_chang
Active Contributor
0 Kudos

Apart from that, please ensure you got at least 20GB swap space configured.

Cheers,

Nicholas Chang

Former Member
0 Kudos

Hi together!

@ Benjamin: I'm starting SUM with <sid>adm. I've changed the values for the parameters xms and MaxPermSize in configtool. Running the command ulimit -a shows this:

> ulimit -a

time(seconds)        unlimited

file(blocks)         2097151

data(kbytes)         131072

stack(kbytes)        4194304

memory(kbytes)       32768

coredump(blocks)     2097151

nofiles(descriptors) 2000

threads(per process) unlimited

processes(per user)  unlimited

I have executed the command "ulimit -S -s unlimited" to raise the value. But this was not the solution. The error still appears. I have some problems to set the value to unlimited

@ Nicholas: Yes, maybe the swap space is the problem, it's only about 2 GB. But 2017 MB are free, if I run SUM. I will change it, as soon as possible.

Many thanks and best regards,

Max

Reagan
Advisor
Advisor
0 Kudos

Hello Max

Good Day

Let me first tell you what my understanding is about the issue:

You are trying to start the SUM tool for an upgrade purpose.

The tool is started under the user sm1adm and it fails with the OOM issue.

Am I right ?

If Yes then I dont understand how can increasing the heap memory parameters of the Java instance/stack using the config tool fix this issue.

The Java memory parameters has nothing to do with the memory configuration of the SUM tool.

Moreover increasing the swap space will not do any good as Java works only with the main memory.

Instead of increaisng the memory parameters at the Java instance (Config Tool) have you checked the STARTUP script and try to check what the call pattern is ?

I suggest you to check the DSUService files present in the /usr/sap/SUM/sdt/exe directoy. In your case it should be /saptrans/SUM/SUM/sdt/exe

Take a backup of the existing files and modify the Java parameters in those files.

Once done kill all the SUM processes from the OS level and restart it.

Make sure the ulimit for the sidadm user is modified. You can modify /etc/security/limits file from VI.

Lastly, if possible bounce the server which helps in releasing memory held by unwanted processes at the OS level.

Cheers

RB

Former Member
0 Kudos

Hello Benjamin,

yes, to change the parameters in configtool, wasn't a good idea ... maybe I was desperate.

In the file SUM/sdt/exe/DSUService I found this call pattern:

javaopts="-Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Djava.system.class.loader=com.sap.sdt.bootstrap.SystemClassLoader"

javaopts="$javaopts $SERVER_JAVA_OPTS"

I changed it, but the error still appears:

javaopts="-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Djava.system.class.loader=com.sap.sdt.bootstrap.SystemClassLoader"

javaopts="$javaopts $SERVER_JAVA_OPTS"

But the error still occurs ....

I have modified the ulimits in the file /etc/security/limits:

> ulimit -a

time(seconds)        unlimited

file(blocks)         unlimited

data(kbytes)         unlimited

stack(kbytes)        unlimited

memory(kbytes)       unlimited

coredump(blocks)     2097151

nofiles(descriptors) unlimited

threads(per process) unlimited

processes(per user)  unlimited

.... and now it works!

Many thanks,

Max

Answers (1)

Answers (1)

Reagan
Advisor
Advisor
0 Kudos

Hello

Under which user are you starting the SUM ?

Please check the ulimits on AIX for that particular user.

Where exactly did you change the parameter settings ?

Cheers

RB