SAP Knowledge Base Article - Preview

2538788 - AS Java cannot be started correctly - Shared memory initialization failed

Symptom

AS Java cannot be started correctly, services and applications show instable state. The following log entries can be found in certain log files:

dev_jstart:

F [Thr 01] Wed Aug 16 12:16:06 2017
F  [Thr 01] *** LOG => Signal 20 SIGCHLD.
F  [Thr 01] *** LOG => Process server0 stopped (pid 5047024).
F  [Thr 01] *** LOG => Removing enque locks for ID 163800250.
F  [Thr 01] EnqLock=I************************************************163800250
F  [Thr 01] EnqLock=T************************************************163800250

dev_server:

I [Thr 01] MtxInit: 10002 0 2
F [Thr 01] *** ERROR => JsfAttachDynShm: Dynamic shared memory does not exist. [jsfxxshm.c 2506]
F [Thr 01] *** ERROR => SfEStartupError: SfCControlClient::SfCControlClient: JsfAttachDynShm failed (rc = 4 object notfound) [sfxxcli.hpp 128]
F [Thr 01] *** ERROR => Operation failed: SfEStartupError: JsfAttachDynShm failed (rc = 4 object not found)
[sfxxmain.cpp 1186]
F
F ********************************************************************************
F *** ERROR => Shared memory initialization failed.
F ***
F *** Please see section 'Java process initialization issues'
F *** in SAP Note 1316652 for additional information and trouble shooting advice.
F ********************************************************************************
F
F [Thr 01] *** LOG => exiting (exitcode -21001, retcode 2).

and/or:

F [Thr 225009] Wed Aug 16 02:19:04 2017
F  [Thr 225009] *** WARNING => SfAllocShmThread(): table full (s=6000). [jsfxxshm_mt. 4329]
F  [Thr 225009] *** WARNING => ShmThread_new: Cannot alloc thread (rc = 2 out of memory). [sfxxjshm_mt. 618]
F  [Thr 111726] *** WARNING => ShmWebSession_deactivate2: Cannot lock web session 1898 (rc = 16 wrong state for operation). [sfxxjshm_mt. 4126]

and/or:

F [Thr 140] Tue Aug  8 11:50:50 2017
F  [Thr 140] *** ERROR => SfDeactivateShmWebSession: MtxRwSharedUnlock(1ffffffffab1d270 SF-SeMnt) failed (rc = 1 unspecific error) [jsfxxssess.c 2588]
F  [Thr 140] *** ERROR => SfDeactivateShmWebSession(2) failed (rc = 7 locking (sema/mutex) error) [jsfxxssess.c 2627]
F  [Thr 140] *** WARNING => ShmWebSession_deactivate: Cannot deactivate web session 2 (rc = 7 locking (sema/mutex) error). [sfxxjshm_mt. 4080]

std_server:

SHS: [49] 00:26:34 ***ERROR (jvmEnv.cpp:920): SharedSemaphore::lock: Failed to lock shared semaphore
: [49] 00:26:34 ***ERROR (controls.cpp:466): Controls::end: Could not lock semaphore

defaultTrace:

#2.0#2017 08 08 11:50:50:129#+0530#Error#com.sap.engine.session.runtime#
 #BC-JAS-COR-SES#kernel.sda#C000AC18347D004A0000000000001EBF#2378250000000003##com.sap.engine.session.runtime#Guest#0##
AE7D1C457C0111E7A074000000244A0A#a884b9ed7c0111e79a3b000000244a0a#a884b9ed7c0111e79a3b000000244a0a#0#Thread[HTTP Worker [@1131606986],5,Dedicated_Application_Thread]#Plain##
[EXCEPTION]
 com.sap.bc.proj.jstartup.sadm.ShmLockingException: Cannot deactivate web session 2 (rc = 7 locking (sema/mutex) error).


Read more...

Environment

AS Java all versions.

Product

SAP NetWeaver 7.0 ; SAP NetWeaver 7.1 ; SAP NetWeaver 7.2 ; SAP NetWeaver 7.3 ; SAP NetWeaver 7.4 ; SAP NetWeaver 7.5 ; SAP enhancement package 1 for SAP NetWeaver 7.0 ; SAP enhancement package 1 for SAP NetWeaver 7.3 ; SAP enhancement package 2 for SAP NetWeaver 7.0 ; SAP enhancement package 3 for SAP NetWeaver 7.0

Keywords

Dynamic shared memory, shared memory, semaphore, cleanipc, 21001, returncode 2, Shared memory initialization failed, out of memory, Cannot lock web session, SharedSemaphore, Failed to lock shared semaphore, Could not lock semaphore, Cannot deactivate web session, ShmLockingException, sema/mutex, JsfAttachDynShm failed, ipc, ipc-objects, ipc object, ipc objects , KBA , BC-JAS-SF , Startup Framework , BC-JAS-COR , Enterprise Runtime, Core J2EE Framework , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP ONE Support launchpad (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.