Changeset: 2a557cc30013 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/2a557cc30013 Modified Files: gdk/gdk_bat.c gdk/gdk_bbp.c Branch: ascii-flag Log Message:
Merge with default branch. diffs (truncated from 2467 to 300 lines): diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -825,3 +825,4 @@ dcc8c702e685a4faf21ccf663028d1bc3d1165d1 dcc8c702e685a4faf21ccf663028d1bc3d1165d1 Dec2023_SP1_release d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_7 d656785f49ee62c19705722aa6b7c171904c64d5 Dec2023_SP2_release +9a694c41042503a22d6c92aeab5bc4ca1912b62e Dec2023_9 diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -91,7 +91,7 @@ Group: Applications/Databases License: MPL-2.0 URL: https://www.monetdb.org/ BugURL: https://github.com/MonetDB/MonetDB/issues -Source: https://www.monetdb.org/downloads/sources/Dec2023-SP2/%{name}-%{version}.tar.bz2 +Source: https://www.monetdb.org/downloads/sources/Dec2023-SP3/%{name}-%{version}.tar.bz2 # The Fedora packaging document says we need systemd-rpm-macros for # the _unitdir and _tmpfilesdir macros to exist; however on RHEL 7 @@ -916,6 +916,25 @@ fi %endif %changelog +* Thu May 02 2024 Sjoerd Mullender <sjo...@acm.org> - 11.49.9-20240502 +- Rebuilt. +- GH#7422: Aggregate functions with variadic arguments +- GH#7472: MonetDB server crashes in `tail_type` +- GH#7473: MonetDB server crashes in `SQLunionfunc` +- GH#7478: MonetDB server crashes in `exp_equal` +- GH#7496: Query on view fails to produce a resultset. Assertion triggered + in rel2bin_select. +- GH#7499: create schema + set schema inside a transaction that is rolled + back causes the connection to be aborted +- GH#7501: files remain in backup causing problems at restart +- GH#7503: MonetDB server crashes using `WHEN MATCHED THEN UPDATE` +- GH#7504: possible deadlock when a bat is made persistent when it is also + getting unloaded +- GH#7506: MonetDB Dec2023-SP2 crashes at `rel_value_exp2` +- GH#7507: BBPextend: ERROR: trying to extend BAT pool beyond the limit + (163840000) +- GH#7508: MonetDB Dec2023-SP2 crashes at `exp_ref` + * Tue Apr 09 2024 Sjoerd Mullender <sjo...@acm.org> - 11.49.7-20240409 - Rebuilt. - GH#7469: Crash when using `CONTAINS` diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -1777,6 +1777,11 @@ mapi_new(msettings *settings) Mapi mid; static ATOMIC_TYPE index = ATOMIC_VAR_INIT(0); + if (!ATOMIC_TAS(&mapi_initialized)) { + if (mnstr_init() < 0) + return NULL; + } + mid = malloc(sizeof(*mid)); if (mid == NULL) return NULL; @@ -1885,11 +1890,6 @@ mapi_mapiuri(const char *url, const char { Mapi mid; - if (!ATOMIC_TAS(&mapi_initialized)) { - if (mnstr_init() < 0) - return NULL; - } - mid = mapi_new(NULL); if (mid == NULL) return NULL; @@ -1944,11 +1944,6 @@ mapi_mapi(const char *host, int port, co { Mapi mid; - if (!ATOMIC_TAS(&mapi_initialized)) { - if (mnstr_init() < 0) - return NULL; - } - mid = mapi_new(NULL); if (mid == NULL) return NULL; diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake --- a/cmake/monetdb-versions.cmake +++ b/cmake/monetdb-versions.cmake @@ -44,19 +44,19 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M # common/options and common/utils) set(GDK_VERSION_MAJOR "28") set(GDK_VERSION_MINOR "1") -set(GDK_VERSION_PATCH "2") +set(GDK_VERSION_PATCH "3") set(GDK_VERSION "${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}") # version of the MAPI library (subdirectory clients/mapilib) set(MAPI_VERSION_MAJOR "26") set(MAPI_VERSION_MINOR "2") -set(MAPI_VERSION_PATCH "1") +set(MAPI_VERSION_PATCH "2") set(MAPI_VERSION "${MAPI_VERSION_MAJOR}.${MAPI_VERSION_MINOR}.${MAPI_VERSION_PATCH}") # version of the MONETDB5 library (subdirectory monetdb5, not including extras or sql) set(MONETDB5_VERSION_MAJOR "35") set(MONETDB5_VERSION_MINOR "0") -set(MONETDB5_VERSION_PATCH "3") +set(MONETDB5_VERSION_PATCH "4") set(MONETDB5_VERSION "${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}") # version of the MONETDBE library (subdirectory tools/monetdbe) @@ -74,5 +74,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ # version of the SQL library (subdirectory sql) set(SQL_VERSION_MAJOR "14") set(SQL_VERSION_MINOR "1") -set(SQL_VERSION_PATCH "3") +set(SQL_VERSION_PATCH "4") set(SQL_VERSION "${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}") diff --git a/common/utils/GenerateVersionHeader.cmake b/common/utils/GenerateVersionHeader.cmake --- a/common/utils/GenerateVersionHeader.cmake +++ b/common/utils/GenerateVersionHeader.cmake @@ -18,34 +18,34 @@ elseif(EXISTS "${DIR}/.hg") find_package(Hg) if(HG_FOUND) message("hg found: ${HG_EXECUTABLE}") + execute_process(COMMAND "${HG_EXECUTABLE}" "id" "-i" WORKING_DIRECTORY "${DIR}" RESULT_VARIABLE HG_RETURN_CODE + OUTPUT_VARIABLE HG_OUPUT_RES OUTPUT_STRIP_TRAILING_WHITESPACE) + if(HG_RETURN_CODE EQUAL 0 AND HG_OUPUT_RES) + set(MERCURIAL_ID "${HG_OUPUT_RES}") + else() + message(WARNING "Failed to find mercurial ID") + set(MERCURIAL_ID "Unknown") + endif() else() message(WARNING "Failed to find mercurial") set(MERCURIAL_ID "Unknown") endif() - execute_process(COMMAND "${HG_EXECUTABLE}" "id" "-i" WORKING_DIRECTORY "${DIR}" RESULT_VARIABLE HG_RETURN_CODE - OUTPUT_VARIABLE HG_OUPUT_RES OUTPUT_STRIP_TRAILING_WHITESPACE) - if(HG_RETURN_CODE EQUAL 0 AND HG_OUPUT_RES) - set(MERCURIAL_ID "${HG_OUPUT_RES}") - else() - message(WARNING "Failed to find mercurial ID") - set(MERCURIAL_ID "Unknown") - endif() elseif(EXISTS "${DIR}/.git") find_package(Git) if(GIT_FOUND) message("git found: ${GIT_EXECUTABLE}") + execute_process(COMMAND "${GIT_EXECUTABLE}" "rev-parse" "--short" "HEAD" WORKING_DIRECTORY "${DIR}" + RESULT_VARIABLE GIT_RETURN_CODE OUTPUT_VARIABLE GIT_OUPUT_RES OUTPUT_STRIP_TRAILING_WHITESPACE) + if(GIT_RETURN_CODE EQUAL 0 AND GIT_OUPUT_RES) + set(MERCURIAL_ID "${GIT_OUPUT_RES}") + else() + message(WARNING "Failed to find git ID") + set(MERCURIAL_ID "Unknown") + endif() else() message(WARNING "Failed to find git") set(MERCURIAL_ID "Unknown") endif() - execute_process(COMMAND "${GIT_EXECUTABLE}" "rev-parse" "--short" "HEAD" WORKING_DIRECTORY "${DIR}" - RESULT_VARIABLE GIT_RETURN_CODE OUTPUT_VARIABLE GIT_OUPUT_RES OUTPUT_STRIP_TRAILING_WHITESPACE) - if(GIT_RETURN_CODE EQUAL 0 AND GIT_OUPUT_RES) - set(MERCURIAL_ID "${GIT_OUPUT_RES}") - else() - message(WARNING "Failed to find git ID") - set(MERCURIAL_ID "Unknown") - endif() else() set(MERCURIAL_ID "Unknown") endif() diff --git a/debian/changelog b/debian/changelog --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,25 @@ +monetdb (11.49.9) unstable; urgency=low + + * Rebuilt. + * GH#7422: Aggregate functions with variadic arguments + * GH#7472: MonetDB server crashes in `tail_type` + * GH#7473: MonetDB server crashes in `SQLunionfunc` + * GH#7478: MonetDB server crashes in `exp_equal` + * GH#7496: Query on view fails to produce a resultset. Assertion triggered + in rel2bin_select. + * GH#7499: create schema + set schema inside a transaction that is rolled + back causes the connection to be aborted + * GH#7501: files remain in backup causing problems at restart + * GH#7503: MonetDB server crashes using `WHEN MATCHED THEN UPDATE` + * GH#7504: possible deadlock when a bat is made persistent when it is also + getting unloaded + * GH#7506: MonetDB Dec2023-SP2 crashes at `rel_value_exp2` + * GH#7507: BBPextend: ERROR: trying to extend BAT pool beyond the limit + (163840000) + * GH#7508: MonetDB Dec2023-SP2 crashes at `exp_ref` + + -- Sjoerd Mullender <sjo...@acm.org> Thu, 02 May 2024 12:35:52 +0200 + monetdb (11.49.7) unstable; urgency=low * Rebuilt. diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c --- a/gdk/gdk_bat.c +++ b/gdk/gdk_bat.c @@ -2552,6 +2552,7 @@ BATmode(BAT *b, bool transient) BATiter bi = bat_iterator(b); bool mustrelease = false; + bool mustretain = false; bat bid = b->batCacheid; if (transient != bi.transient) { @@ -2566,16 +2567,20 @@ BATmode(BAT *b, bool transient) } } - /* persistent BATs get a logical reference */ + /* we need to delay the calls to BBPretain and + * BBPrelease until after we have released our reference + * to the heaps (i.e. until after bat_iterator_end), + * because in either case, BBPfree can be called (either + * directly here or in BBPtrim) which waits for the heap + * reference to come down. BBPretain calls incref which + * waits until the trim that is waiting for us is done, + * so that causes deadlock, and BBPrelease can call + * BBPfree which causes deadlock with a single thread */ if (!transient) { - BBPretain(bid); + /* persistent BATs get a logical reference */ + mustretain = true; } else if (!bi.transient) { - /* we need to delay the release because if there - * is no fix and the bat is loaded, BBPrelease - * can call BBPfree which calls BATfree which - * may hang while waiting for the heap reference - * that we have because of the BAT iterator to - * come down, in other words, deadlock */ + /* transient BATs loose their logical reference */ mustrelease = true; } MT_lock_set(&GDKswapLock(bid)); @@ -2607,8 +2612,10 @@ BATmode(BAT *b, bool transient) MT_lock_unset(&GDKswapLock(bid)); } bat_iterator_end(&bi); - /* release after bat_iterator_end because of refs to heaps */ - if (mustrelease) + /* retain/release after bat_iterator_end because of refs to heaps */ + if (mustretain) + BBPretain(bid); + else if (mustrelease) BBPrelease(bid); return GDK_SUCCEED; } diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c --- a/gdk/gdk_bbp.c +++ b/gdk/gdk_bbp.c @@ -1712,6 +1712,9 @@ BBPjson_upgrade(json_storage_conversion const char *nme; nme = ATOMunknown_name(b->ttype); + int tt = ATOMindex(nme); + if (tt >= 0) + b->ttype = tt; if (strcmp(nme, "json") != 0) continue; } else if (b->ttype != JSON_type) { @@ -4067,34 +4070,42 @@ BBPsync(int cnt, bat *restrict subcommit if (lock) MT_lock_set(&GDKswapLock(bid)); } - if (subcommit) { + BAT *b = BBP_desc(bid); + if (subcommit && b->ttype != TYPE_void) { /* move any tail/theap files we find for this bat that * are in the BACKUP directory to the SUBCOMMIT * directory */ + assert(b->ttype > 0); /* no unknown types allowed */ char fname[16]; /* plenty big enough */ - if (snprintf(fname, sizeof(fname), "%o", i) < 16) { + if (snprintf(fname, sizeof(fname), "%o", (unsigned) bid) < 16) { /* the snprintf never fails, any of the * below may fail */ - if (GDKmove(0, BAKDIR, fname, "tail", SUBDIR, fname, "tail", false) == GDK_SUCCEED) - TRC_DEBUG(BAT_, "moved %s.tail from %s to %s\n", + uint8_t stpe = ATOMstorage(b->ttype); + if ((b->ttype != TYPE_str || b->twidth >= 8) && + GDKmove(0, BAKDIR, fname, "tail", SUBDIR, fname, "tail", false) == GDK_SUCCEED) + TRC_DEBUG(IO_, "moved %s.tail from %s to %s\n", fname, BAKDIR, SUBDIR); - if (GDKmove(0, BAKDIR, fname, "tail1", SUBDIR, fname, "tail1", false) == GDK_SUCCEED) - TRC_DEBUG(BAT_, "moved %s.tail1 from %s to %s\n", + if (stpe == TYPE_str && + GDKmove(0, BAKDIR, fname, "tail1", SUBDIR, fname, "tail1", false) == GDK_SUCCEED) + TRC_DEBUG(IO_, "moved %s.tail1 from %s to %s\n", fname, BAKDIR, SUBDIR); - if (GDKmove(0, BAKDIR, fname, "tail2", SUBDIR, fname, "tail2", false) == GDK_SUCCEED) - TRC_DEBUG(BAT_, "moved %s.tail2 from %s to %s\n", + if (stpe == TYPE_str && b->twidth >= 2 && + GDKmove(0, BAKDIR, fname, "tail2", SUBDIR, fname, "tail2", false) == GDK_SUCCEED) _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org