Bug #20316 got signal 4 during startup
Submitted: 7 Jun 2006 11:53 Modified: 12 Jun 2006 2:49
Reporter: Bob Holcomb Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.22 OS:Linux (Linux (Gentoo))
Assigned to: CPU Architecture:Any

[7 Jun 2006 11:53] Bob Holcomb
Description:
Mysqld fails on startup with a signal 4.  

mysqlbug report:
>Description:
        <precise description of the problem (multiple lines)>
>How-To-Repeat:
        <code/input/activities to reproduce the problem (multiple lines)>
>Fix:
        <how to correct or work around the problem, if known (multiple lines)>

>Submitter-Id:  <submitter ID>
>Originator:    root
>Organization:
 <organization of PR author (multiple lines)>
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:      <synopsis of the problem (one line)>
>Severity:      <[ non-critical | serious | critical ] (one line)>
>Priority:      <[ low | medium | high ] (one line)>
>Category:      mysql
>Class:         <[ sw-bug | doc-bug | change-request | support ] (one line)>
>Release:       mysql-5.0.22 (Gentoo Linux mysql-5.0.22)

>C compiler:    i686-pc-linux-gnu-gcc (GCC) 4.1.1 (Gentoo 4.1.1)
>C++ compiler:  i686-pc-linux-gnu-g++ (GCC) 4.1.1 (Gentoo 4.1.1)
>Environment:
        <machine, os, target, libraries (multiple lines)>
System: Linux tiny 2.6.16.19 #1 PREEMPT Wed May 31 17:46:03 EDT 2006 i686 VIA $
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/$
GCC: Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/configure --prefix=$
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1)
Compilation info: CC='i686-pc-linux-gnu-gcc'  CFLAGS='-O2 -march=c3-2 -mmmx -m$
LIBC:
lrwxrwxrwx 1 root root 11 Jun  1 12:02 /lib/libc.so.6 -> libc-2.4.so
-rwxr-xr-x 1 root root 1197180 Jun  1 12:02 /lib/libc-2.4.so
-rw-r--r-- 1 root root 2733402 Jun  1 12:02 /usr/lib/libc.a
-rwxr-xr-x 1 root root 238 Jun  1 12:02 /usr/lib/libc.so
-rwxr-xr-x 1 root root 580404 Sep 22  2005 /usr/lib/libc.so.5
Configure command: ./configure '--prefix=/usr' '--host=i686-pc-linux-gnu' '--m$

Stack trace:
0x814d6af handle_segfault + 321
0x82a2d0f dict_tree_copy_rec_order_prefix + 95
0x8380184 mem_heap_create_block + 84
0x82af68f dict_check_tablespaces_and_store_max_id + 1039
0x829984b innobase_start_or_create_for_mysql + 4779
0x81d341b _Z13innobase_initv + 925
0xb7bca878 _end + -1352628920
0x80ffa41 _start + 33

How to repeat:
try to start with the /etc/init.d/mysqld start command

Suggested fix:
unknown
[7 Jun 2006 13:31] Valeriy Kravchuk
Thank you for the problem report. Please, send the corresponding part of your error log. Is it initial (first time) startup?
[7 Jun 2006 15:19] Bob Holcomb
mysqld.err log:

060607  7:35:01 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=tiny-bin' to avoid this problem.
mysqld got signal 4;
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=0
read_buffer_size=258048
max_used_connections=0
max_connections=100
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 76399 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
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=0xbff75114, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x814d6af
0x82a2d0f
0x8380184
0x82af68f
0x829984b
0x81d341b
0xb7bca878
0x80ffa41
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/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
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.
[8 Jun 2006 8:40] Heikki Tuuri
The resolved stack trace does not look sensible. Did you use the right mysqld.sym file?
[9 Jun 2006 13:13] Bob Holcomb
I followed the instructions and generated the sym file from mysqld.  I have my glibc built with omit frame pointer.  I can rebuild with the frame pointer and put up a new stack trace. 

Cheers, 

bob
[11 Jun 2006 8:21] Valeriy Kravchuk
> I can rebuild with the frame pointer and put up a new stack trace. 

Please, try to do it and send new resolved stack trace.
[12 Jun 2006 2:49] Bob Holcomb
Solved:
recompiled glibc and mysql with "-O2 -march=i686 -mmmx -msse -mfpmath=sse -pipe" and all was well with the world.  I believe that a combination of gcc 4.1, glibc with omit-frame-pointer, and -march=c3-2 may have been a culprit.