cancel
Showing results for 
Search instead for 
Did you mean: 

ERROR 12: Cannot allocate memory

Former Member
0 Kudos

Hi everyone,

I'm trying to install (and run) N4S testdrive on openSUSE 10.2 with 1.8G RAM, 4G swap and 1G tmpfs (set in fstab, not using SHMFS_SIZE).

From the logs, I see the following errors

<u>

/usr/sap/N4S/DVEBMGS01/work/dev_disp</u>

CCMS: AlInitGlobals : alert/use_sema_lock = TRUE.

CCMS: start to initalize 3.X shared alert area (first segment).

      • ERROR => W0 (pid 15205) died [dpxxdisp.c 14021]

      • ERROR => W1 (pid 15206) died [dpxxdisp.c 14021]

      • ERROR => W2 (pid 15220) died [dpxxdisp.c 14021]

      • ERROR => W3 (pid 15223) died [dpxxdisp.c 14021]

my types changed after wp death/restart 0x9f --> 0x9e

      • ERROR => W4 (pid 15224) died [dpxxdisp.c 14021]

my types changed after wp death/restart 0x9e --> 0x9c

      • ERROR => W5 (pid 15225) died [dpxxdisp.c 14021]

my types changed after wp death/restart 0x9c --> 0x98

      • ERROR => W6 (pid 15226) died [dpxxdisp.c 14021]

my types changed after wp death/restart 0x98 --> 0x90

      • ERROR => W7 (pid 15239) died [dpxxdisp.c 14021]

my types changed after wp death/restart 0x90 --> 0x80

      • DP_FATAL_ERROR => DpWPCheck: no more work processes

      • DISPATCHER EMERGENCY SHUTDOWN ***

and for <u>/usr/sap/N4S/DVEBMGS01/work/dev_w0</u> to dev_w7

M SHM_PRES_BUF (addr: 0x2acac18fc000, size: 4400000)

M SHM_ROLL_AREA (addr: 0x2acbd152d000, size: 280166400)

I *** ERROR => shmat(20348967,0x(nil),SHM_RND) (12: Cannot allocate memory) [shmux.c 1470]

M *** ERROR => ThShMCreate: ShmCreate SHM_PAGING_AREA failed [thxxhead.c 2548]

M *** ERROR => ThIPCInit: ThShMCreate [thxxhead.c 2029]

M ***LOG R19=> ThInit, ThIPCInit ( TSKH-IPC-000001) [thxxhead.c 1486]

M in_ThErrHandle: 1

M *** ERROR => ThInit: ThIPCInit (step 1, th_errno 17, action 3, level 1) [thxxhead.c 10019]

frankly, I itching to do a complete re-install, but would it do any good ?

Thanks

Phil

Message was edited by:

Philip Kisloff

Message was edited by:

Philip Kisloff

Message was edited by:

Philip Kisloff

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member204746
Active Contributor
0 Kudos

check your swap file properly.

are you really sure that a 4GB swap file is created?

SAP recommendation is 20GB.

philip_kisloff
Active Participant
0 Kudos

Just a quick thanks for all th replies.

The problem is now solved. Quoting from the installation guide (last place to look)

If you have not configured a sufficient amount of tmpfs, the SAP System may not start properly. As an alternative to increasing tmpfs size, you can edit /usr/sap/N4S/SYS/profile/N4S_DVEBMGS00_n4shost and add the line em/address_space_MB = 512

This seems to work. It's an open question as to what the optimal size of address_space_MB should be. I'll go with 512 for now.

best regards

Phil

Former Member
0 Kudos

Hi Philip,

Go-Live values for customers recommends a value of 4096 for the parameter em/address_space_MB. We have been using this value for a long time now

without any issues.

Regards

Srikishan

Former Member
0 Kudos

Dear Philip,

check with "ipcs" or "showipc <sysnr>" as sidadm whether there are any IPC objects left.

In this case, remove them via cleanipc (make sure that you pick the right sysnr when running multiple instances). Do not run cleanipc on a running system!

Regards,

Oliver Stabel

Former Member
0 Kudos

Ah well ... just saw that Hannes already provided the cleanipc approach

hannes_kuehnemund
Active Contributor
0 Kudos

Dear Philip,

could you please give the following proc parameters:


cat /proc/sys/kernel/shmall
cat /proc/sys/kernel/sem
cat /proc/sys/kernel/shmmax
cat /proc/sys/kernel/shmmni

It looks like, there parameters were set far to tiny on your system. I assume openSUSE (as meant to be a desktop linux) does not set these parameters like the server version.

philip_kisloff
Active Participant
0 Kudos

Hi Hannes

cat /proc/sys/kernel/shmall 5242880

cat /proc/sys/kernel/sem 1250 256000 100 1024

cat /proc/sys/kernel/shmmax 23136829430

cat /proc/sys/kernel/shmmni 4096

Thanks,

Phil

hannes_kuehnemund
Active Contributor
0 Kudos

Dear Philip,

/proc/sys/kernel/shmall: the maximum amount of shared memory that can be allocated (in bytes or pages)

/proc/sys/kernel/shmmax: the maximum size of a shared memory segment (in bytes)

looks like, that on openSUSE the maximum size of an shared memory segment is bigger then the upper limit of what can be allocated at all. I'm not sure, if openSUSE uses bytes or pages for /proc/sys/kernel/shmall at all, but setting /proc/sys/kernel/shmall to 2313682944 may be worth a try. Furthermore, after shutting down the N4S instance, you should also run


cleanipc 00 remove
cleanipc 01 remove

to delete all old shared memory segments left behind by instance 00 and instance 01

EDIT:

you can set the kernel parameter by calling:

echo "2313682944" > /proc/sys/kernel/shmall

Best Regards,

Hannes

Message was edited by:

Hannes Kuehnemund

philip_kisloff
Active Participant
0 Kudos

Thanks for that Hannes,

No luck with the change.

Searching with google, one "outside" suggestion was that this type of error may be to do with a broken libc file. Maybe with libstdc compatibility libraries that I tried re-installing as an (incorrect) solution to Java Gui installation problems (the correct solution was to set PLATIN_JAVA paths, but you would never know this from the instructions).

Slightly off-topic, I did find /etc/sysctl.conf installed which allowed changing these parameters. I wonder if it has anything to do with sysctl.backup, with entirely different contents to do with iPv6 and forwarding?

best regards

Phil