Skip to Content.
Sympa Menu

freetds - Re: [freetds] Subject: SIGSEGV

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Subject: SIGSEGV
  • Date: Tue, 30 Aug 2005 09:41:02 -0400

> From: Gustavo A. Gonzalez
> Sent: Tuesday, August 30, 2005 9:20 AM
>
> hi all!...im working with dblib to process some stored procedures with SQL
> SERVER and in a while, processing that sps results in a SIGSEGV and core
> dump. In my pourposes to solve that problem i get from gdb the following
> lines:
>
> #0 0x005fc9b3 in main_arena () from /lib/tls/libc.so.6
> #1 0x005fc8c8 in main_arena () from /lib/tls/libc.so.6
> #2 0x00595d3c in ___newselect_nocancel () from /lib/tls/libc.so.6
> #3 0xf64e364b in goodread (tds=0xd96d3d8, buf=0xfbad8001 <Address
> 0xfbad8001 out of bounds>, buflen=227988440) at read.c:114
^^^^^^^^^^^^^
> #4 0xf64e3756 in goodread (tds=0x5fc911, buf=0xf4725c70 "ô¯_", buflen=8)
> at read.c:176
> #5 0xf64e3959 in tds_read_packet (tds=0xd96d3d8) at read.c:508
> #6 0xf64e3cc7 in tds_get_byte (tds=0xd96d3d8) at read.c:209
> #7 0xf64e3d12 in tds_peek (tds=0xd96d3d8) at read.c:232
> #8 0xf64d1141 in dbsqlok (dbproc=0xf64f358f) at dblib.c:3888

Congratulations! This kind of problem was pretty common a few years ago, but
has gotten pretty rare in the network library. Thanks for finding it.

> But i don't know where is the problem ....any ideas about what causes a
> sigsegv?

Same thing as always. Trying to use unallocated memory. The bane of C.

Obviously dbsqlok() tries to read from the network, gets 8 bytes of
something, and then gets in real trouble on line 114 (frame #3). It's all
downhill from there.

It's hard to diagnose with only the bt. Can you post a TDSDUMP log and its
bt? That should show us what the server sent and let us see if there's a
protocol problem.

Regards,

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.



  • [freetds] Subject: SIGSEGV, Gustavo A. Gonzalez, 08/30/2005
    • <Possible follow-up(s)>
    • Re: [freetds] Subject: SIGSEGV, Lowden, James K, 08/30/2005

Archive powered by MHonArc 2.6.24.

Top of Page