[freetds] Thread Safety
martin A.
acevedoma at hotmail.com
Wed Nov 9 19:17:47 EST 2005
Is freetrds thread safe? I´m working on a project that uses the freetds with
a lot of simultaneus calls to db-lib functions from differents threads. In
serveral cases the library generates a core dump file within some functions,
mostly during the login phase. I would like to know if the db-library is
thread safe or it has a bug. Should I put some mutex manually between the
calls to the library or the library already has this mutexes within?
I receive some errors
for example in
1) int tds_connect(TDSSOCKET * tds, TDSCONNECTION * connection)
...
Line 235: if (IS_TDS80(tds)) {
...
//the variable "tds" is out of memory (0x80) (using GDB under linux)
....
2) in
tds_open_socket(TDSSOCKET * tds, const char *ip_addr, unsigned int port, int
timeout)
....
Line 235: if (retval < 0 || (now - start) >= timeout) {
Line 236: tdsdump_log(TDS_DBG_ERROR, "tds_open_socket: %s:%d: %s\n",
tds_inet_ntoa_r(sin.sin_addr, ip, sizeof(ip)), ntohs(sin.sin_port),
strerror(sock_errno));
Line 237: tds_close_socket(tds);
Line 238: tds_client_msg(tds->tds_ctx, tds, 20009, 9, 0, 0, "Server is
unavailable or does not exist.");
Line 239: return TDS_FAIL;
Line 240: }
....
core dump at "tdsdump_log" ..... "tds" and "ip_addr" point to "0x00"
Well, that is all , I have the las CVS version(9/11)
Thank you....
More information about the FreeTDS
mailing list