[unixODBC-dev] libodbcpsql seems seems sensitive to EOFs from Postgresql

Robert Kiesling kiesling at earthlink.net
Sun Jan 20 23:25:36 GMT 2008


> Robert Kiesling wrote:
> 
> >>Robert Kiesling <kiesling at earthlink.net> writes:
> >>    
> >>
> >>>The libodbcpsql driver seems sensitive to EOFs from Postgres, 8.2.6.
> >>>The fault seems to occur intermittently in SQLGetDiagRec, and causes
> >>>either unixODBC, version 2.1.12, or Perl, connected to unixODBC with
> >>>UnixODBC.pm, to segfault.
> >>>      
> >>>
> >>>The error is: "LOG:  unexpected EOF on client connection" printed on the terminal,
> >>>then a segfault
> >>>      
> >>>
> >>I think you've got the causality backward.  That log message is the
> >>server reporting that the client dropped the connection ungracefully.
> >>
> >>Can we see a gdb stack trace from the segfault?
> >>    
> >>
> >
> >I was able to duplicate the error with a test program.  Here is the
> >gdb output.
> >  
> >
> 
> Check if you have built the postgres driver for 2 or 4 byte unicode, 
> unixODSBC by default uses 2, I think the postgres driver may default to 4.
> 
> -- 
> Nick

The driver should be built for 2-byte unicode, because this system
does not have iconv on it (though the #define statement below says the
system has it).  

Here's the lines from config.log.  If the encoding is given somewhere 
else, I'll look there also.

ICONV_CHAR_ENCODING='auto-search'
ICONV_UNICODE_ENCODING='auto-search'

FWIW, here are the #defines from the Drivers/Postgre7.1 Makefile.

DEFS = -DUNIXODBC -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACK
AGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"unixODBC\" -DVERSION=\"2.2.12\" -DYYT
EXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H
=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_SEM_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ICONV=1 -DICONV_CONST= -DH
AVE_LIBCRYPT=1 -DHAVE_READLINE_HISTORY_H=1 -DHAVE_READLINE=1 -DTIME_WITH_SYS_TIME=1 -DHAVE
_SYS_TIME_H=1 -DSIZEOF_LONG=4 -DHAVE_LONG_LONG=1 -DHAVE_STRCASECMP=1 -DHAVE_STRNCASECMP=1 
-DHAVE_VSNPRINTF=1 -DHAVE_STRTOL=1 -DHAVE_ATOLL=1 -DHAVE_STRTOLL=1 -DHAVE_ENDPWENT=1 -DHAV
E_LIBPTHREAD=1 -D_REENTRANT=1 -DHAVE_LOCALTIME_R=1 -DHAVE_FTOK=1 -DHAVE_SEMGET=1 -DHAVE_SH
MGET=1 -DHAVE_SEMOP=1 -DHAVE_SNPRINTF=1 -DNEED_SEMUNDO_UNION=1 -DCOLLECT_STATS=1 -DSTDC_HE
ADERS=1 -DHAVE_MALLOC_H=1 -DHAVE_UNISTD_H=1 -DHAVE_PWD_H=1 -DHAVE_CRYPT_H=1 -DHAVE_LIMITS_
H=1 -DHAVE_STRINGS_H=1 -DHAVE_STRING_H=1 -DHAVE_LOCALE_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS
_SEM_H=1 -DHAVE_STDARG_H=1 -DHAVE_DIRENT_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_VPRI
NTF=1 -DHAVE_PUTENV=1 -DHAVE_SOCKET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -DHAVE_SETENV=1 -DHA
VE_SETLOCALE=1 -DHAVE_STRCHR=1 -DUNIXODBC_SOURCE=1 

-- 
Ctalk Home Page: http://www.ctalklang.org/




More information about the unixODBC-dev mailing list