Forum Stats

  • 3,741,181 Users
  • 2,248,384 Discussions
  • 7,861,664 Comments

Discussions

Sqltxt function does not respond

3521143
3521143 Member Posts: 1
edited Aug 11, 2017 3:50AM in Oracle Call Interface (OCI)

when I am run select query from my Pro*C program, it gets hanged at sqlcxt function. This doesn't happen always. When my application calls same function multiple time, only then this problem occurs.

when I took gcore and tried to debug the thread, than I found it getting locked at read call

#0  0x00907430 in __kernel_vsyscall () 

#1  0x004247bb in read () from /lib/libc.so.6 

#2  0x00e1d6f3 in snttread () from /usr/lib32/libclntsh.so.10.1 

#3  0x00e1acca in nttrd () from /usr/lib32/libclntsh.so.10.1 

#4  0x00d0c60c in nsprecv () from /usr/lib32/libclntsh.so.10.1 

#5  0x00d0f8d7 in nsrdr () from /usr/lib32/libclntsh.so.10.1 

#6  0x00cf2323 in nsdo () from /usr/lib32/libclntsh.so.10.1 

#7  0x00cef5c3 in nsbrecv () from /usr/lib32/libclntsh.so.10.1 

#8  0x00d22483 in nioqrc () from /usr/lib32/libclntsh.so.10.1 

#9  0x00e35667 in ttcdrv () from /usr/lib32/libclntsh.so.10.1 

#10 0x00d297e5 in nioqwa () from /usr/lib32/libclntsh.so.10.1 

#11 0x00b8dbfb in upirtrc () from /usr/lib32/libclntsh.so.10.1 

#12 0x00b0389a in kpurcsc () from /usr/lib32/libclntsh.so.10.1 

#13 0x00ab9ebb in kpuexecv8 () from /usr/lib32/libclntsh.so.10.1 

#14 0x00abb26e in kpuexec () from /usr/lib32/libclntsh.so.10.1 

#15 0x00b92766 in OCIStmtExecute () from /usr/lib32/libclntsh.so.10.1 

#16 0x00a63b20 in sqlcucExecute () from /usr/lib32/libclntsh.so.10.1 

#17 0x00a5661e in sqlall () from /usr/lib32/libclntsh.so.10.1 

#18 0x00a5b5c8 in sqlatm () from /usr/lib32/libclntsh.so.10.1 

#19 0x00a47da7 in sqlnst () from /usr/lib32/libclntsh.so.10.1 

#20 0x00a35b52 in sqlcmex () from /usr/lib32/libclntsh.so.10.1 

#21 0x00a3604a in sqlcxt () from /usr/lib32/libclntsh.so.10.1 

#22 0x080781f2 in check_appConf_for_modification (errMsg=0x163a8f4 "\030\020", <incomplete sequence \323>, appId=58, opType=3, flag=0x2128f64, appState=0x2128f5c,

    instance=0x7) at ussdgw_oracle_db_select.c:253
#0  0x00907430 in __kernel_vsyscall ()

The code for the same.

EXEC SQL WHENEVER SQLERROR DO sql_error ("Application Conf Table Read Error --", errMsg); 

                EXEC SQL CONTEXT USE DEFAULT;

                EXEC SQL DECLARE allrecords2 CURSOR FOR 
                        SELECT APP_USE_FALG,ACC_NAME,APP_TYPE,ACC_PASSWORD,APP_PORT,APP_IP,MAX_THROTTLE_COUNT,LOC_INFO_REQ,LBS_INFO_REQ,LBS_SERVICE_TYPE,MSG_LOG_REQ,IP_VALIDATE_REQ,SESSION_SPEC_FLAG,SECURE_SC_ENABLE,REG_DELIVERY,PRE_POST_CHECK,APP_DOWN_MSG,NWK_TIMEOUT_VAL,APP_TIMEOUT_VAL,DSM_SSM_SEQ_CHK_FLAG,MAX_CONNECTIONS,USSD_STR_PRF,ALLOW_SMS_NOTY,FALLBACK_SMS_CHANNEL,MESG_DELIM,SSL_SUPPORT,XTAG_VALUE,MAX_PULL_THROTTLE_COUNT from USSD_APP_DETAILS_TABLE WHERE ACCOUNT_ID=:appId;

/* Open the cursor. */ 
                EXEC SQL OPEN allrecords2; 
                if (strcmp(errMsg,"")) 
                { 
                        EXEC SQL CLOSE allrecords2; 
                        return sqlca.sqlcode ; 
                } 
                while (sqlca.sqlcode==0 ) 
                { 
                        EXEC SQL FETCH allrecords2 INTO :appDetails INDICATOR :peerAppInfo_ind;  
               } 
                EXEC SQL CLOSE allrecords2; 
                EXEC SQL COMMIT ;  

This discussion has been closed.