Skip to Content.
Sympa Menu

freetds - Re: [freetds] DBI::ODBC segmentation Fault

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Boucher, Chuck" <ChuckBoucher AT SafetyInsurance.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] DBI::ODBC segmentation Fault
  • Date: Mon, 7 Nov 2005 13:19:59 -0500

That gets rid of the segmentation fault for the simple script I
displayed. Now, how would I apply that to a cgi script? Or make it
global instead of having to load it in a profile (/etc/profile)

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Patrick Gu
Sent: Monday, November 07, 2005 1:11 PM
To: 'FreeTDS Development Group'
Subject: Re: [freetds] DBI::ODBC segmentation Fault

Chunk,

I encountered the exact same problem on same configuration you have. Try
set 'export PERL_DL_NONLAZY=1', my seg fault goes away after that. If
anyone has any better solution or know the root of the cause, please let
me know.

-Patrick

-----Original Message-----
From: freetds-bounces AT lists.ibiblio.org
[mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Boucher, Chuck
Sent: Monday, November 07, 2005 10:04 AM
To: freetds AT lists.ibiblio.org
Subject: [freetds] DBI::ODBC segmentation Fault

I am having issues with DBI::ODBC on a Red Hat Enterprise server. I have
configured freeTDS, unixODBC and DBI / DBD::ODBC on this server. I can
connect successfully and query my MS SQL 2000 database via tsql
(connection only) and isql (connection and query).

However, when I try a simple DBI request such as the following:
perl -e 'use DBI;my $dbh =
DBI->connect("dbi:ODBC:DSN=Production;UID=content1_badsg-1;PWD=content1;
");'

The result is ALWAYS a Segmentation Fault.

Here are the specifics:
OS is RedHat Enterprise 4
Perl is version is 5.8.5
freeTDS version is 0.63
unixODBC is version 2.2.9

Here are thew configuration files:
freetds.conf:

[global]
tds version = 4.2

[TDSprometheus]
host = 172.19.210.12
port = 1433
tds version = 7.0

[TDSproduction]
host = 172.18.210.12
port = 1433
tds version = 7.0

[TDSLocalServer]
host = 172.19.210.12
port = 1433
tds version = 7.0

odbc.ini:

[LocalServer]
Driver = TDS
Description = LocalServer MS SQL DSN
Trace = Yes
TraceFile = /tmp/sql.log
Server = 172.19.210.12
Database = AVC
UID = content1_badsg-1

[Production]
Driver = TDS
Description = LocalServer MS SQL DSN
Trace = Yes
TraceFile = /tmp/sql.log
Server = 172.19.210.12
Database = AVC
UID = content1_badsg-1

odbcinst.ini

[TDS]
Description = MS SQL driver
Driver = /usr/local/lib/libtdsodbc.so
DontDLClose = 1
UsageCount = 1

Here is a sample of the freetds.log that I write:

Starting log file with debug level 99.
2005-11-07 13:02:19.441296 iconv will convert client-side data to the ""
character set
2005-11-07 13:02:19.441436 Connecting addr 172.19.210.12 port 1433 with
TDS version 7.0
2005-11-07 13:02:19.441838 inside tds_process_login_tokens() Received
header @ 2005-11-07 13:02:19.443215
0000 04 01 01 9c 00 38 01 00 |.....8..|


Received packet @ 2005-11-07 13:02:19.443249
0000 e3 15 00 01 03 41 00 56 00 43 00 06 6d 00 61 00 |.....A.V
.C..m.a.|
0010 73 00 74 00 65 00 72 00 ab 64 00 45 16 00 00 02 |s.t.e.r.
.d.E....|
0020 00 22 00 43 00 68 00 61 00 6e 00 67 00 65 00 64 |.".C.h.a
.n.g.e.d|
0030 00 20 00 64 00 61 00 74 00 61 00 62 00 61 00 73 |. .d.a.t
.a.b.a.s|
0040 00 65 00 20 00 63 00 6f 00 6e 00 74 00 65 00 78 |.e. .c.o
.n.t.e.x|
0050 00 74 00 20 00 74 00 6f 00 20 00 27 00 41 00 56 |.t. .t.o .
.'.A.V|
0060 00 43 00 27 00 2e 00 0a 50 00 52 00 4f 00 4d 00 |.C.'....
P.R.O.M.|
0070 45 00 54 00 48 00 45 00 55 00 53 00 00 00 00 e3 |E.T.H.E.
U.S.....|
0080 17 00 02 0a 75 00 73 00 5f 00 65 00 6e 00 67 00 |....u.s.
_.e.n.g.|
0090 6c 00 69 00 73 00 68 00 00 ab 6e 00 47 16 00 00 |l.i.s.h.
..n.G...|
00a0 01 00 27 00 43 00 68 00 61 00 6e 00 67 00 65 00 |..'.C.h.
a.n.g.e.|
00b0 64 00 20 00 6c 00 61 00 6e 00 67 00 75 00 61 00 |d. .l.a.
n.g.u.a.|
00c0 67 00 65 00 20 00 73 00 65 00 74 00 74 00 69 00 |g.e. .s.
e.t.t.i.|
00d0 6e 00 67 00 20 00 74 00 6f 00 20 00 75 00 73 00 |n.g. .t. o.
.u.s.|
00e0 5f 00 65 00 6e 00 67 00 6c 00 69 00 73 00 68 00 |_.e.n.g.
l.i.s.h.|
00f0 2e 00 0a 50 00 52 00 4f 00 4d 00 45 00 54 00 48 |...P.R.O
.M.E.T.H|
0100 00 45 00 55 00 53 00 00 00 00 e3 0f 00 03 05 69 |.E.U.S..
.......i|
0110 00 73 00 6f 00 5f 00 31 00 01 00 00 e3 0b 00 05 |.s.o._.1
........|
0120 04 31 00 30 00 33 00 33 00 00 e3 0f 00 06 06 31 |.1.0.3.3
.......1|
0130 00 39 00 36 00 36 00 30 00 39 00 00 ad 36 00 01 |.9.6.6.0
.9...6..|
0140 07 00 00 00 16 4d 00 69 00 63 00 72 00 6f 00 73 |.....M.i
.c.r.o.s|
0150 00 6f 00 66 00 74 00 20 00 53 00 51 00 4c 00 20 |.o.f.t.
.S.Q.L. |
0160 00 53 00 65 00 72 00 76 00 65 00 72 00 00 00 00 |.S.e.r.v
.e.r....|
0170 00 08 00 07 f7 e3 13 00 04 04 34 00 30 00 39 00 |........
..4.0.9.|
0180 36 00 04 34 00 30 00 39 00 36 00 fd 00 00 00 00 |6..4.0.9
.6......|
0190 00 00 00 00 |....|


2005-11-07 13:02:19.443452 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443489 inside tds_process_default_tokens() marker is
ab(INFO)
2005-11-07 13:02:19.443527 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443546 inside tds_process_default_tokens() marker is
ab(INFO)
2005-11-07 13:02:19.443573 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443593 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443611 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443630 inside tds_process_default_tokens() marker is
e3(ENVCHANGE)
2005-11-07 13:02:19.443652 increasing block size from 4096 to 4096
2005-11-07 13:02:19.443671 inside tds_process_default_tokens() marker is
fd(DONE)
2005-11-07 13:02:19.443698 inside tds_process_end() more_results = 0,
was_cancelled = 0
2005-11-07 13:02:19.443716 inside tds_process_default_tokens() setting
state to COMPLETED Sending packet @ 2005-11-07 13:02:19.443752
0000 01 01 00 22 00 00 01 00 73 00 65 00 6c 00 65 00 |..."....
s.e.l.e.|
0010 63 00 74 00 20 00 40 00 40 00 73 00 70 00 69 00 |c.t. .@.
@.s.p.i.|
0020 64 00 |d.|


Received header @ 2005-11-07 13:02:19.444116
0000 04 01 00 1d 00 38 01 00 |.....8..|


Received packet @ 2005-11-07 13:02:19.444145
0000 81 01 00 00 00 00 00 34 00 d1 38 00 fd 10 00 c1 |.......4
..8.....|
0010 00 01 00 00 00 |.....|


2005-11-07 13:02:19.444173 processing result tokens. marker is
81(TDS7_RESULT)
2005-11-07 13:02:19.444205 tds7_get_data_info:1083:
type = 52 (smallint)
column_varint_size = 0
colname =
colnamelen = 0
2005-11-07 13:02:19.444249 processing row tokens. marker is d1(ROW)
2005-11-07 13:02:19.444267 processing row. column is 0 varint size = 0
2005-11-07 13:02:19.444284 processing row. column size is 2
2005-11-07 13:02:19.444303 clearing column 0 NULL bit
2005-11-07 13:02:19.444320 processing row tokens. marker is fd(DONE)
2005-11-07 13:02:19.444337 inside tds_process_end() more_results = 0,
was_cancelled = 0
2005-11-07 13:02:19.444355 inside tds_process_result_tokens() state is
COMPLETED
2005-11-07 13:02:19.444371 leaving tds_process_login_tokens() returning
1
SQLGetFunctions: fFunction is 999
odbc: not implemented: SQLGetInfo: option/type 10000(SQL_XOPEN_CLI_YEAR)
[category Added for ODBC 3.x]

I hope someone can shed some light.

Thanks.

...Chuck Boucher
Email: chuckboucher AT safetyinsurance.com

_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds







Archive powered by MHonArc 2.6.24.

Top of Page