Skip to Content.
Sympa Menu

freetds - Re: [freetds] Compiling on FreeBSD without ICONV

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Alan Pettigrew" <alan AT pettigrew.fsnet.co.uk>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Compiling on FreeBSD without ICONV
  • Date: Tue, 10 Jun 2003 17:32:56 +0100

Replies to Freddy here. There is another post from James Lowden with other
info.
Alan
----- Original Message -----
From: "Frediano Ziglio" <freddyz77 AT tin.it>
To: "Alan Pettigrew" <alan AT pettigrew.fsnet.co.uk>; "FreeTDS Development
Group" <freetds AT lists.ibiblio.org>
Sent: Tuesday, June 10, 2003 3:40 PM
Subject: Re: [freetds] Compiling on FreeBSD without ICONV


Il mar, 2003-06-10 alle 15:06, Alan Pettigrew ha scritto:
> Here is some more trace from the crash. It gets into connect, but doesn't
> seem to return.
> I have tried with and without a timeout, and interestingly connect always
> seems to be trying to return EINPROGRESS. This is the version with
timeout.
>
> =================
> open("/tmp/freetds.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 8
> gettimeofday({1055242921, 538030}, NULL) = 0
> fstat(8, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
> write(8, "Starting log file for FreeTDS 0."..., 93) = 93
> write(8, "names for ISO-8859-1: ISO-8859-1"..., 33) = 33
> write(8, "names for UTF-8: UTF-8\n", 23) = 23
> write(8, "names for UCS-2LE: UCS-2LE\n", 27) = 27
> write(8, "names for UCS-2BE: UCS-2BE\n", 27) = 27
> write(8, "iconv to convert client-side dat"..., 68) = 68
> gettimeofday({1055242921, 540110}, NULL) = 0
> write(8, "12:02:01.540110 tds_iconv_info_i"..., 72) = 72
> gettimeofday({1055242921, 540572}, NULL) = 0
> write(8, "12:02:01.540572 tds_iconv_info_i"..., 71) = 71
> gettimeofday({1055242921, 541061}, NULL) = 0
> write(8, "12:02:01.541061 Connecting to 10"..., 60) = 60
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 9
> fcntl(9, F_GETFL) = 0x2 (flags O_RDWR)
> fcntl(9, F_SETFL, O_RDWR|O_NONBLOCK) = 0
> setsockopt(9, SOL_SOCKET, SO_LINGER, [1], 8) = 0
> setsockopt(9, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
> gettimeofday({1055242921, 542712}, NULL) = 0
> write(8, "12:02:01.542712 tds.s=0x9, sin=0"..., 97) = 97
> connect(9, {sin_family=AF_INET, sin_port=htons(1433),
> sin_addr=inet_addr("10.1.1.12")}}, 16) = -1 EINPROGRESS (Operation now in
> progress)
> sigaction(SIGABRT, {SIG_DFL}, {SIG_DFL}) = 0
> write(5, "Signal SEGV at /usr/local/lib/pe"..., 81) = 81
> write(5, "\tDBI::connect(\'DBI\', \'DBI:ODBC:e"..., 119) = 119
> write(5, "\tmain::open_database() called at"..., 55) = 55
> kill(89855, SIGABRT <unfinished ...>
> ==================================
>
> The gdb trace shows
> ========================
> (gdb) bt
> #0 0x28176b0c in kill () from /usr/lib/libc.so.4
> #1 0x28085a7e in Perl_apply () from /usr/lib/libperl.so.3
> #2 0x2808f916 in Perl_pp_kill () from /usr/lib/libperl.so.3
> #3 0x2807f11d in Perl_runops_standard () from /usr/lib/libperl.so.3
> #4 0x280e96ad in perl_call_sv () from /usr/lib/libperl.so.3
> #5 0x280bea01 in Perl_sighandler () from /usr/lib/libperl.so.3
> #6 0xbfbfffac in ?? () <=============== looks strange
> #7 0x281a13b6 in xdr_bytes () from /usr/lib/libc.so.4
> #8 0x281a1488 in xdr_netobj () from /usr/lib/libc.so.4
> #9 0x281b786a in .cerror () from /usr/lib/libc.so.4
> #10 0x2835f1cf in tds_connect (tds=0x8306d00, connect_info=0x8306c00)
> at login.c:316
> #11 0x2834edc6 in do_connect (dbc=0x8390ce0, connect_info=0x8306c00)
> at odbc.c:215
> ===============================
>
> This gdb trace suggests that there is an interface problem, connect is
> trying to return but is picking the wrong address off the stack.
>
> I'm not sure what Perl is doing that stops things.
>
> Alan
>

>>It seem a signal caught by Perl... Why connect try a signal and what
>>signal ??
I don't think that connect is intentionally signalling. It is SEGV, I think
from the exit from .cerror / xdr_netobj / xdr_bytes which seems to go to
address 0xbfbfffac.


>>#10 0x2835f1cf in tds_connect (tds=0x8306d00, connect_info=0x8306c00)
>> at login.c:316
>>
>>The return points to instruction after if. connect parameters seem ok.
I agree. The parameters seem OK.

>>>From trace connect seem to return EINPROGRESS. So, what does it fail ?
>>How is defined errno in your FreeBSD ??
in /usr/include/errno.h
#define errno (* __error())

>>write(8, "12:02:01.542712 tds.s=0x9, sin=0"..., 97) = 97
>>
>>Did you change login.c ?
Yes, I added trace before and after the call to connect to display more of
the parameters. I got the same failure before and after my changes.

>>freddy77

I hope this helps.

Alan





Archive powered by MHonArc 2.6.24.

Top of Page