4.1 2003-02-14 02:00: compile fixes / client crash (gdb trace)
am 16.02.2003 15:26:31 von Bjoern KriewsHi !
I had some trouble compiling a bitkeeper checkout dated 200302140200 on
a debian system
with gcc 2.95-4 and glibc 2.3.1-10:
How-To-Repeat:
The mysql-4.1 client crashes when loading completion info -
looks like strdup_root is passed the first 4 letters of a table name
as an address. (backtrace below)
I also copied a comment I've written on the install-source page about
things I had to fix to get it to compile.
Another one I found but couldn't reproduce yet:
I ran a 1.2 GB dump-import (with lock tables) and issued a query on
another connection that was blocked
by the insertion lock. Killing that one from a third connection led to
an assertion in protocol.cc and
made the server non-responsive. Log excerpt attached at the end.
Regards, Bjoern Kriews (mobile.de, but this is private)
client crash:
-------------
bkr@krokodil:~ > gdb
/opt/soft/pkg/linux-i686p3-gcc295-debug-mysql-4.1-bk20030214 0200-1/bin/
mysql
(gdb) run --socket=/tmp/mysql.1.sock
....
Your MySQL connection id is 16 to server version:
4.1.0-alpha-bk-200302140200-debug
mysql> use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Program received signal SIGSEGV, Segmentation fault.
0x0807617f in strdup_root (root=0x80aca2c, str=0x74736574
217 return strmake_root(root, str, strlen(str));
Current language: auto; currently c
(gdb) bt
#0 0x0807617f in strdup_root (root=0x80aca2c, str=0x74736574 0x74736574 out of bounds>) at my_alloc.c:217
#1 0x08069d3d in unpack_fields (data=0x80ac9d8, alloc=0x80aca2c,
fields=5, default_value=1 '\001', server_capabilities=57388) at
libmysql.c:1203
#2 0x0806daa0 in mysql_list_fields (mysql=0x809aa20, table=0x80ad018
"sr", wild=0x0) at libmysql.c:3283
#3 0x08053acf in build_completion_hash (rehash=true, write_info=true)
at mysql.cc:1311
#4 0x08055df4 in com_use (buffer=0x809a990, line=0x80ace60 "use test
") at mysql.cc:2407
#5 0x08052d24 in read_lines (execute_commands=true) at mysql.cc:878
#6 0x080523ba in main (argc=2, argv=0x809bdb8) at mysql.cc:402
compilation problems:
---------------------
# don't use charset german1, leads to non-constant initializers
# I found it too much trouble to make the compile against db-4.1.25,
so no BDB
# when you run the 4.1 client, use -A to avoid crashes or use the old
one
# (bug description with backtrace goes to the list)
# this is the script I run from the source directory after checkout
# it fixes two compile-hickups in a rather crude way but it rewards you
# with a running server :-)
p=/opt/soft/pkg/linux-i686p3-gcc295-debug-mysql-4.1-bk200302 140200-1
aclocal && autoheader && autoconf && automake &&
cd innobase && aclocal && autoheader && autoconf && automake && cd ..
CC=gcc \
CXX=gcc \
CFLAGS="-mcpu=pentiumpro -g3 -O3 -fno-omit-frame-pointer" \
CXXFLAGS="-mcpu=pentiumpro -g3 -O3 -fno-omit-frame-pointer
-felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=$p \
--with-embedded-server \
--with-raid \
--with-innodb \
--enable-assembler \
--with-debug \
--with-charset=latin1 \
--with-extra-charsets=utf8,ucs2 \
--enable-thread-safe-client \
--with-mysqld-user=username=mysql \
--with-server-suffix=-bk-200302140200 \
&&
for i in config.h include/my_config.h ; do
echo -e "\n#define HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1\n" >> $i
done &&
true
perl -pi -e 's/(SOCKET_SIZE_TYPE)\s+int/$1 socklen_t/'
include/my_config.h &&
make &&
make install &&
cp scripts/* $p/bin &&
rm $p/bin/Makefile*
server hang:
------------
/opt/soft/pkg/linux-i686p3-gcc295-debug-mysql-4.1-bk20030214 0200-1/
libexec/mysqld: ready for connections.
Version: '4.1.0-alpha-bk-200302140200-debug' socket:
'/tmp/mysql.1.sock' port: 3307
mysqld: protocol.cc:707: bool Protocol_simple::store(const char *,
unsigned int): Assertion `field_types == 0 || field_types[field_pos] ==
MYSQL_TYPE_DECIMAL ||
(field_types[field_pos] >= MYSQL_TYPE_ENUM && field_types[field_pos] <=
MYSQL_TYPE_GEOMETRY)' failed.
Number of processes running now: 1
mysqld process hanging, pid 18456 - killed
030215 23:13:06 mysqld restarted
030215 23:13:06 InnoDB: Database was not shut down normally.
InnoDB: Starting recovery from log files...
InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 694964520
InnoDB: Doing recovery: scanned up to log sequence number 0 695544764
InnoDB: 1 transaction(s) which must be rolled back or cleaned up
InnoDB: Trx id counter is 0 1792
030215 23:13:06 InnoDB: Starting an apply batch of log records to the
database...
InnoDB: Progress in percents: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
95 96 97 98 99
InnoDB: Apply batch completed
InnoDB: Starting rollback of uncommitted transactions
InnoDB: Rolling back trx with id 0 1350
030215 23:30:52 mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
030215 23:30:52 InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
030215 23:30:52 InnoDB: Log file ./ib_logfile0 did not exist: new to
be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
030215 23:30:52 InnoDB: Log file ./ib_logfile1 did not exist: new to
be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
030215 23:30:54 InnoDB: Started
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread13794@lists.mysql.com
To unsubscribe, e-mail