freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Problems with large image transfers.
- From: David Lambert <dlambert AT lambsys.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Problems with large image transfers.
- Date: Tue, 21 Sep 2004 10:56:23 -0500
Thanks for the hints. I will concentrate on the segv problem for now:
This is a test database, so please feel free to access for testing.
/usr/local/etc/freetds.conf entry:
[TRAX]
host = AHQ1003.activehost.com
port = 1433
tds version = 8.0
As requested, here is the backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x00c189e2 in fwrite () from /lib/tls/libc.so.6
(gdb) backtrace
#0 0x00c189e2 in fwrite () from /lib/tls/libc.so.6
#1 0x08054d47 in _bcp_exec_out (dbproc=0x8f7a218, rows_copied=0xfef2c784)
at bcp.c:785
#2 0x08056732 in bcp_exec (dbproc=0x8f7a218, rows_copied=0xfef2c784)
at bcp.c:1624
#3 0x0804ab92 in file_character (pdata=0xfef2c7b0, dbproc=0x8f7a218, dir=2)
at freebcp.c:592
#4 0x0804982e in main (argc=13, argv=0xfef2f8e4) at freebcp.c:93
Run command was:
(gdb) run door_snaps out testbcpout -c -e errors -S TRAX -U etraxsales_user -P RxF39pqm
Lowden, James K wrote:
-----Original Message-----
From: David Lambert
Sent: Monday, September 20, 2004 10:48 PM
I am having problems using freebcp when transferring large images. If I use character format the program exits with a segmentation fault. Using the following format statement, I get:
Msg 20049, Level 4
Data-conversion resulted in overflow.
The format file is:
6.0
1
1 SYBIMAGE 0 100000 "\t" 5 snap_data
Using gdb on freebcp. The dbconvert routine is entered as follows:
dbconvert (dbproc=0x9c881e8, srctype=34, src=0x9cbe698 "ÿØÿà", srclen=4096,
desttype=34, dest=0x9caa998 "", destlen=255) at dblib.c:1673
This seems to indicate that the program thinks that the destination length (255?) is shorter than the source length (4096).
-----END-----
Can you really use tab-delimited image data? The image is guaranteed never to include 0x9?
Assuming that's OK, the only way I can see that the destlen would be 255 is if the
server says so. If the file data are longer than 4096, there's a "special
hack" in _bcp_read_hostfile that sets the destlen to the larger size. Else the
server's column size is used. Since you're looking at things with gdb already, trace
through _bcp_read_hostfile to see for yourself. ;-)
Things to double check:
1. The CREATE statement for the table. 2. The TDS protocol version. 3. The version of FreeTDS.
Note that dbconvert() is converting type 34 to 34 i.e., no conversion. The "Data-conversion resulted in overflow" message comes straight from dbconvert() when it can't copy the source to the destination because the destlen is too small.
BTW, freebcp should *never* segfault, so you found a bug. A backtrace would be very helpful.
There's more we can do, but let's get our ducks in a row first and see where we are.
Regards,
--jkl
-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information 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 mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
-
[freetds] Problems with large image transfers.,
David Lambert, 09/20/2004
- <Possible follow-up(s)>
-
RE: [freetds] Problems with large image transfers.,
Lowden, James K, 09/21/2004
- Re: [freetds] Problems with large image transfers., David Lambert, 09/21/2004
-
RE: [freetds] Problems with large image transfers.,
Lowden, James K, 09/21/2004
- Re: [freetds] Problems with large image transfers., David Lambert, 09/21/2004
-
RE: [freetds] Problems with large image transfers.,
Thompson, Bill D (London), 09/22/2004
- Re: [freetds] Problems with large image transfers., David Lambert, 09/22/2004
- RE: [freetds] Problems with large image transfers., Lowden, James K, 09/22/2004
- RE: [freetds] Problems with large image transfers., Thompson, Bill D (London), 09/22/2004
Archive powered by MHonArc 2.6.24.