crashes with mysql 5.1.6

crashes with mysql 5.1.6

am 20.02.2006 22:15:25 von Bastian Balthazar Bux

This is mainly a question if I should fill a bug or not :-)

On a box with:
gcc (GCC) 4.1.0-beta20060210 (prerelease)
glibc-2.3.6-r2

I've tryed to compile mysql 5.1.6, using the following configure options:

../configure --prefix=/usr --host=i686-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --program-suffix=-501
--libexecdir=/usr/sbin --sysconfdir=/etc/mysql-501
--localstatedir=/var/lib/mysql-501 --sharedstatedir=/usr/share/mysql-501
--libdir=/usr/lib/mysql-501 --includedir=/usr/include/mysql-501
--with-low-memory --enable-assembler --enable-local-infile
--with-mysqld-user=mysql --with-client-ldflags=-lstdc++
--enable-thread-safe-client --with-comment="Gentoo Linux
mysql-5.1.6_alpha-r30"
--with-unix-socket-path=/var/run/mysqld/mysqld.sock --with-zlib-dir=/usr
--with-lib-ccflags=-fPIC --without-readline --without-docs
--enable-shared --enable-static --without-libwrap --with-openssl
--with-debug=full --with-bench --with-server --with-embedded-server
--with-extra-tools --with-innodb --without-raid --with-innodb
--with-extra-charsets=all --without-berkeley-db --with-geometry
--without-ndbcluster --without-big-tables --with-ndb-binlog
--without-embedded-privilege-control --without-embedded-server
--with-archive-storage-engine --with-csv-storage-engine
--with-blackhole-storage-engine --with-federated-storage-engine
--with-partition --with-max-indexes=128 --with-row-based-replication
--build=i686-pc-linux-gnu


without too much luck, the server crash easy and in a reproducible manner,
first to make it start the "mysql.time_zone_leap_second" table needed to
be removed.
then the server could start with the following options:

mysqld-501 --no-defaults \
--skip-innodb --skip-name-resolve --skip-networking \
--server-id=51 \
--skip-grant-tables \
--log=/tmp/mysqld.sql \
--debug=d:t:i:o,/tmp/mysqld.trace \
--one-thread \
--user=mysql \
--datadir=/srv/mysql-501/ \
--socket=/var/run/mysqld/mysqld-501.sock \
--pid-file=/var/run/mysqld/mysqld-501.pid \


then it's possible to connect to the server using the "mysql" program,
but "use" whatever database crash the server,
the only way to make it work is to add the "-A" option to the command,
avoiding to perform the table/fields scan.


I've tried to strip down the trace at this one:

T@-1212987: | | | >mysqld_list_fields
T@-1212987: | | | | enter: table: elog_master
T@-1212987: | | | | >open_normal_and_derived_tables
T@-1212987: | | | | | >open_tables
[...]
T@-1212987: | | | | | | >open_table
[...]
T@-1212987: | | | | | | | >open_unireg_entry
T@-1212987: | | | | | | | | >get_table_share_with_create
T@-1212987: | | | | | | | | | >get_table_share
[...]
T@-1212987: | | | | | | | | | | >open_table_def
T@-1212987: | | | | | | | | | | | enter: name: 'gentoo.elog_master'
[...]
T@-1212987: | | | | | | | | | | | >open_binary_frm
[...]
T@-1212987: | | | | | | | | | T@-1212987: | | | | | | | | T@-1212987: | | | | | | | | >open_table_from_share
T@-1212987: | | | | | | | | | enter: name: 'gentoo.elog_master' form:
0x8592138
T@-1212987: | | | | | | | | | >init_alloc_root
T@-1212987: | | | | | | | | | | enter: root: 0x8592858
T@-1212987: | | | | | | | | | T@-1212987: | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | enter: Size: 12
T@-1212987: | | | | | | | | | | exit: ptr: 0x8570e78
T@-1212987: | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | >bitmap_init
T@-1212987: | | | | | | | | | [...]
T@-1212987: | | | | | | | | | >alloc_root
[...]
T@-1212987: | | | | | | | | | [...]
T@-1212987: | | | | | | | | | >handler::ha_open
T@-1212987: | | | | | | | | | | enter: name: ./gentoo/elog_master
db_type: 139524160 db_stat: 39 mode: 2 lock_test: 2
T@-1212987: | | | | | | | | | | >mi_open
T@-1212987: | | | | | | | | | | | >fn_format
[...]
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_realpath
T@-1212987: | | | | | | | | | | | | info: executing realpath
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_open
T@-1212987: | | | | | | | | | | | | my: Name:
'/srv/mysql-501/gentoo/elog_master.MYI' Flags: 2 MyFlags: 0
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | | | enter: Size: 38
T@-1212987: | | | | | | | | | | | | exit: ptr: 0x858d018
T@-1212987: | | | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | | | exit: fd: 11
T@-1212987: | | | | | | | | | | | >my_read
T@-1212987: | | | | | | | | | | | | my: Fd: 11 Buffer: 0xbf8e2f68
Count: 24 MyFlags: 4
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_readlink
T@-1212987: | | | | | | | | | | | | exit: result: 1
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >fn_format
[...]
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_seek
T@-1212987: | | | | | | | | | | | | my: Fd: 11 Hpos: 0 Pos: 0 Whence:
0 MyFlags: 0
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_lock
T@-1212987: | | | | | | | | | | | | my: Fd: 11 Op: 0 start: 0 Length:
0 MyFlags: 64
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_read
T@-1212987: | | | | | | | | | | | | my: Fd: 11 Buffer: 0xbf8de520
Count: 389 MyFlags: 4
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_multi_malloc
T@-1212987: | | | | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | | | | enter: Size: 1448
T@-1212987: | | | | | | | | | | | | | exit: ptr: 0x8594990
T@-1212987: | | | | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_lock
T@-1212987: | | | | | | | | | | | | my: Fd: 11 Op: 2 start: 0 Length:
0 MyFlags: 32
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_open
T@-1212987: | | | | | | | | | | | | my: Name:
'./gentoo/elog_master.MYD' Flags: 2 MyFlags: 16
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | | | enter: Size: 25
T@-1212987: | | | | | | | | | | | | exit: ptr: 0x858d060
T@-1212987: | | | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | | | exit: fd: 12
T@-1212987: | | | | | | | | | | | >thr_lock_init
T@-1212987: | | | | | | | | | | | | >list_add
T@-1212987: | | | | | | | | | | | | | enter: root: 0x85738bc element:
0x8594bcc
T@-1212987: | | | | | | | | | | | | T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >my_multi_malloc
T@-1212987: | | | | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | | | | enter: Size: 2752
T@-1212987: | | | | | | | | | | | | | exit: ptr: 0x8594f58
T@-1212987: | | | | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | | >_myrealloc
T@-1212987: | | | | | | | | | | | <_myrealloc
T@-1212987: | | | | | | | | | | | >_mymalloc
T@-1212987: | | | | | | | | | | | | enter: Size: 1283
T@-1212987: | | | | | | | | | | | | exit: ptr: 0x8595a38
T@-1212987: | | | | | | | | | | | <_mymalloc
T@-1212987: | | | | | | | | | | | >list_add
T@-1212987: | | | | | | | | | | | | enter: root: 0x8573d20 element:
0x8595078
T@-1212987: | | | | | | | | | | | T@-1212987: | | | | | | | | | | T@-1212987: | | | | | | | | | | >mi_extra
T@-1212987: | | | | | | | | | | | enter: function: 13
T@-1212987: | | | | | | | | | | T@-1212987: | | | | | | | | | | >mi_status
T@-1212987: | | | | | | | | | | T@-1212987: | | | | | | | | | | >bitmap_init
T@-1212987: | | | | | | | | | | ^^^^^^^ it stop here

but it does not show anything strange to me, the error message shown is :

mysqld-501: pthread_mutex_lock.c:108: __pthread_mutex_lock: Assertion
`mutex->__data.__owner == 0' failed.
mysqld got signal 6;
[...]

nothing very useful follow, I forgot the omit-frame-pointer in CFLAGS .



A so easyly crashing server make me think that either the used options
are totally unsupported, or if there was a bug it has already fixed,
from this the question, "do you want a bug report?" maybe with a better
stack trace and some more debug ?


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: crashes with mysql 5.1.6

am 21.02.2006 09:28:19 von Valeriy Kravchuk

Hi Francesco,

Small question to you: what you did after make? You have to execute make
install and then mysql_install_db, from the appropriate location. This will
create default databases.

If you did that and still getting problems, please, create a bug report.
Don't forget to upload your error log to that bug report.

Best regards,
--
Valeriy Kravchuk, Support Engineer
MySQL AB, Kiev, Ukraine, www.mysql.com

Are you MySQL certified? www.mysql.com/certification


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: crashes with mysql 5.1.6

am 21.02.2006 16:03:31 von Bastian Balthazar Bux

Valeriy Kravchuk wrote:
> Hi Francesco,
>
> Small question to you: what you did after make? You have to execute make
> install and then mysql_install_db, from the appropriate location. This will
> create default databases.
>
> If you did that and still getting problems, please, create a bug report.
> Don't forget to upload your error log to that bug report.
>
> Best regards,
>

mysql_install_db failed as well, the debugging show issues with mutexes
and locks that may be related to software external to the mysql database
(kernel and glibc) anyway I've filled a bug:

MySQL Bugs: #17616: Crash in creation of "mysql" database

regards,
Francesco R.


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org