Re: tsql dumping core on exit

"Vanderveen, Jim" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
Thanks for the suggestion! I'm using FreeBSD, so to pass in the "-g" option I did the following:

# env CFLAGS=-pipe DEBUG_FLAGS=-g portmaster databases/freetds

This should disable optimization and enable debug symbols (I think).

To make sure that optimization chagnes didn't affect anything, I tested tsql again:

$ tsql -S development -U ******** -P ******** <test.sql
locale is "C"
locale charset is "US-ASCII"
1> use master
2> go
1> exit
Segmentation fault: 11 (core dumped)

Finally, here is the gdb output with DEBUG=-g:

$ gdb tsql
GNU gdb 6.1.1 [FreeBSD]
This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
(gdb) run -S development -U ******** -P ******** <test.sql
Starting program: /usr/local/bin/tsql -S development -U ******** -P ******** <test.sql
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...locale is "C"
locale charset is "US-ASCII"
(no debugging symbols found)...(no debugging symbols found)...[New LWP 100232]
[New Thread 0x2842c040 (LWP 100232)]
1> use master
2> go
1> exit
[New LWP 100232]
suspend error: generic error
[Switching to LWP 100232]
Stopped due to shared library event
(gdb) bt
#0  0x28075ef0 in r_debug_state () from /libexec/ld-elf.so.1
#1  0x28079d0b in dlclose () from /libexec/ld-elf.so.1
#2  0x282885f4 in gethostbyaddr () from /lib/libc.so.7
#3  0x282886e1 in gethostbyaddr () from /lib/libc.so.7
#4  0x282887e8 in gethostbyaddr () from /lib/libc.so.7
#5  0x2828d233 in __cxa_finalize () from /lib/libc.so.7
#6  0x2823b40a in exit () from /lib/libc.so.7
#7  0x0804997f in _start1 ()
#8  0x080498e5 in _start ()
#9  0x28079d50 in dlclose () from /libexec/ld-elf.so.1
#10 0x00000007 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) y


I notice many "(no debugging symbols found)" messages still, but the backtrace looks a bit more useful?

TIA,
Jim Vanderveen

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of [email protected]
Subject: Re: [freetds] tsql dumping core on exit

Hi, Jim,
You need to compile FreeTDS with "-g" option to enable
debug information for the library.
Otherwise James/Frediano will just guess.... ;-)

Thank you.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.