Bug #2241 -C make mysql thread crash
Submitted: 30 Dec 2003 20:47 Modified: 30 Dec 2003 22:51
Reporter: xuefer tinys Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0.17 OS:Linux (linux)
Assigned to: Dean Ellis CPU Architecture:Any

[30 Dec 2003 20:47] xuefer tinys
Description:
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16777216
read_buffer_size=1044480
max_used_connections=2
max_connections=256
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 408574 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x87ccea0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
frame pointer (ebp) is NULL, did you compile with
-fomit-frame-pointer? Aborting backtrace!
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x876ab68 = select '.......'
thd->thread_id=31
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
mysql -C -hlocahost -uroot -p
select '.......';
 -- 7 dots

Suggested fix:
sorry, no
[30 Dec 2003 22:51] Dean Ellis
I cannot repeat this with the current 4.0.18-bk.

Try it with the official binaries, if you are not using them.
[13 Feb 2004 8:49] xuefer tinys
>Description:
        client cannot use -C (compress core
>How-To-Repeat:
        make test
>Fix:
        don't know

>Submitter-Id:  ---
>Originator:
>Organization:
  -
>MySQL support: none 
>Synopsis:      libz, compress, coredump
>Severity:      serious
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-4.1.1-alpha (Source distribution)

>C compiler:    gcc (GCC) 3.2.3
>C++ compiler:  g++ (GCC) 3.2.3
>Environment:
        p4 redhat 7.2
System: Linux www.our-sky.com 2.4.20-28.7 #1 Thu Dec 18 11:31:59 EST 2003 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/local/bin/gcc /usr/local/bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/specs
Configured with: ./configure --enable-languages=c,c++,objc --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as : (reconfigured) ./configure --enable-languages=c,c++,objc --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as : (reconfigured) ./configure --enable-languages=c,c++,objc --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as : (reconfigured) ./configure --enable-languages=c,c++,objc --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as : (reconfigured) ./configure --enable-languages=c,c++,objc,java --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as : (reconfigured) ./configure --enable-languages=c,c++,objc,java --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --enable-long-long --enable-threads --with-gcc-version-trigger=/usr/local/src/gcc-3.2.3/gcc/version.c --with-gnu-as
Thread model: posix
gcc version 3.2.3
Compilation info: CC='gcc'  CFLAGS='-O3 -mcpu=pentium3'  CXX='g++'  CXXFLAGS='-O3 -mcpu=pentium3      -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''  ASFLAGS=''
LIBC:
lrwxrwxrwx    1 root     root           13 11ŒŽ 22 15:44 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x    1 root     root      1285948 11ŒŽ  5 18:41 /lib/libc-2.2.4.so
-rw-r--r--    1 root     root     27338406 11ŒŽ  5 17:51 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 11ŒŽ  5 17:51 /usr/lib/libc.so
Configure command: ./configure '--prefix=/usr/local/mysql' '--enable-assembler' '--disable-shared' '--enable-thread-safe-client' '--enable-local-infile' '--with-client-ldflags=-all-static' '--with-mysqld-ldflags=-all-static' '--with-default-port=7706' '--with-charset=gbk' '--with-default-character-set=gbk' '--with-extra-charsets=none' '--with-pthread' 'CFLAGS=-O3 -mcpu=pentium3' 'CXXFLAGS=-O3 -mcpu=pentium3      -felide-constructors -fno-exceptions -fno-rtti'

Core was generated by `/usr/local/src/mysql-4.1.1-alpha/sql/mysqld --no-defaults --log-bin=/usr/loca
Program terminated with signal 11, Segmentation fault.
#0  0x08308cd1 in __kill () at __kill:-1
-1      __kill: No such file or directory.
        in __kill
(gdb) bt
#0  0x08308cd1 in __kill () at __kill:-1
#1  0x082f2556 in pthread_kill (thread=9226, signo=11) at signals.c:65
#2  0x0813ed8d in write_core ()
#3  0x080934f1 in handle_segfault ()
#4  0x082f270e in pthread_sighandler (signo=11, ctx=
      {gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 43, __esh = 0, ds = 43, __dsh = 0, edi = 319605460                                               , ebx = 138959120, edx = 138540360, ecx = 138540360, eax = 0, trapno = 14, err = 4, eip = 137322363,                                               nal = 3196054508, ss = 43, __ssh = 0, fpstate = 0xbe7fe970, oldmask = 2148028423, cr2 = 0}) at signa
#5  <signal handler called>
#6  0x082f5f7b in deflateInit2_ ()
#7  0x082f5f43 in deflateInit_ ()
#8  0x082f5ccd in compress2 ()
#9  0x082f5d49 in compress ()
#10 0x0806a2c4 in Item_func_compress::val_str(String*) ()
#11 0x0806a37b in Item_func_uncompress::val_str(String*) ()
#12 0x0804f2bc in Item::send(Protocol*, String*) ()
#13 0x0808a720 in select_send::send_data(List<Item>&) ()
#14 0x080c4a75 in JOIN::exec() ()
#15 0x080c6242 in mysql_select(THD*, Item***, st_table_list*, unsigned, List<Item>&, Item*, unsigned                                               ned long, select_result*, st_select_lex_unit*, st_select_lex*) ()
#16 0x080c27e5 in handle_select(THD*, st_lex*, select_result*) ()
#17 0x080a2697 in mysql_execute_command(THD*) ()
#18 0x080a80a7 in mysql_parse(THD*, char*, unsigned) ()
#19 0x080a11b3 in dispatch_command(enum_server_command, THD*, char*, unsigned) ()
#20 0x080a0d6a in do_command(THD*) ()
#21 0x080a05b8 in handle_one_connection ()
#22 0x082efed7 in pthread_start_thread (arg=0xbe7ffc00) at manager.c:284
(gdb) q
[13 Feb 2004 8:58] xuefer tinys
file: log/master.log

/usr/local/src/mysql-4.1.1-alpha/sql/mysqld, Version: 4.1.1-alpha-log, started with:
Tcp port: 9306  Unix socket: /usr/local/src/mysql-4.1.1-alpha/mysql-test/var/tmp/master.sock
Time                 Id Command    Argument
040213 19:13:20       1 Connect     root@localhost on test
                      1 Query       show variables like "have_compress"
                      1 Query       select @test_compress_string:='string for test compress function aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa '
                      1 Query       select length(@test_compress_string)
                      1 Query       select uncompress(compress(@test_compress_string))

file: log/master.err
CURRENT_TEST: 00_func_compress (renamed so it test first)
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
040213 19:13:17  InnoDB: Setting file ./ibdata1 size to 50 MB
InnoDB: Database physically writes the file full: wait...
040213 19:13:19  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...
040213 19:13:20  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
040213 19:13:20  InnoDB: Started; log sequence number 0 0
/usr/local/src/mysql-4.1.1-alpha/sql/mysqld: ready for connections.
Version: '4.1.1-alpha-log'  socket: '/usr/local/src/mysql-4.1.1-alpha/mysql-test/var/tmp/master.sock'  port: 9306
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=0
max_connections=100
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 39423 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x85a1ea0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe7fe868, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8093440
0x82f270e
0x82f5f7b
0x82f5f43
0x82f5ccd
0x82f5d49
0x806a2c4
0x806a37b
0x804f2bc
0x808a720
0x80c4a75
0x80c6242
0x80c27e5
0x80a2697
0x80a80a7
0x80a11b3
0x80a0d6a
0x80a05b8
0x82efed7
0x832a25a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://www.mysql.com/doc/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x85a8978 = select uncompress(compress(@test_compress_string))
thd->thread_id=1
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file

(but hang here, make test does not exit)