Re: [Maria-developers] [Merge] lp:~paul-mccullagh/maria/maria-pbxt-rc2 into lp:maria
Kristian Nielsen kniel...@knielsen-hq.org writes: So I will merge this into MariaDB with attached patch to disable PBMS and fix test failures. Ok, so I merged it. But now I have a problem with PBXT crashing sometimes during shutdown. To reproduce, run the following command in a build of lp:maria: mkdir -p /tmp/x sql/mysqld --no-defaults --basedir=$(pwd) --character-sets-dir=$(pwd)/sql/share/charsets --language=$(pwd)/sql/share/english --skip-networking --datadir=/tmp/x --skip-grant-tables --nonexistentoption This is supposed to complain about bad --nonexistentoption, and exit. Instead, in about 75% of cases it crashes during shutdown :-(. Basically, it crashes when the thread that calls xt_init_databases() is different from the thread that calls xt_stop_database_threads(), xt_exit_databases(), and db_finalize(). For some reason, this is usually, but not always, done in different threads in this scenario. Here is the stack trace: ==16085== Invalid read of size 4 ==16085==at 0x9DFB78: xt_sl_delete(XTThread*, XTSortedList*, void*) (sortedlist_xt.cc:205) ==16085==by 0xA14461: db_finalize(XTThread*, void*) (database_xt.cc:323) ==16085==by 0x9C340E: xt_heap_release(XTThread*, XTHeap*) (heap_xt.cc:110) ==16085==by 0xA133AA: xt_unuse_database(XTThread*, XTThread*) (database_xt.cc:662) ==16085==by 0xA1341C: xt_db_exit_thread(XTThread*) (database_xt.cc:682) ==16085==by 0x9F6F07: thr_exit(XTThread*) (thread_xt.cc:1051) ==16085==by 0x9F711A: xt_free_thread(XTThread*) (thread_xt.cc:1445) ==16085==by 0x9F9345: thr_main (thread_xt.cc:1028) ==16085==by 0x50463F6: start_thread (pthread_create.c:297) ==16085==by 0x6026B3C: clone (in /usr/lib/debug/libc-2.7.so) ==16085== Address 0x44 is not stack'd, malloc'd or (recently) free'd So, I do not know why the thread is sometimes the same and sometimes not in startup and shutdown. I guess it is some kind of race condition? Can you help with a suggestion on how to fix? - Kristian. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Rev 2723: Trivial fixes for windows compile failures in file:///home/psergey/dev/maria-5.1-fixwindows/
At file:///home/psergey/dev/maria-5.1-fixwindows/ revno: 2723 revision-id: pser...@askmonty.org-20090901115954-nge2brzh3akkmtlz parent: kniel...@knielsen-hq.org-20090831112339-td6t7ljy4w2oamvt committer: Sergey Petrunya pser...@askmonty.org branch nick: maria-5.1-fixwindows timestamp: Tue 2009-09-01 15:59:54 +0400 message: Trivial fixes for windows compile failures - Add strmov_overlapp.c where it's needed - Add libevent where it is required - Fix typo in unittest/mysys/waiting_threads-t.c - fix xtradb C language source so that they have variable declarations before any operators, as it is (or was?) required in C. === modified file 'libmysql/CMakeLists.txt' --- a/libmysql/CMakeLists.txt 2008-04-28 16:24:05 + +++ b/libmysql/CMakeLists.txt 2009-09-01 11:59:54 + @@ -94,7 +94,7 @@ ../mysys/safemalloc.c ../mysys/sha1.c ../strings/str2int.c ../strings/str_alloc.c ../strings/strcend.c ../strings/strcont.c ../strings/strend.c ../strings/strfill.c ../mysys/string.c ../strings/strinstr.c ../strings/strmake.c - ../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c + ../strings/strmov.c ../strings/strmov_overlapp.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c ../mysys/mf_qsort.c === modified file 'sql/CMakeLists.txt' --- a/sql/CMakeLists.txt2008-11-21 14:21:50 + +++ b/sql/CMakeLists.txt2009-09-01 11:59:54 + @@ -25,6 +25,7 @@ ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/zlib +${CMAKE_SOURCE_DIR}/extra/libevent ) SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/sql_yacc.h @@ -85,7 +86,7 @@ TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg mysys yassl zlib debug dbug yassl - taocrypt strings vio regex wsock32 ws2_32) + taocrypt strings vio regex libevent wsock32 ws2_32) SET_TARGET_PROPERTIES(mysqld PROPERTIES OUTPUT_NAME mysqld${MYSQLD_EXE_SUFFIX}) @@ -139,7 +140,7 @@ # Gen_lex_hash ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc) -TARGET_LINK_LIBRARIES(gen_lex_hash debug dbug mysqlclient wsock32) +TARGET_LINK_LIBRARIES(gen_lex_hash debug dbug mysqlclient strings wsock32) GET_TARGET_PROPERTY(GEN_LEX_HASH_EXE gen_lex_hash LOCATION) ADD_CUSTOM_COMMAND( OUTPUT ${PROJECT_SOURCE_DIR}/sql/lex_hash.h === modified file 'storage/xtradb/btr/btr0cur.c' --- a/storage/xtradb/btr/btr0cur.c 2009-06-25 01:43:25 + +++ b/storage/xtradb/btr/btr0cur.c 2009-09-01 11:59:54 + @@ -3267,6 +3267,7 @@ } while (rec != supremum) { +rec_t* next_rec; /* count recs */ if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) { n_recs++; @@ -3281,7 +3282,7 @@ } } - rec_t* next_rec = page_rec_get_next(rec); + next_rec = page_rec_get_next(rec); if (next_rec == supremum) { break; } === modified file 'storage/xtradb/buf/buf0buddy.c' --- a/storage/xtradb/buf/buf0buddy.c2009-06-25 01:43:25 + +++ b/storage/xtradb/buf/buf0buddy.c2009-09-01 11:59:54 + @@ -461,11 +461,11 @@ actually is a properly initialized buf_page_t object. */ if (size = PAGE_ZIP_MIN_SIZE) { + mutex_t*mutex; if (!have_page_hash_mutex) mutex_exit(zip_free_mutex); /* This is a compressed page. */ - mutex_t*mutex; if (!have_page_hash_mutex) { mutex_enter(LRU_list_mutex); === modified file 'storage/xtradb/buf/buf0flu.c' --- a/storage/xtradb/buf/buf0flu.c 2009-06-25 01:43:25 + +++ b/storage/xtradb/buf/buf0flu.c 2009-09-01 11:59:54 + @@ -1106,11 +1106,13 @@ page_count += buf_flush_try_neighbors( space, offset, flush_type); } else { +mutex_t* block_mutex; +buf_page_t* bpage_tmp; /* Try to flush the page only */ //buf_pool_mutex_enter();
[Maria-developers] Progress (by Sanja): Backport key cache to 5.0 (52)
--- WORKLOG TASK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TASK...: Backport key cache to 5.0 CREATION DATE..: Thu, 27 Aug 2009, 09:54 SUPERVISOR.: Monty IMPLEMENTOR: Monty COPIES TO..: Sanja CATEGORY...: Server-Sprint TASK ID: 52 (http://askmonty.org/worklog/?tid=52) VERSION: Server-5.0 STATUS.: Assigned PRIORITY...: 60 WORKED HOURS...: 9 ESTIMATE...: 0 (hours remain) ORIG. ESTIMATE.: 8 PROGRESS NOTES: -=-=(Sanja - Tue, 01 Sep 2009, 15:18)=-=- testing Monty's patch Worked 3 hours and estimate 0 hours remain (original estimate increased by 1 hour). -=-=(Guest - Fri, 28 Aug 2009, 10:55)=-=- Low Level Design modified. --- /tmp/wklog.52.old.16945 2009-08-28 10:55:40.0 +0300 +++ /tmp/wklog.52.new.16945 2009-08-28 10:55:40.0 +0300 @@ -1 +1,22 @@ -Just copy files (mf_keycache.c key=cache.h) and fix what should be fixed. +Here is instructions of how to repeat this if needed: + +- Copy the following files from the latest MySQL 5.1 to MySQL 5.0: + +include/keycache.h +include/my_bit.h +mysys/mf_keycache.c +mysys/mf_keycaches.c +mysys/my_bit.c + +Apply the following change in mysys/mf_keycaches.c +81c81 + static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length, +--- + static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, uint *length, + +recompile everything. + +Simple test to verify that this is working: +cd mysql-test +mysql-test-run --valgrind key_cache +(the --valgrind argument can be left out if you don't have valgrind installed) -=-=(Guest - Thu, 27 Aug 2009, 21:52)=-=- - Planning code (Email dicussions discussions with Sanja): 2 hours. - Backport of code (2 hours). Notice that mysys/mf_keycaches.c::safe_hash_entry_get() is different from the code in MySQL 5.1 - Testing code with mysql-test-run (especially running the key_cache.test with valgrind) - Tested the server with sql-bench Worked 6 hours and estimate 2 hours remain (original estimate unchanged). -=-=(Sanja - Thu, 27 Aug 2009, 09:56)=-=- High-Level Specification modified. --- /tmp/wklog.52.old.20094 2009-08-27 09:56:05.0 +0300 +++ /tmp/wklog.52.new.20094 2009-08-27 09:56:05.0 +0300 @@ -1 +1 @@ - +Backport keycache to 5.0 -=-=(Sanja - Thu, 27 Aug 2009, 09:55)=-=- Low Level Design modified. --- /tmp/wklog.52.old.20035 2009-08-27 09:55:25.0 +0300 +++ /tmp/wklog.52.new.20035 2009-08-27 09:55:25.0 +0300 @@ -1 +1 @@ - +Just copy files (mf_keycache.c key=cache.h) and fix what should be fixed. DESCRIPTION: Backport keycache to bring bugfixes made in 5.1. HIGH-LEVEL SPECIFICATION: Backport keycache to 5.0 LOW-LEVEL DESIGN: Here is instructions of how to repeat this if needed: - Copy the following files from the latest MySQL 5.1 to MySQL 5.0: include/keycache.h include/my_bit.h mysys/mf_keycache.c mysys/mf_keycaches.c mysys/my_bit.c Apply the following change in mysys/mf_keycaches.c 81c81 static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, size_t *length, --- static uchar *safe_hash_entry_get(SAFE_HASH_ENTRY *entry, uint *length, recompile everything. Simple test to verify that this is working: cd mysql-test mysql-test-run --valgrind key_cache (the --valgrind argument can be left out if you don't have valgrind installed) ESTIMATED WORK TIME ESTIMATED COMPLETION DATE --- WorkLog (v3.5.9) ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Progress (by Sanja): Avoid flushing keycache to disk in case of DROPping table (53)
--- WORKLOG TASK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TASK...: Avoid flushing keycache to disk in case of DROPping table CREATION DATE..: Thu, 27 Aug 2009, 11:12 SUPERVISOR.: Monty IMPLEMENTOR: Sanja COPIES TO..: CATEGORY...: Server-Sprint TASK ID: 53 (http://askmonty.org/worklog/?tid=53) VERSION: Server-5.0 STATUS.: Assigned PRIORITY...: 60 WORKED HOURS...: 3 ESTIMATE...: 21 (hours remain) ORIG. ESTIMATE.: 24 PROGRESS NOTES: -=-=(Sanja - Tue, 01 Sep 2009, 15:19)=-=- first patch Worked 3 hours and estimate 21 hours remain (original estimate unchanged). -=-=(Sanja - Thu, 27 Aug 2009, 11:15)=-=- High-Level Specification modified. --- /tmp/wklog.53.old.23490 2009-08-27 11:15:24.0 +0300 +++ /tmp/wklog.53.new.23490 2009-08-27 11:15:24.0 +0300 @@ -1 +1,3 @@ - +To make special handler call 'prepare to drop' which mark table as changed (in +case of server crash just before removing table it force table to be repaired) +then flush keycache without writing on disk. DESCRIPTION: When DROP TABLE executed keycache flushed to disk before removing table which is wasting of resources. So better to have table removed from keycache without writing changes on disk. HIGH-LEVEL SPECIFICATION: To make special handler call 'prepare to drop' which mark table as changed (in case of server crash just before removing table it force table to be repaired) then flush keycache without writing on disk. ESTIMATED WORK TIME ESTIMATED COMPLETION DATE --- WorkLog (v3.5.9) ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Progress (by Sanja): Avoid flushing keycache to disk in case of DROPping table (53)
--- WORKLOG TASK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- TASK...: Avoid flushing keycache to disk in case of DROPping table CREATION DATE..: Thu, 27 Aug 2009, 11:12 SUPERVISOR.: Monty IMPLEMENTOR: Sanja COPIES TO..: CATEGORY...: Server-Sprint TASK ID: 53 (http://askmonty.org/worklog/?tid=53) VERSION: Server-5.0 STATUS.: Assigned PRIORITY...: 60 WORKED HOURS...: 5 ESTIMATE...: 19 (hours remain) ORIG. ESTIMATE.: 24 PROGRESS NOTES: -=-=(Sanja - Tue, 01 Sep 2009, 15:20)=-=- moving to 5.0 part1 Worked 2 hours and estimate 19 hours remain (original estimate unchanged). -=-=(Sanja - Tue, 01 Sep 2009, 15:19)=-=- first patch Worked 3 hours and estimate 21 hours remain (original estimate unchanged). -=-=(Sanja - Thu, 27 Aug 2009, 11:15)=-=- High-Level Specification modified. --- /tmp/wklog.53.old.23490 2009-08-27 11:15:24.0 +0300 +++ /tmp/wklog.53.new.23490 2009-08-27 11:15:24.0 +0300 @@ -1 +1,3 @@ - +To make special handler call 'prepare to drop' which mark table as changed (in +case of server crash just before removing table it force table to be repaired) +then flush keycache without writing on disk. DESCRIPTION: When DROP TABLE executed keycache flushed to disk before removing table which is wasting of resources. So better to have table removed from keycache without writing changes on disk. HIGH-LEVEL SPECIFICATION: To make special handler call 'prepare to drop' which mark table as changed (in case of server crash just before removing table it force table to be repaired) then flush keycache without writing on disk. ESTIMATED WORK TIME ESTIMATED COMPLETION DATE --- WorkLog (v3.5.9) ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
Re: [Maria-developers] [Merge] lp:~paul-mccullagh/maria/maria-pbxt-rc2 into lp:maria
Kristian Nielsen kniel...@knielsen-hq.org writes: Ok, so I merged it. But now I have a problem with PBXT crashing sometimes during shutdown. Filed a bug on this on Launchpad: https://bugs.launchpad.net/maria/+bug/422550 - Kristian. ___ Mailing list: https://launchpad.net/~maria-developers Post to : maria-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp
[Maria-developers] Rev 2749: Merge in file:///home/psergey/dev/maria-5.1-table-elim-r12/
At file:///home/psergey/dev/maria-5.1-table-elim-r12/ revno: 2749 revision-id: pser...@askmonty.org-20090901222000-st4iicaxopeex2s1 parent: pser...@askmonty.org-20090826210140-y2pba3ucdwnvr956 parent: pser...@askmonty.org-20090901115954-nge2brzh3akkmtlz committer: Sergey Petrunya pser...@askmonty.org branch nick: maria-5.1-table-elim-r12 timestamp: Wed 2009-09-02 02:20:00 +0400 message: Merge removed: storage/pbxt/src/streaming_xt.cc streaming_xt.cc-20090326121724-x683v32twzr3fi0y-57 storage/pbxt/src/streaming_xt.h streaming_xt.h-20090326121724-x683v32twzr3fi0y-58 added: mysql-test/suite/pbxt/t/lowercase_table_grant-master.opt lowercase_table_gran-20090828130852-3duj73io0g345hxj-1 mysql-test/suite/pbxt/t/lowercase_table_qcache-master.opt lowercase_table_qcac-20090828130852-3duj73io0g345hxj-2 mysql-test/suite/pbxt/t/lowercase_view-master.opt lowercase_viewmaster-20090828130852-3duj73io0g345hxj-3 mysql-test/suite/pbxt/t/udf-master.opt udfmaster.opt-20090828130852-3duj73io0g345hxj-4 storage/pbxt/src/pbms_enabled.cc pbms_enabled.cc-20090818074502-tybcb62hp1kdrk3l-1 storage/pbxt/src/pbms_enabled.h pbms_enabled.h-20090818074502-tybcb62hp1kdrk3l-2 modified: BUILD/Makefile.am sp1f-makefile.am-20020102192940-dza66ux2yxyklupzjz4q3km3hvye5rnj libmysql/CMakeLists.txt sp1f-cmakelists.txt-20060831175237-3bbprkzqdl3gopcnlt3evmaikau67bcq mysql-test/suite/pbxt/r/alter_table.result alter_table.result-20090402100035-4ilk9i91sh65vjcb-5 mysql-test/suite/pbxt/r/analyze.result analyze.result-20090402100035-4ilk9i91sh65vjcb-7 mysql-test/suite/pbxt/r/auto_increment.result auto_increment.resul-20090402100035-4ilk9i91sh65vjcb-9 mysql-test/suite/pbxt/r/delete.result delete.result-20090402100035-4ilk9i91sh65vjcb-31 mysql-test/suite/pbxt/r/distinct.result distinct.result-20090402100035-4ilk9i91sh65vjcb-34 mysql-test/suite/pbxt/r/func_group.result func_group.result-20090402100035-4ilk9i91sh65vjcb-50 mysql-test/suite/pbxt/r/func_math.result func_math.result-20090402100035-4ilk9i91sh65vjcb-55 mysql-test/suite/pbxt/r/func_str.result func_str.result-20090402100035-4ilk9i91sh65vjcb-61 mysql-test/suite/pbxt/r/grant.result grant.result-20090402100035-4ilk9i91sh65vjcb-65 mysql-test/suite/pbxt/r/group_min_max.result group_min_max.result-20090402100035-4ilk9i91sh65vjcb-69 mysql-test/suite/pbxt/r/join.result join.result-20090402100035-4ilk9i91sh65vjcb-79 mysql-test/suite/pbxt/r/join_nested.result join_nested.result-20090402100035-4ilk9i91sh65vjcb-81 mysql-test/suite/pbxt/r/key.result key.result-20090402100035-4ilk9i91sh65vjcb-83 mysql-test/suite/pbxt/r/key_cache.result key_cache.result-20090402100035-4ilk9i91sh65vjcb-84 mysql-test/suite/pbxt/r/key_diff.result key_diff.result-20090402100035-4ilk9i91sh65vjcb-85 mysql-test/suite/pbxt/r/lowercase_view.result lowercase_view.resul-20090402100035-4ilk9i91sh65vjcb-96 mysql-test/suite/pbxt/r/mysqlshow.result mysqlshow.result-20090402100035-4ilk9i91sh65vjcb-101 mysql-test/suite/pbxt/r/null.result null.result-20090402100035-4ilk9i91sh65vjcb-104 mysql-test/suite/pbxt/r/null_key.result null_key.result-20090402100035-4ilk9i91sh65vjcb-105 mysql-test/suite/pbxt/r/partition_pruning.result partition_pruning.re-20090402100035-4ilk9i91sh65vjcb-117 mysql-test/suite/pbxt/r/pbxt_bugs.result pbxt_bugs.result-20090402100035-4ilk9i91sh65vjcb-120 mysql-test/suite/pbxt/r/pbxt_ref_int.result pbxt_ref_int.result-20090402100035-4ilk9i91sh65vjcb-123 mysql-test/suite/pbxt/r/preload.result preload.result-20090402100035-4ilk9i91sh65vjcb-127 mysql-test/suite/pbxt/r/ps_1general.result ps_1general.result-20090402100035-4ilk9i91sh65vjcb-130 mysql-test/suite/pbxt/r/range.result range.result-20090402100035-4ilk9i91sh65vjcb-132 mysql-test/suite/pbxt/r/schema.result schema.result-20090402100035-4ilk9i91sh65vjcb-138 mysql-test/suite/pbxt/r/select.result select.result-20090402100035-4ilk9i91sh65vjcb-139 mysql-test/suite/pbxt/r/select_safe.result select_safe.result-20090402100035-4ilk9i91sh65vjcb-141 mysql-test/suite/pbxt/r/subselect.result subselect.result-20090402100035-4ilk9i91sh65vjcb-146 mysql-test/suite/pbxt/r/type_enum.result type_enum.result-20090402100035-4ilk9i91sh65vjcb-155 mysql-test/suite/pbxt/r/type_ranges.result type_ranges.result-20090402100035-4ilk9i91sh65vjcb-159 mysql-test/suite/pbxt/r/type_timestamp.result type_timestamp.resul-20090402100035-4ilk9i91sh65vjcb-162 mysql-test/suite/pbxt/r/union.result union.result-20090402100035-4ilk9i91sh65vjcb-166 mysql-test/suite/pbxt/r/view_grant.result view_grant.result-20090402100035-4ilk9i91sh65vjcb-169 mysql-test/suite/pbxt/t/auto_increment.test auto_increment.test-20090402100035-4ilk9i91sh65vjcb-176 mysql-test/suite/pbxt/t/delete.test delete.test-20090402100035-4ilk9i91sh65vjcb-198 mysql-test/suite/pbxt/t/join_nested.test