|
From: Sadys H. <sad...@gm...> - 2006-01-13 10:34:00
|
Hi, all.
I met a problem when using valgrind to debug my occi application. The
program is running ok outside of valgrrind, but got blocked when running in
valgrind.
Below the code where the application got blocked at when running in
valgrind:
//init oracle Environment
try
{
env =3D
Environment::createEnvironment(Environment::THREADED_MUTEXED);
bInitEnv =3D true;
WriteDBLogFile( "OracleConnection_p5", LL_DB_DebugInfo,
LogType_ORACLEConnection);
}
catch(SQLException ex)
{
WriteDBLogFile( "Create Oracle Environment failed.", LL_DB_Error,
LogType_ORACLEConnection);
bInitEnv=3Dfalse;
}
WriteDBLogFile( "OracleConnection_p6", LL_DB_DebugInfo,
LogType_ORACLEConnection);
this->Connect();
WriteDBLogFile( "OracleConnection_p7", LL_DB_DebugInfo,
LogType_ORACLEConnection);
WriteDBLogFile( "Exit ORACLEConnection::ORACLEConnection().",
LL_DB_DebugInfo, LogType_ORACLEConnection);
};
bool
ORACLEConnection::Connect()
{
WriteDBLogFile( "Enter into ORACLEConnection::Connect().",
LL_DB_DebugInfo, LogType_ORACLEConnection);
char sLog[MAX_SQL_LENGTH+1]=3D{'\0'};
if(!bInitEnv)
{
WriteDBLogFile( "The Oracle Environment has not been created.",
LL_DB_Error,LogType_ORACLEConnection);
return false;
}
//create oracle connection instance
try
{
sprintf(sLog, "Connect to Oracle:%s/%s@%s", sUser.c_str(),
sPasswd.c_str(), sNetService.c_str());
WriteDBLogFile( sLog, LL_DB_SysEvent,LogType_ORACLEConnection);
The output is:
2006 01 13 17:57:19: OracleConnection_p1
2006 01 13 17:57:19: OracleConnection_p2
2006 01 13 17:57:19: OracleConnection_p3
2006 01 13 17:57:19: OracleConnection_p4
2006 01 13 17:57:20: OracleConnection_p5
2006 01 13 17:57:20: OracleConnection_p6
and then nothing............................
The most curious thing is that there is nothing between OracleConnection_p6
and OracleConnection_p7. Where the program has gone?!!!!
I opend valgrind's debug option and the debug output is:
SYSCALL[13095,1]( 5) sys_open (
0x4F97A00(/home/xw/Library/DBLib/common/dbclient/oracleclient/ocommon/nls/a=
dmin/data/lxx
10035.nlb), 0 ) --> [async] ...
SYSCALL[13095,1]( 5) ... [async] --> Success(0xA)
SYSCALL[13095,1]( 3) sys_read ( 10, 0x4F97690, 100 ) --> [async] ...
SYSCALL[13095,1]( 3) ... [async] --> Success(0x64)
SYSCALL[13095,1]( 3) sys_read ( 10, 0x4F976F4, 656 ) --> [async] ...
SYSCALL[13095,1]( 3) ... [async] --> Success(0x28E)
SYSCALL[13095,1]( 6) sys_close ( 10 )[sync] --> Success(0x0)
SYSCALL[13095,1]( 78) sys_gettimeofday ( 0xBEFFC7B0, 0x0 )[sync] -->
Success(0x0)
SYSCALL[13095,1]( 78) sys_gettimeofday ( 0xBEFFC8B8, 0xBEFFC8C0 )[sync] -->
Success(0x0)
SYSCALL[13095,1]( 13) sys_time ( 0xBEFFCBF0 )[sync] --> Success(0x43C778BC)
SYSCALL[13095,1]( 4) sys_write ( 1, 0x401F000, 41 ) --> [async] ...
SYSCALL[13095,1]( 4) ... [async] --> Success(0x29)
SYSCALL[13095,1]( 4) sys_write ( 11, 0x4022000, 41 ) --> [async] ...
SYSCALL[13095,1]( 4) ... [async] --> Success(0x29)
SYSCALL[13095,1]( 13) sys_time ( 0xBEFFCBF0 )[sync] --> Success(0x43C778BD)
SYSCALL[13095,1]( 4) sys_write ( 1, 0x401F000, 41 ) --> [async] ...
SYSCALL[13095,1]( 4) ... [async] --> Success(0x29)
SYSCALL[13095,1]( 4) sys_write ( 11, 0x4022000, 41 ) --> [async] ...
SYSCALL[13095,1]( 4) ... [async] --> Success(0x29)
--
Any idea about that?
Thanks in advance
~~~~~~@@~~~~~~~~@@~~~~~~~~~
!!! Xie Wei, A programmer !!!
!!! sad...@gm... !!!
!!! Mobile:13917917201 !!!
~~~~~~~~~~~###~~~~~~~~
|