Skip to Content
Author's profile photo Ning Tong

HANA stopped unexpectedly due to the accidental deletion of shared memory lock


One of my friend faces a strange problem regarding to the unpacked stop of HANA server after cleaning some files under /tmp directory.

After manual starting the system, HANA will run normal again (version: SPS 09 Rev.95).

In nameserver_hosta….trc, the following error is shown:

[79877]{-1}[-1/-1] 2016-02-24 01:15:07.912168 f NameServer

TREXNameServer.cpp(03342) : shared memory lock

‘/tmp/.hdb_ABC_30_lock’was deleted -> stopping instance ...

[79877]{-1}[-1/-1] 2016-02-24 01:15:10.655484 i Service_Shutdown : Preparing for TransactionManager shutdown


File /tmp/.hdb_<SID>_<instance number>_lock is used by HANA as a shared memory lock. If the file is deleted by chance, the database cannot manage the access of shared memory segment anymore and therefore has to stop accordingly.

For more detailed information, please refer to 1984700 – HANA stopped unexpectedly

If you are using RedHat Enterprise Linux, please take care of tmpwatch which delete files order than sometime.

For HANA <= 09, the shared memory lock file is /tmp/.hdb_<sid>_<inst_id>_lock

For HANA >= 10, the shared memory lock file is /var/lib/hdb/<sid>/.hdb_<sid>_<inst_id>_lock

(1999998 – FAQ: SAP HANA Lock Analysis)


DO NOT delete shared memory lock file.

If you are running RedHat, please remove tmpwatch from the system’s cron job。

Hope the blog can help you fix the same kind of problem you face. Thanks to Chiwo Lee for experience sharing.



Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Jan Tretina
      Jan Tretina


      if your friend was properly reading RHEL configuration guide for HANA, especially section with important notes, he would not faced this issue 😉

      Br, Jan

      Author's profile photo Srikar Vankadaru
      Srikar Vankadaru

      Is there any parameter that can be used to change the location of lock file in SLES ?


      Author's profile photo Ning Tong
      Ning Tong
      Blog Post Author

      Sorry, currently, I do not find the related document to change this location.