Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB ODBC Driver crash in case of unstable network [ODBC183] #172

Closed
firebird-automations opened this issue Jan 13, 2015 · 4 comments
Closed

Comments

@firebird-automations
Copy link

Submitted by: Egor Kromberg (kromberg)

FB ODBC Driver crash in case of unstable network
Backtrace:
#⁠0 0x00007fffeda87885 in raise () from /lib64/libc.so.6
#⁠1 0x00007fffeda89065 in abort () from /lib64/libc.so.6
#⁠2 0x00007fffee34ea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#⁠3 0x00007fffee34cc06 in ?? () from /usr/lib64/libstdc++.so.6
#⁠4 0x00007fffee34bb99 in ?? () from /usr/lib64/libstdc++.so.6
#⁠5 0x00007fffee34c5f1 in __gxx_personality_v0 () from /usr/lib64/libstdc++.so.6
#⁠6 0x00007fffede06323 in ?? () from /lib64/libgcc_s.so.1
#⁠7 0x00007fffede063f7 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#⁠8 0x00007fffe2524836 in IscDbcLibrary::IscResultSet::~IscResultSet() () from /usr/lib64/libOdbcFb.so
#⁠9 0x00007fffe2514828 in IscDbcLibrary::IscMetaDataResultSet::~IscMetaDataResultSet() () from /usr/lib64/libOdbcFb.so
#⁠10 0x00007fffe251cf44 in IscDbcLibrary::IscProceduresResultSet::~IscProceduresResultSet() () from /usr/lib64/libOdbcFb.so
#⁠11 0x00007fffe251b471 in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure(char const*, int&, int&, bool&) () from /usr/lib64/libOdbcFb.so
#⁠12 0x00007fffe251ac2a in IscDbcLibrary::IscConnection::getNativeSql(char const*, int, char*, int, int*) () from /usr/lib64/libOdbcFb.so
#⁠13 0x00007fffe257aeee in OdbcJdbcLibrary::OdbcStatement::sqlPrepare(unsigned char*, int) () from /usr/lib64/libOdbcFb.so
#⁠14 0x00007fffe254723f in SQLPrepare () from /usr/lib64/libOdbcFb.so
#⁠15 0x00007fffec90f5df in SQLPrepare () from /usr/lib64/libodbc.so.2
#⁠16 0x00007ffff7bae60b in odbc::PreparedStatement::_prepare (this=<value optimized out>) at preparedstatement.cpp:86
#⁠17 0x00007ffff7bae8c0 in odbc::PreparedStatement::PreparedStatement (this=0x7e32e4e0, con=<value optimized out>, hstmt=<value optimized out>, sql=<value optimized out>, resultSetType=<value optimized out>, resultSetConcurrency=<value optimized out>, defaultDirection=1) at preparedstatement.cpp:69
#⁠18 0x00007ffff7ba4ad1 in odbc::Connection::prepareStatement (this=0x7dffa680, sql="{ call SYS_ADD_STAT_COUNTER(?,?,?,?) };", resultSetType=0, resultSetConcurrency=0) at connection.cpp:480
#⁠19 0x0000000000470ab1 in STAT::CfStatFBDBAppender::flushCounter (this=0xdb5140, name="SOAPRA_sendAnswers", type=<value optimized out>, val="0") at ../../../viper/src/framework/statistics/CfStatFBDBAppender.cpp:218
#⁠20 0x0000000000476ebc in STAT::CfStatistics::thread () at ../../../viper/src/framework/statistics/CfStatistics.cpp:470
#⁠21 0x00007ffff7564aa3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.51.0
#⁠22 0x00007fffef0b07f1 in start_thread () from /lib64/libpthread.so.0
#⁠23 0x00007fffedb3a70d in clone () from /lib64/libc.so.6

Stdout:
terminate called after throwing an instance of 'IscDbcLibrary::SQLError'
what(): std::exception

I've investigated a problem and I think that in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure function exception is thrown and in the process of stack unwinding the second exception is thrown in destuctor:
IscResultSet::~IscResultSet()
{
close();
}

After this the program is terminated.

I've fixed it by changing the destuctor IscResultSet::~IscResultSet():

IscResultSet::~IscResultSet()
{
try
{
close();
}
catch (std::exception &e)
{
fprintf (stdout, "Failed while deleting IscResultSet (exception: \"%s\")\n",
e.what());
}
catch (...)
{
fprintf (stdout, "Failed while deleting IscResultSet (unknown exception)\n");
}
}

Commits: ee11eee

@firebird-automations
Copy link
Author

Modified by: Egor Kromberg (kromberg)

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Author

Modified by: Egor Kromberg (kromberg)

description: FB ODBC Driver crash in case of unstable network
Backtrace:
#⁠0 0x00007fffeda87885 in raise () from /lib64/libc.so.6
#⁠1 0x00007fffeda89065 in abort () from /lib64/libc.so.6
#⁠2 0x00007fffee34ea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#⁠3 0x00007fffee34cc06 in ?? () from /usr/lib64/libstdc++.so.6
#⁠4 0x00007fffee34bb99 in ?? () from /usr/lib64/libstdc++.so.6
#⁠5 0x00007fffee34c5f1 in __gxx_personality_v0 () from /usr/lib64/libstdc++.so.6
#⁠6 0x00007fffede06323 in ?? () from /lib64/libgcc_s.so.1
#⁠7 0x00007fffede063f7 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#⁠8 0x00007fffe2524836 in IscDbcLibrary::IscResultSet::~IscResultSet() () from /usr/lib64/libOdbcFb.so
#⁠9 0x00007fffe2514828 in IscDbcLibrary::IscMetaDataResultSet::~IscMetaDataResultSet() () from /usr/lib64/libOdbcFb.so
#⁠10 0x00007fffe251cf44 in IscDbcLibrary::IscProceduresResultSet::~IscProceduresResultSet() () from /usr/lib64/libOdbcFb.so
#⁠11 0x00007fffe251b471 in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure(char const*, int&, int&, bool&) () from /usr/lib64/libOdbcFb.so
#⁠12 0x00007fffe251ac2a in IscDbcLibrary::IscConnection::getNativeSql(char const*, int, char*, int, int*) () from /usr/lib64/libOdbcFb.so
#⁠13 0x00007fffe257aeee in OdbcJdbcLibrary::OdbcStatement::sqlPrepare(unsigned char*, int) () from /usr/lib64/libOdbcFb.so
#⁠14 0x00007fffe254723f in SQLPrepare () from /usr/lib64/libOdbcFb.so
#⁠15 0x00007fffec90f5df in SQLPrepare () from /usr/lib64/libodbc.so.2
#⁠16 0x00007ffff7bae60b in odbc::PreparedStatement::_prepare (this=<value optimized out>) at preparedstatement.cpp:86
#⁠17 0x00007ffff7bae8c0 in odbc::PreparedStatement::PreparedStatement (this=0x7e32e4e0, con=<value optimized out>, hstmt=<value optimized out>, sql=<value optimized out>, resultSetType=<value optimized out>, resultSetConcurrency=<value optimized out>, defaultDirection=1) at preparedstatement.cpp:69
#⁠18 0x00007ffff7ba4ad1 in odbc::Connection::prepareStatement (this=0x7dffa680, sql="{ call SYS_ADD_STAT_COUNTER(?,?,?,?) };", resultSetType=0, resultSetConcurrency=0) at connection.cpp:480
#⁠19 0x0000000000470ab1 in STAT::CfStatFBDBAppender::flushCounter (this=0xdb5140, name="SOAPRA_sendAnswers", type=<value optimized out>, val="0") at ../../../viper/src/framework/statistics/CfStatFBDBAppender.cpp:218
#⁠20 0x0000000000476ebc in STAT::CfStatistics::thread () at ../../../viper/src/framework/statistics/CfStatistics.cpp:470
#⁠21 0x00007ffff7564aa3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.51.0
#⁠22 0x00007fffef0b07f1 in start_thread () from /lib64/libpthread.so.0
#⁠23 0x00007fffedb3a70d in clone () from /lib64/libc.so.6

Stdout:
terminate called after throwing an instance of 'IscDbcLibrary::SQLError'
what(): std::exception

I've investigated a problem and I think that in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure function exception is thrown and in the process of stack unwinding the second exception is thrown in destuctor:
IscResultSet::~IscResultSet()
{
close();
}

After this the program is terminated.

=>

FB ODBC Driver crash in case of unstable network
Backtrace:
#⁠0 0x00007fffeda87885 in raise () from /lib64/libc.so.6
#⁠1 0x00007fffeda89065 in abort () from /lib64/libc.so.6
#⁠2 0x00007fffee34ea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#⁠3 0x00007fffee34cc06 in ?? () from /usr/lib64/libstdc++.so.6
#⁠4 0x00007fffee34bb99 in ?? () from /usr/lib64/libstdc++.so.6
#⁠5 0x00007fffee34c5f1 in __gxx_personality_v0 () from /usr/lib64/libstdc++.so.6
#⁠6 0x00007fffede06323 in ?? () from /lib64/libgcc_s.so.1
#⁠7 0x00007fffede063f7 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#⁠8 0x00007fffe2524836 in IscDbcLibrary::IscResultSet::~IscResultSet() () from /usr/lib64/libOdbcFb.so
#⁠9 0x00007fffe2514828 in IscDbcLibrary::IscMetaDataResultSet::~IscMetaDataResultSet() () from /usr/lib64/libOdbcFb.so
#⁠10 0x00007fffe251cf44 in IscDbcLibrary::IscProceduresResultSet::~IscProceduresResultSet() () from /usr/lib64/libOdbcFb.so
#⁠11 0x00007fffe251b471 in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure(char const*, int&, int&, bool&) () from /usr/lib64/libOdbcFb.so
#⁠12 0x00007fffe251ac2a in IscDbcLibrary::IscConnection::getNativeSql(char const*, int, char*, int, int*) () from /usr/lib64/libOdbcFb.so
#⁠13 0x00007fffe257aeee in OdbcJdbcLibrary::OdbcStatement::sqlPrepare(unsigned char*, int) () from /usr/lib64/libOdbcFb.so
#⁠14 0x00007fffe254723f in SQLPrepare () from /usr/lib64/libOdbcFb.so
#⁠15 0x00007fffec90f5df in SQLPrepare () from /usr/lib64/libodbc.so.2
#⁠16 0x00007ffff7bae60b in odbc::PreparedStatement::_prepare (this=<value optimized out>) at preparedstatement.cpp:86
#⁠17 0x00007ffff7bae8c0 in odbc::PreparedStatement::PreparedStatement (this=0x7e32e4e0, con=<value optimized out>, hstmt=<value optimized out>, sql=<value optimized out>, resultSetType=<value optimized out>, resultSetConcurrency=<value optimized out>, defaultDirection=1) at preparedstatement.cpp:69
#⁠18 0x00007ffff7ba4ad1 in odbc::Connection::prepareStatement (this=0x7dffa680, sql="{ call SYS_ADD_STAT_COUNTER(?,?,?,?) };", resultSetType=0, resultSetConcurrency=0) at connection.cpp:480
#⁠19 0x0000000000470ab1 in STAT::CfStatFBDBAppender::flushCounter (this=0xdb5140, name="SOAPRA_sendAnswers", type=<value optimized out>, val="0") at ../../../viper/src/framework/statistics/CfStatFBDBAppender.cpp:218
#⁠20 0x0000000000476ebc in STAT::CfStatistics::thread () at ../../../viper/src/framework/statistics/CfStatistics.cpp:470
#⁠21 0x00007ffff7564aa3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.51.0
#⁠22 0x00007fffef0b07f1 in start_thread () from /lib64/libpthread.so.0
#⁠23 0x00007fffedb3a70d in clone () from /lib64/libc.so.6

Stdout:
terminate called after throwing an instance of 'IscDbcLibrary::SQLError'
what(): std::exception

I've investigated a problem and I think that in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure function exception is thrown and in the process of stack unwinding the second exception is thrown in destuctor:
IscResultSet::~IscResultSet()
{
close();
}

I've fixed it by changing the destuctor IscResultSet::~IscResultSet():

IscResultSet::~IscResultSet()
{
try
{
close();
}
catch (std::exception &e)
{
fprintf (stdout, "Failed while deleting IscResultSet (exception: \"%s\")\n",
e.what());
}
catch (...)
{
fprintf (stdout, "Failed while deleting IscResultSet (unknown exception)\n");
}
}

After this the program is terminated.

@firebird-automations
Copy link
Author

Modified by: Egor Kromberg (kromberg)

description: FB ODBC Driver crash in case of unstable network
Backtrace:
#⁠0 0x00007fffeda87885 in raise () from /lib64/libc.so.6
#⁠1 0x00007fffeda89065 in abort () from /lib64/libc.so.6
#⁠2 0x00007fffee34ea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#⁠3 0x00007fffee34cc06 in ?? () from /usr/lib64/libstdc++.so.6
#⁠4 0x00007fffee34bb99 in ?? () from /usr/lib64/libstdc++.so.6
#⁠5 0x00007fffee34c5f1 in __gxx_personality_v0 () from /usr/lib64/libstdc++.so.6
#⁠6 0x00007fffede06323 in ?? () from /lib64/libgcc_s.so.1
#⁠7 0x00007fffede063f7 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#⁠8 0x00007fffe2524836 in IscDbcLibrary::IscResultSet::~IscResultSet() () from /usr/lib64/libOdbcFb.so
#⁠9 0x00007fffe2514828 in IscDbcLibrary::IscMetaDataResultSet::~IscMetaDataResultSet() () from /usr/lib64/libOdbcFb.so
#⁠10 0x00007fffe251cf44 in IscDbcLibrary::IscProceduresResultSet::~IscProceduresResultSet() () from /usr/lib64/libOdbcFb.so
#⁠11 0x00007fffe251b471 in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure(char const*, int&, int&, bool&) () from /usr/lib64/libOdbcFb.so
#⁠12 0x00007fffe251ac2a in IscDbcLibrary::IscConnection::getNativeSql(char const*, int, char*, int, int*) () from /usr/lib64/libOdbcFb.so
#⁠13 0x00007fffe257aeee in OdbcJdbcLibrary::OdbcStatement::sqlPrepare(unsigned char*, int) () from /usr/lib64/libOdbcFb.so
#⁠14 0x00007fffe254723f in SQLPrepare () from /usr/lib64/libOdbcFb.so
#⁠15 0x00007fffec90f5df in SQLPrepare () from /usr/lib64/libodbc.so.2
#⁠16 0x00007ffff7bae60b in odbc::PreparedStatement::_prepare (this=<value optimized out>) at preparedstatement.cpp:86
#⁠17 0x00007ffff7bae8c0 in odbc::PreparedStatement::PreparedStatement (this=0x7e32e4e0, con=<value optimized out>, hstmt=<value optimized out>, sql=<value optimized out>, resultSetType=<value optimized out>, resultSetConcurrency=<value optimized out>, defaultDirection=1) at preparedstatement.cpp:69
#⁠18 0x00007ffff7ba4ad1 in odbc::Connection::prepareStatement (this=0x7dffa680, sql="{ call SYS_ADD_STAT_COUNTER(?,?,?,?) };", resultSetType=0, resultSetConcurrency=0) at connection.cpp:480
#⁠19 0x0000000000470ab1 in STAT::CfStatFBDBAppender::flushCounter (this=0xdb5140, name="SOAPRA_sendAnswers", type=<value optimized out>, val="0") at ../../../viper/src/framework/statistics/CfStatFBDBAppender.cpp:218
#⁠20 0x0000000000476ebc in STAT::CfStatistics::thread () at ../../../viper/src/framework/statistics/CfStatistics.cpp:470
#⁠21 0x00007ffff7564aa3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.51.0
#⁠22 0x00007fffef0b07f1 in start_thread () from /lib64/libpthread.so.0
#⁠23 0x00007fffedb3a70d in clone () from /lib64/libc.so.6

Stdout:
terminate called after throwing an instance of 'IscDbcLibrary::SQLError'
what(): std::exception

I've investigated a problem and I think that in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure function exception is thrown and in the process of stack unwinding the second exception is thrown in destuctor:
IscResultSet::~IscResultSet()
{
close();
}

I've fixed it by changing the destuctor IscResultSet::~IscResultSet():

IscResultSet::~IscResultSet()
{
try
{
close();
}
catch (std::exception &e)
{
fprintf (stdout, "Failed while deleting IscResultSet (exception: \"%s\")\n",
e.what());
}
catch (...)
{
fprintf (stdout, "Failed while deleting IscResultSet (unknown exception)\n");
}
}

After this the program is terminated.

=>

FB ODBC Driver crash in case of unstable network
Backtrace:
#⁠0 0x00007fffeda87885 in raise () from /lib64/libc.so.6
#⁠1 0x00007fffeda89065 in abort () from /lib64/libc.so.6
#⁠2 0x00007fffee34ea7d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib64/libstdc++.so.6
#⁠3 0x00007fffee34cc06 in ?? () from /usr/lib64/libstdc++.so.6
#⁠4 0x00007fffee34bb99 in ?? () from /usr/lib64/libstdc++.so.6
#⁠5 0x00007fffee34c5f1 in __gxx_personality_v0 () from /usr/lib64/libstdc++.so.6
#⁠6 0x00007fffede06323 in ?? () from /lib64/libgcc_s.so.1
#⁠7 0x00007fffede063f7 in _Unwind_Resume () from /lib64/libgcc_s.so.1
#⁠8 0x00007fffe2524836 in IscDbcLibrary::IscResultSet::~IscResultSet() () from /usr/lib64/libOdbcFb.so
#⁠9 0x00007fffe2514828 in IscDbcLibrary::IscMetaDataResultSet::~IscMetaDataResultSet() () from /usr/lib64/libOdbcFb.so
#⁠10 0x00007fffe251cf44 in IscDbcLibrary::IscProceduresResultSet::~IscProceduresResultSet() () from /usr/lib64/libOdbcFb.so
#⁠11 0x00007fffe251b471 in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure(char const*, int&, int&, bool&) () from /usr/lib64/libOdbcFb.so
#⁠12 0x00007fffe251ac2a in IscDbcLibrary::IscConnection::getNativeSql(char const*, int, char*, int, int*) () from /usr/lib64/libOdbcFb.so
#⁠13 0x00007fffe257aeee in OdbcJdbcLibrary::OdbcStatement::sqlPrepare(unsigned char*, int) () from /usr/lib64/libOdbcFb.so
#⁠14 0x00007fffe254723f in SQLPrepare () from /usr/lib64/libOdbcFb.so
#⁠15 0x00007fffec90f5df in SQLPrepare () from /usr/lib64/libodbc.so.2
#⁠16 0x00007ffff7bae60b in odbc::PreparedStatement::_prepare (this=<value optimized out>) at preparedstatement.cpp:86
#⁠17 0x00007ffff7bae8c0 in odbc::PreparedStatement::PreparedStatement (this=0x7e32e4e0, con=<value optimized out>, hstmt=<value optimized out>, sql=<value optimized out>, resultSetType=<value optimized out>, resultSetConcurrency=<value optimized out>, defaultDirection=1) at preparedstatement.cpp:69
#⁠18 0x00007ffff7ba4ad1 in odbc::Connection::prepareStatement (this=0x7dffa680, sql="{ call SYS_ADD_STAT_COUNTER(?,?,?,?) };", resultSetType=0, resultSetConcurrency=0) at connection.cpp:480
#⁠19 0x0000000000470ab1 in STAT::CfStatFBDBAppender::flushCounter (this=0xdb5140, name="SOAPRA_sendAnswers", type=<value optimized out>, val="0") at ../../../viper/src/framework/statistics/CfStatFBDBAppender.cpp:218
#⁠20 0x0000000000476ebc in STAT::CfStatistics::thread () at ../../../viper/src/framework/statistics/CfStatistics.cpp:470
#⁠21 0x00007ffff7564aa3 in thread_proxy () from /usr/local/lib/libboost_thread.so.1.51.0
#⁠22 0x00007fffef0b07f1 in start_thread () from /lib64/libpthread.so.0
#⁠23 0x00007fffedb3a70d in clone () from /lib64/libc.so.6

Stdout:
terminate called after throwing an instance of 'IscDbcLibrary::SQLError'
what(): std::exception

I've investigated a problem and I think that in IscDbcLibrary::IscConnection::getCountInputParamFromProcedure function exception is thrown and in the process of stack unwinding the second exception is thrown in destuctor:
IscResultSet::~IscResultSet()
{
close();
}

After this the program is terminated.

I've fixed it by changing the destuctor IscResultSet::~IscResultSet():

IscResultSet::~IscResultSet()
{
try
{
close();
}
catch (std::exception &e)
{
fprintf (stdout, "Failed while deleting IscResultSet (exception: \"%s\")\n",
e.what());
}
catch (...)
{
fprintf (stdout, "Failed while deleting IscResultSet (unknown exception)\n");
}
}

@firebird-automations
Copy link
Author

Modified by: @alexpotapchenko

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 2.0.6 [ 10851 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants