[freetds] freetds] Bus error with dbopen when FreeTDS on Solaris 8

ldai ldai at accunettech.com
Tue Aug 24 22:41:07 EDT 2004


On Tue, 24 Aug 2004 11:05:26 +0800, ldai wrote
> Hi,everybody:
>    I have met a strange problem with freetds's db-lib.
>    I am only to do connecting sqlserver operation in solaris 8. When 
> my code ran more than 2 days. I got a bus error.   I found bus error 
> would occur when calling dbopen and didn't return any value.   My 
> test  code is multithread and I must free any memory and struction 
> strictly.    Do you meet so strange problem? Can you help me? Or 
> give me some advice.   Thank you very much.
> 
>    My code is running in solaris , Freetds package is 0.62.4 
> ,sqlserver 2000 + win2000Server and tds version is 4.2.   My test 
> code is written in C language.   This is core code in my test code: 
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 		if (dbinit() == FAIL)
> 		{
> 			strcpy(cfReturnMessage, "");
> 			strcpy(cfReturnMessage, "Failed to connect 
> database. ");
> 			iFailFlag++;
> 			goto f_error;
> 		}
> 		login = dblogin();
> 		if(login==NULL)
> 		{
> 			strcpy(cfReturnMessage, "");
> 			strcpy(cfReturnMessage, "Failed to connect 
> database. ");
> 			iFailFlag++;
> 			goto f_error;
> 		}
> 		if( login < 0)
> 		{
> 			strcpy(cfReturnMessage, "");
> 			strcpy(cfReturnMessage, "Failed to connect 
> database. ");
> 			goto f_error;
> 		}
> 		DBSETLUSER(login, sUserName);
> 		DBSETLPWD(login, sPasswd);
> 		DBSETLAPP(login, "Leon-2");
> 		//This point will occur bus error when calling more than 2 
> days.
> 		dbproc = dbopen(login, sServerName);
> 		if(dbproc==NULL)
> 		{
> 			strcpy(cfReturnMessage, "");
> 			strcpy(cfReturnMessage, "Failed to connect 
> database. ");
> 			goto f_error;
> 		}
> 
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
I got a core file. I found some message in it. Could you give me some help or 
advice?
Thank you.
|+++++++++++++++++++++++++++++++++++++++++++++++++++++++++|
This GDB was configured as "sparc-sun-solaris2.8"...
Core was generated by `/export/home/leon/mssql/ms_t'.
Program terminated with signal 10, Bus error.
Error accessing memory address 0xff3e2004: Invalid argument.
#0  tdsdbopen (login=0xffffffff, server=0xfe909620 <Error reading address 
0xfe909620: Invalid argument>) at dblib.c:941
941             tds_set_server(login->tds_login, server);

(gdb) bt
#0  tdsdbopen (login=0xffffffff, server=0xfe909620 <Error reading address 
0xfe909620: Invalid argument>) at dblib.c:941
Error accessing memory address 0xfe90945c: Invalid argument.

--
Open WebMail Project (http://openwebmail.org)




More information about the FreeTDS mailing list