Troubleshoot a SQL Crash
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
When a SQL process terminates abnormally, it automatically creates a text file named protrace.<pid> in the current working directory of the database. Currently, the protrace.<pid> file only contains a stack trace of the SQL process that terminated abnormally on some platform, making it difficult to quickly identify the specific SQL statement responsible for the crash.
To help identify and diagnose the root cause of an SQL crash, the relevant SQL query is captured in the protrace.<pid> file along with additional information required for debugging such as User name, Database Name and so on.
Note: Currently, Open Edge supports capturing of the SQL statement only on Linux.
Example
command line not initialized
#1 [0xa43540] dbut_uttraceback+0x15f from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#2 [0xa43139] dbut_uttrace+0x1f4 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#3 [0xa16d64] dbExit+0x42 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#4 [0x9c438d] drSigFatal+0x11f from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#5 [0xd58326a0] __rpc_thread_destroy+0xffef1230 from /lib64/libc.so.6
#6 [0xd600f6ab] _fini+0xffffe4bb from /lib64/libpthread.so.0
#7 [0x812a07] _ZL14dt_fpe_handlerv+0x57 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#8 [0xd58326a0] __rpc_thread_destroy+0xffef1230 from /lib64/libc.so.6
#9 [0x4986d9] _ZN9rds_env_t12crash_serverE11sqlm_type_t+0xa3 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#10 [0x4f3ce3] _Z8ssm_openP9rds_env_tPKcP12sql_stmuid_thS2_S2_P5sqldaP5sqlcaS2_+0x1122 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#11 [0x4bfc73] sql_fn+0x9c7 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#12 [0x90ec62] _ZN14cursor_reply_t15process_requestEv+0x306 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#13 [0x90dc00] _ZN14server_reply_t13execute_replyEPPhPi+0x10a from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#14 [0x90e942] _ZN14cursor_reply_t7executeEPhPS0_PiS2_11sqlm_type_t+0x72 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#15 [0x90cb50] _ZN12srv_nw_hdl_t13dsn_listen_10EiPvP10svr_args_t+0x890 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#16 [0x7dd503] dmn_main+0x121 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#17 [0x430dad] _Z14run_sql_threadPv+0x285 from /vobs_sql/sql/linuxx86_64/bin/_sqlsrv2
#18 [0xd6007aa1] _fini+0xffff68b1 from /lib64/libpthread.so.0
Following SQL Query resulted in the crash:
Select e.Employee_id, e.Employee_name, e.Department_id
,d.Department_id, d.Department_name
from Employee e
Left Outer join Department d on
(Select Department_id from Employee where Employee_id=1)=
(Select Department_id from Department where Department_name='Crew');
Additional information:
User Name: hum
DB Name: testdb
Schema Name: HUM
Catalog Name: TESTDB
Audit Status : DISABLED
Authorised Data Truncation Status: OFF