Tuesday, February 2, 2016

2145573 - SAP HANA DB: Installing the Debug Symbol Package for SAP HANA

Symptom
A debugger needs to be attached to an SAP HANA installation on customer site.
Caution: a debugger can bring the system to an undefined state which may lead to data loss! Only SAP HANA development should therefore perform debugging.


Other Terms
SAP HANA, Debugging, GDB, Debug-Symbols


Reason and Prerequisites
Situations that require an immediate resolution, such as production down, or issues that cannot be reproduced in a laboratory environment may require the attachment of a debugger to SAP HANA. This can enable SAP HANA development to analyze the root cause or restore the system to a sane state.
As SAP HANA Revisions are shipped with a limited set of debug symbols, debugging on customer site requires an additional package to be installed which contains the full debug symbols.


Solution
Preparation
Perform the following steps as <sid>adm:
1. Create a new directory below the SAP mount directory (default "/hana/shared"). Example:
  • mkdir /hana/shared/debug_symbols
2. Download the Symbol Package for your SAP HANA Revision from Service Marketplace. Make sure the version of the Symbol Package matches the version of your installed SAP HANA Revision. The Symbol Package is a multispanning archive, see Note 2023163 for more information.
3. Copy the Symbol Package to the newly created directory.
4. Extract it. Example:
  • cd /hana/shared/debug_symbols
  • SAPCAR -xf SAP_HANA_DATABASE100_<revision>_Linux_on_x86_64_DBG_SYMBOLS.SAR
  • tar xzf BIN.TGZ && rm BIN.TGZ
  • tar xzf EPM.TGZ && rm EPM.TGZ ( ≥ Revision 100 )
  • tar xzf INIFILES.TGZ && rm INIFILES.TGZ
  • tar xzf PYTHON.TGZ && rm PYTHON.TGZ
  • tar xzf PYTHONSUPPORT.TGZ && rm PYTHONSUPPORT.TGZ
5. Shutdown HANA:
  • HDB stop
6. Make HANA use the debug symbols. Example for "/hana/shared/debug_symbols":
  • rm $DIR_EXECUTABLE
  • ln -s /hana/shared/debug_symbols $DIR_EXECUTABLE
7. Set DEV_PATH:
  • export DEV_PATH="$DIR_EXECUTABLE"
8. Start HANA:
  • HDB start
Debugging
After performing these steps, a debugger can be attached to SAP HANA. Example:
  • gdb -p <pid of hdbindexserver>
Cleanup
To clean up after the debugging session was completed, follow these steps:
1. Stop HANA.
2. Reset links:
  • rm $DIR_EXECUTABLE
  • ln -s ../exe/linuxx86_64/hdb $DIR_EXECUTABLE
3. Start HANA.
You may also delete the Debug Symbol package & the directory containing the extracted symbols.



Header Data

Released On 24.11.2015 09:41:16
Release Status Released for Customer
Component HAN-DB SAP HANA Database
Other Components
HAN-DB-ENG SAP HANA DB Engines
Priority Recommendations / Additional Info
Category Help for error analysis

No comments:

Post a Comment