If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2: segmentation fault in SQLPrepare() function of CLI

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-18-06, 10:26
nagaraj_hayyal nagaraj_hayyal is offline
Registered User
 
Join Date: Apr 2005
Posts: 5
Arrow db2: segmentation fault in SQLPrepare() function of CLI

Hi friends..
thanks for reading this problem.
let me describe my environment in detail:
OS: solaris
compiler: gcc2.95.2
Database: DB2 V8.1.0
Language:C/C++
API: DB2 CLI

Now my problem is that i am getting segmentation fault in SQLPrepare() of CLI.
The statement tried to prepare is "rollback".
i am giving you the stacktrace of the application.
stackTace is :
#0 0xfe426670 in __1cTCLI_scnTranslateSQdDL6FpnRCLI_STATEMENTINFO_p Clph2pl2l4LC44CCh2pnPCLI_LITERALINFO_22lCC2CpnTCLI _ERRORHEADERINFO_pnPCLI_CONNECTINFO__h_ () from /export/home/miginst/sqllib/lib/libdb2.so.1
#1 0xfe3cb568 in __1cLSQdDLPrepare26FpnRCLI_STATEMENTINFO_pClpnTCLI _ERRORHEADERINFO__h_ ()
from /export/home/miginst/sqllib/lib/libdb2.so.1
#2 0xfe3c7624 in SQLPrepare () from /export/home/miginst/sqllib/lib/libdb2.so.1
#3 0x841ec in dbMgr::execute (this=0xa00c84, sql=@0xfcf7b2e0) at dbMgr.cpp:345

if anyone has faced this kind of problem and know the solution too, please reply.

Thanks in Advance.
Nagaraj
Reply With Quote
  #2 (permalink)  
Old 04-18-06, 12:26
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
There are two places to check :

a) the db2diag.log file to see if there are any messages.

b) xxxx.000 files in the same directory as db2diag.log file ..

Give it a try ...

Are you sure your memory allocations etc are correct ?

Does this happen every time you call the program, or is it just the first time ?

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 04-20-06, 08:02
nagaraj_hayyal nagaraj_hayyal is offline
Registered User
 
Join Date: Apr 2005
Posts: 5
hi satya,
thanks for your reply...

i checked the db2diag.log.
its shows the diagnostic messages as shown below:

2006-04-20-07.42.48.182248-300 I367009353C390 LEVEL: Info
PID : 3235906 TID : 772 PROC : db2hmon 0
INSTANCE: cmstsint NODE : 000
APPID : *LOCAL.cmstsint.060420124248
FUNCTION: DB2 UDB, DRDA Communication Manager, sqljcReceive, probe:30
MESSAGE : CCI Error:
DATA #1 : Hexdump, 4 bytes
0x3051CBF8 : 0000 0047 ...G

2006-04-20-07.42.48.182537-300 I367009744C377 LEVEL: Info
PID : 3235906 TID : 772 PROC : db2hmon 0
INSTANCE: cmstsint NODE : 000
APPID : *LOCAL.cmstsint.060420124248
FUNCTION: DB2 UDB, DRDA Communication Manager, sqljcReceive, probe:30
RETCODE : ZRC=0x8136001C=-2127167460=SQLZ_RC_NO_CONNECTION, SQLT_SQLJC
"No connection"

2006-04-20-07.42.48.182810-300 I367010122C603 LEVEL: Info
PID : 3235906 TID : 772 PROC : db2hmon 0
INSTANCE: cmstsint NODE : 000
APPID : *LOCAL.cmstsint.060420124248
FUNCTION: DB2 UDB, DRDA Communication Manager, sqljcReceive, probe:30
DATA #1 : String, 295 bytes
CALL STACK:
[0] 0xD2BF00F0 sqljcReceive__FP10sqljCmnMgr + 0x1A8
[1] 0xD2C037CC sqljrDrdaArDisconnect__FP7UCintfc + 0x274
[2] 0xD2C2EDA0 sqleUCdisconnect + 0x64
[3] 0xD2C2EC94 sqleUCappConnectReset + 0xE0
[4] 0xD29693EC CLI_sqlDisconnect__FP15CLI_CONNECTINFOP5sqlcaP19CL I_ERRORHEADERINFO + 0x15C

and the applications stack trace is shown below:

#0 0xfe426670 in __1cTCLI_scnTranslateSQdDL6FpnRCLI_STATEMENTINFO_p Clph2pl2l4LC44CCh2pnPCLI_LITERALINFO_22lCC2CpnTCLI _ERRORHEADERINFO_pnPCLI_CONNECTINFO__h_ ()
from /export/home/miginst/sqllib/lib/libdb2.so.1
#1 0xfe3cb568 in __1cLSQdDLPrepare26FpnRCLI_STATEMENTINFO_pClpnTCLI _ERRORHEADERINFO__h_ ()
from /export/home/miginst/sqllib/lib/libdb2.so.1
#2 0xfe3c7624 in SQLPrepare () from /export/home/miginst/sqllib/lib/libdb2.so.1
#3 0x845e4 in dbMgr::execute (this=0x9d5c64, sql=@0xfce7b2e0) at dbMgr.cpp:345


and the files xxxx.000 doesnt say much abt the problem.
please let me know if i have to update the DB2 version for this kind of problem.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On