Hi,
I have compiled the today's CVS version of the mdbtools
on a 64bit Linux machine. Unfortunately the following
command crashes:
mdb-export -I StazioniAutomatiche.mdb Misure
Segmentation fault
while it works well on a 32bit Linux machine. Both distros
are Redhat Enterprise 4 (RHEL4).
A bit of debugging (I cannot sent the file since it is 1.4GB):
strace mdb-export -I StazioniAutomatiche.mdb Misure
...
read(3, "\1\1\326\16\0\0\0\0\0\0\0\0\4\0\273\17v\0171\17\354\16"..., 4096) =
4096
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2a95699000
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2a956ca000
mmap(NULL, 200704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2a956fb000
fstat(3, {st_mode=S_IFREG|0644, st_size=1479475200, ...}) = 0
lseek(3, 73728, SEEK_SET) = 73728
read(3, "\1\1V\6\20\0\0\0\0\0\0\0,\0\313\17\241\17e\0175\17\376"..., 4096) =
4096
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
gdb `which mdb-export`
r -I StazioniAutomatiche.mdb Misure
Program received signal SIGSEGV, Segmentation fault.
0x000000345dc227cc in __gconv_transform_ucs2_internal () from
/lib64/tls/libc.so.6
bt
#0 0x000000345dc227cc in __gconv_transform_ucs2_internal () from
/lib64/tls/libc.so.6
#1 0x000000345dc1d538 in __gconv () from /lib64/tls/libc.so.6
#2 0x000000345dc1cb9b in iconv () from /lib64/tls/libc.so.6
#3 0x0000002a955663dc in mdb_unicode2ascii (mdb=0x502600, src=0x503607 "°",
slen=0,
dest=0x5199d0 "Temperatura aria Istantanea 60 min", dlen=16384) at
iconv.c:73
#4 0x0000002a9555ff47 in mdb_col_to_string (mdb=0x502600, buf=0x502614,
start=4047, datatype=10,
size=36) at data.c:848
#5 0x0000002a9555e83b in mdb_xfer_bound_data (mdb=0x502600, start=4047,
col=0x515690, len=36)
at data.c:222
#6 0x0000002a9555eadd in _mdb_attempt_bind (mdb=0x502600, col=0x515690,
isnull=0 '\0',
offset=4047, len=36) at data.c:306
#7 0x0000002a9555ea2f in mdb_read_row (table=0x515210, row=0) at data.c:284
#8 0x0000002a9555ee6e in mdb_fetch_row (table=0x515210) at data.c:402
#9 0x000000000040121f in main (argc=4, argv=0x7fbffff808) at mdb-export.c:157
(gdb) bt full
...
is_fixed = 53 '5', colnum = 0, offset = 4196064}, {value = 0x515610, siz =
1569807600,
start = 52, is_null = 48 '0', is_fixed = 246 'ö', colnum = 127, offset =
-1073744400}, {
value = 0x93635d7, siz = 4196064, start = 0, is_null = 0 '\0', is_fixed = 0
'\0', colnum = 0,
offset = 1568700462}, {value = 0x0, siz = 1, start = 0, is_null = 0 '\0',
is_fixed = 0 '\0',
colnum = 0, offset = -1789540033}, {value = 0x1000, siz = 73728, start = 0,
is_null = 2 '\002', is_fixed = 9 '\t', colnum = 0, offset = 13795360},
{value = 0x1,
siz = 33188, start = 1338, is_null = 204 'Ì', is_fixed = 0 '\0', colnum =
0, offset = 0}, {
value = 0x582f0000, siz = 4096, start = 0, is_null = 144 '\220', is_fixed =
34 '"',
colnum = 0, offset = 1121438862}, {value = 0x325bbbe9, siz = 1111569942,
start = 0,
is_null = 0 '\0', is_fixed = 0 '\0', colnum = 0, offset = 1121152771},
{value = 0x0, siz = 0,
start = 0, is_null = 0 '\0', is_fixed = 0 '\0', colnum = 0, offset = 0},
{value = 0x1000,
siz = 18, start = 0, is_null = 20 '\024', is_fixed = 38 '&', colnum = 0,
offset = 5252608}, {
value = 0x7fbffff630, siz = -1789540359, start = 42, is_null = 0 '\0',
is_fixed = 16 '\020',
colnum = 0, offset = 4096}}
num_fields = 3
#8 0x0000002a9555ee6e in mdb_fetch_row (table=0x515210) at data.c:402
mdb = (MdbHandle *) 0x502600
fmt = (MdbFormatConstants *) 0x2a9566a780
rows = 44
rc = 5329424
pg = 0
#9 0x000000000040121f in main (argc=4, argv=0x7fbffff808) at mdb-export.c:157
j = 3
mdb = (MdbHandle *) 0x502600
table = (MdbTableDef *) 0x515210
col = (MdbColumn *) 0x0
bound_values = (char **) 0x517290
bound_lens = (int *) 0x5159b0
delimiter = 0x502010 ","
row_delimiter = 0x502030 "\n"
header_row = 0 '\0'
quote_text = 1 '\001'
insert_statements = 1 '\001'
sanitize = 0 '\0'
opt = -1
Using 'ddd' it dies in
mdb-export.c:157
while(mdb_fetch_row(table)) {
Do you have any ideas? I'm not sure how to continue
debugging... The bug seems to be in
mdbtools/src/libmdb/data.c
Maybe related to guint32? (sorry, just guessing).
Thanks anyway for maintaining the mdbtools!
Markus
--
Markus Neteler <neteler itc it> http://mpa.itc.it
ITC-irst - Centro per la Ricerca Scientifica e Tecnologica
MPBA - Predictive Models for Biol. & Environ. Data Analysis
Via Sommarive, 18 - 38050 Povo (Trento), Italy
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
|