>Description: I started using BDB tables in a php program with mysql-3.23.36 that comes with redhat7.1. The php program uses a database of 3 myISAM tables to read the schema of the BDB tables and dynamicaly generate select/update/insert queries on the BDB tables. The BDB tables form another database.
The concept of a transaction is important to my app because the number of queries and the number of tables to be modified during a particular transaction is not easy to calculate. It is obtained from the result of the queries to the myISAM tables. If for some reason, one query cannot be fulfilled, all queries of the transaction are undone by calling ROLLBACK. The transaction model makes my app much simlper and more flexible. It is important to state that some data is inserted into the database without transactions. This occurs when "humans" are populating the database by using graphical mysql clients (phpMyAdmin). The app is finished but because of the problems experienced has still not been put in the production environment. What happens is that mysqld crashes ,almost always bringing down the server when I was using 3.23.36 . After I installed 3.23.42 and then 3.23.46 the server does not usually come down but mysql.log shows that one of the mysqld threads crashed, prints a backtrace and then resumes operations. The problem was much more frequent with 3.23.36 than it is with 3.23.42 and 3.23.46. In the newer versions it still happens once/twice every two days. This does not usually happen when I am testing/programing the app and therefore gerating a lot of transactions but during moments when other users are just browsing the app and therefore generating mainly selects. I have dificulty reproducing the test because of this. It is interesting to note that the query that usually crashes the server is of the form select tblRelac.id as id from tblRelac where tblRelac.classL = 'page' and tblRelac.idL = '33' and tblRelac.prior > '0' order by tblRelac.prior and I really cant remember it happening on a table diferent than tblRelac. THe app has some 20 tables. There is nothing special about table relac expcept that it is used alot. After restarting the server (3.23.36) or running [ mysqladmin shutdown ; service mysqld start ] (3.23.46) things start working again. I have never experienced data corruption. An interesting thing that happens is that the above query always fails after the crash but before the restart with the message No Records Found This is wrong, the query should at least return one row. When I run Select * from tblRelac ; the query returns correctly all the rows in the database correctly After restarting , all is normal. This suggests to me that the problem could be on an index for the table or on index code. It also suggests that the problem is in memory, because after the restart, everything comes back normally. I have put on the end of this email, tblRelac's schema alogn with the backtrace and other error messages. It seems to me that the offending code is run in berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 118 Thank you, Miguel Feitosa >How-To-Repeat: I dont know. I added --log to my server now. >Fix: I dont know >Submitter-Id: <submitter ID> >Originator: root >Organization: VMN Consulting - Sao Paulo - Brasil >MySQL support: none >Synopsis: mysqld crash with BDB >Severity: serious >Priority: high >Category: mysql >Class: sw-bug >Release: mysql-3.23.36 (Source distribution) >Server: /usr/bin/mysqladmin Ver 8.18 Distrib 3.23.36, for redhat-linux-gnu on i386 Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 3.23.46 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 29 min 44 sec Threads: 27 Questions: 52530 Slow queries: 0 Opens: 72 Flush tables: 1 Open tables: 64 Queries per second avg: 29.445 >Environment: <machine, os, target, libraries (multiple lines)> System: Linux diadorim.vmn.com.br 2.4.9-12 #1 Tue Oct 30 18:33:49 EST 2001 i686 unknown Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) Compilation info: CC='gcc' CFLAGS='-O2 -march=i386 -mcpu=i686' CXX='c++' CXXFLAGS='-O2 -march=i386 -mcpu=i686' LDFLAGS='' LIBC: lrwxrwxrwx 1 root root 13 Nov 29 19:02 /lib/libc.so.6 -> libc-2.2.4.so -rwxr-xr-x 2 root root 1283580 Oct 3 15:10 /lib/libc-2.2.4.so -rw-r--r-- 1 root root 27314604 Oct 3 14:52 /usr/lib/libc.a -rw-r--r-- 1 root root 178 Oct 3 14:52 /usr/lib/libc.so Configure command: ./configure i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info --without-debug --without-readline --enable-shared --with-extra-charsets=complex --with-bench --localstatedir=/var/lib/mysql --with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql --with-extra-charsets=all --with-berkeley-db To install 3.23.46, I recompiled mysqld from source with #!/bin/bash rm -f config.cache; ./configure --prefix=/usr/local/mysql --with-innodb --with-berkeley-db --with-low-memory --with-mysqld-user=mysql && make clean && make && make install #--enable-static After the recompile, I copied mysqld to /usr/libexec Schema of tblRelac I DROP TABLE IF EXISTS tblRelac; CREATE TABLE tblRelac ( id int(11) auto_increment PRIMARY KEY, classL varchar(200) NOT NULL default '', classR varchar(200) NOT NULL default '', idL int(11) NOT NULL DEFAULT 0, idR int(11) NOT NULL DEFAULT 0, prior int(11) NOT NULL DEFAULT 0, KEY classL_key (classL), KEY classR_key (classR), KEY idL_key (idL), KEY idR_key (idR), KEY prior_key (prior), altera timestamp(14) NOT NULL )TYPE=BDB; Note: prior is usually 1 BackTrace 0x80be116 handle_segfault__Fi + 406 0x40029a85 _end + 936416829 0x810139a berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 118 0x814e8dc __bam_cmp + 148 0x8192802 __bam_search + 886 0x818834d __bam_c_search + 1633 0x8185eb1 __bam_c_get + 1305 0x81626a8 __db_c_get + 840 0x815e7b3 __db_get + 323 0x8103e68 rnd_pos__11ha_berkeleyPcT1 + 216 0x80fad58 rr_from_pointers__FP14st_read_record + 52 0x80e27bf join_init_read_record__FP13st_join_table + 75 0x80dd9ea sub_select__FP4JOINP13st_join_tableb + 78 0x80dd79d do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 393 0x80d6bc6 mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4UiP13select_result + 7170 0x80c47c5 mysql_execute_command__Fv + 733 0x80c762f mysql_parse__FP3THDPcUi + 211 0x80c3c46 do_command__FP3THD + 1286 0x80c316c handle_one_connection__FPv + 608 --------------------Another stack trace Query select tblRelac.id as id from tblRelac where tblRelac.classL = 'page' and tblRelac.idL = '31' and tblRelac.prior > '0' order by tblRelac.prior StackTrace 0x80bdfc2 handle_segfault__Fi + 406 0x4004c935 _end + 936562381 0x810107c berkeley_cmp_packed_key__FP4__dbPC8__db_dbtT1 + 72 0x814e4ac __bam_cmp + 148 0x81923d2 __bam_search + 886 0x8187f1d __bam_c_search + 1633 0x8185a81 __bam_c_get + 1305 0x8162278 __db_c_get + 840 0x815e383 __db_get + 323 0x8103b59 rnd_pos__11ha_berkeleyPcT1 + 213 0x80faad9 rr_from_pointers__FP14st_read_record + 49 0x80e25db join_init_read_record__FP13st_join_table + 75 0x80dd8d2 sub_select__FP4JOINP13st_join_tableb + 78 0x80dd685 do_select__FP4JOINPt4List1Z4ItemP8st_tableP9Procedure + 393 0x80d6a6e mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemRt4List1Z15Item_func_matchP8st_orderT5T3T5UiP13select_result + 7278 0x80c4673 mysql_execute_command__Fv + 735 0x80c74e3 mysql_parse__FP3THDPcUi + 211 0x80c3af2 do_command__FP3THD + 1286 0x80c3018 handle_one_connection__FPv + 608 ------------------------------------------------- This mail sent through IMP: webmail.vmn.com.br --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php