From nobody Sun Jun 16 11:33:51 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W29rb6cqYz5NdRT; Sun, 16 Jun 2024 11:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W29rb64kyz4t2N; Sun, 16 Jun 2024 11:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718537631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+mdyPQTFKuXbEgvcZEXfYW46SCKsjNAviGG2sdJIbsM=; b=GNhJ7X6tlbe49f0Njt8MgGsgrqI+Z2ljHGVOCEr1dwGWz3rzGSEQIV5PkynTTTXT8uTdbY MPYmQAurZMc0iJqBdOIqoiBXlE3Ba0dpc9YYfC/RqsUpVwr+a54Nh+x2qMH/bTt9UXBscP Ex56y6VTbzQm+3G5fo3y8oSLC+D+ECbH2aZZrZXsuwEWIee0Fl5tiH6uXjxjQ9Ju1UCTCg 9P9noesrFPbP7LExzeILMgjWOqNnWD2D2s6EsCBoN4760Mu29/0/cH/X8sy6Osb62/CThx 2htYsab76X9Ay2YfJHXGomcZM5pOGp8WnM/0HdW91MBJeceRTB9vtCvUgrlF4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718537631; a=rsa-sha256; cv=none; b=yDyrqBEVAVKf2wdftsi3eunnabQNfx/ILvO6MVcfer0PE53VkBPflwGpOfiFfR56x8ZoJS PH3wAu4DJN050dixkSKdpW0J+eb8nDV0n1oEhhRDq7BVI/9qC3LBKSkZ413bcSU6Ujx+rj fpScLCz7puDRZVTxakwBinLMnFnPXhvLJvSuXOGMR6dSEPg/oiZcxTJRXaRB/qveh8crV+ XiXp3N/cu17qNoegPUOIWF87LibVKbFixRE7Scfyk8RT6VHPplGnLehJaYpIRQ2VStwIFy d6feF5OLX3IqKgoQVec+VdPr3r1w68jj2z8aGJhXUDmG7ITkqUCsnffoW1ROZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718537631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+mdyPQTFKuXbEgvcZEXfYW46SCKsjNAviGG2sdJIbsM=; b=BFmWOec4yXqUZiF0b5VW3faHyHHrCS8I3eyLzyWd8DhSUsvwUn2bRmn1+ZMKBSNXo1GFwk Jxfu0ruNIDos3Ruc4h4NGxi+MXPpdCWjMVGmilBmZyYGV7Lqf23lka5hwQeyu8py6glg4T XjoJELd5rbYugAgO5tr6pOr+YwyjaPOscBgyCxjsV90yEntGCms7lWXwiWfcZnmmd4XENy wQJ1cpb+jXAN4UgzzWhUzdshr66qhgb8gMsmhg1KwIPcNKOcZTpnjoPxBh/Jd4/IHrZ5W/ PlKu4FVfNpvwE0KAJ+5seZoaPUSGoNcTtRkSlo20Ch6jd1037BbhTwBrXm9cGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4W29rb5gmPzmMs; Sun, 16 Jun 2024 11:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 45GBXpk8064585; Sun, 16 Jun 2024 11:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45GBXpCc064582; Sun, 16 Jun 2024 11:33:51 GMT (envelope-from git) Date: Sun, 16 Jun 2024 11:33:51 GMT Message-Id: <202406161133.45GBXpCc064582@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Bernard Spil Subject: git: 06c03bcd2f1a - main - databases/mariadb1011-server: Fix Hangs Indefinitely List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brnrd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 06c03bcd2f1a0a88cc1a5e8cb1a39a1327bad62d Auto-Submitted: auto-generated The branch main has been updated by brnrd: URL: https://cgit.FreeBSD.org/ports/commit/?id=06c03bcd2f1a0a88cc1a5e8cb1a39a1327bad62d commit 06c03bcd2f1a0a88cc1a5e8cb1a39a1327bad62d Author: Bernard Spil AuthorDate: 2024-06-16 11:32:13 +0000 Commit: Bernard Spil CommitDate: 2024-06-16 11:32:13 +0000 databases/mariadb1011-server: Fix Hangs Indefinitely PR: 279362 Obtained from: https://jira.mariadb.org/browse/MDEV-34254 --- databases/mariadb1011-server/Makefile | 1 + databases/mariadb1011-server/files/patch-PR279362 | 85 +++++++++++++++++++++++ 2 files changed, 86 insertions(+) diff --git a/databases/mariadb1011-server/Makefile b/databases/mariadb1011-server/Makefile index c05402fe66d9..9859fd79a8b4 100644 --- a/databases/mariadb1011-server/Makefile +++ b/databases/mariadb1011-server/Makefile @@ -1,5 +1,6 @@ PORTNAME?= mariadb PORTVERSION= 10.11.8 +PORTREVISION= 1 CATEGORIES= databases MASTER_SITES= https://mirror.nodesdirect.com/${SITESDIR}/ \ https://mirror.one.com/${SITESDIR}/ \ diff --git a/databases/mariadb1011-server/files/patch-PR279362 b/databases/mariadb1011-server/files/patch-PR279362 new file mode 100644 index 000000000000..f779ad442e1e --- /dev/null +++ b/databases/mariadb1011-server/files/patch-PR279362 @@ -0,0 +1,85 @@ +From 45279cb03d55859423349df7e11caa5ae2b012c5 Mon Sep 17 00:00:00 2001 +From: Dave Gosselin +Date: Mon, 13 May 2024 10:36:11 -0400 +Subject: [PATCH] MDEV-34129 mariadb-install-db appears to hang on macOS + +A bug in signal_handler thread initialization led to an overcomplicated +implementation of wait_for_signal_handler_to_end, namely that we could +fail to initialize the signal handler but mark it as active anyway. +This meant that we could wait for it to terminate when it didn't exist +in the first place. + +Additionally, let's immediately close down the signal handler loop when +we decide to break connections--it's the start of process termination +anyway, and there's no need to wait once we've invoked break_connections. +--- mysql-test/suite/rpl/r/rpl_shutdown_sighup.result.orig 2024-05-10 21:02:44 UTC ++++ mysql-test/suite/rpl/r/rpl_shutdown_sighup.result +@@ -41,7 +41,6 @@ connection slave; + shutdown; + connection server_2; + connection slave; +-include/assert_grep.inc [Ensure warning is issued that signal handler thread is still processing] + # + # Cleanup + connection master; + .../suite/rpl/r/rpl_shutdown_sighup.result | 1 - + .../suite/rpl/t/rpl_shutdown_sighup.test | 7 --- + sql/mysqld.cc | 61 ++++++++++--------- + 3 files changed, 32 insertions(+), 37 deletions(-) + +--- mysql-test/suite/rpl/t/rpl_shutdown_sighup.test.orig 2024-05-10 21:02:44 UTC ++++ mysql-test/suite/rpl/t/rpl_shutdown_sighup.test +@@ -137,13 +137,6 @@ --source include/wait_until_connected_again.inc + --enable_reconnect + --source include/wait_until_connected_again.inc + +---let $assert_text= Ensure warning is issued that signal handler thread is still processing +---let $assert_select= Signal handler thread did not exit in a timely manner. +---let $assert_file= $MYSQLTEST_VARDIR/log/mysqld.2.err +---let $assert_count= 1 +---let $assert_only_after = CURRENT_TEST: rpl.rpl_shutdown_sighup +---source include/assert_grep.inc +- + + --echo # + --echo # Cleanup +diff --git a/sql/mysqld.cc b/sql/mysqld.cc +index 5ae30282729..68d8a04430f 100644 +--- sql/mysqld.cc.orig ++++ sql/mysqld.cc +@@ -3205,6 +3205,15 @@ static void start_signal_handler(void) + DBUG_VOID_RETURN; + } + ++/** Called only from signal_hand function. */ ++static void* exit_signal_handler() ++{ ++ my_thread_end(); ++ signal_thread_in_use= 0; ++ pthread_exit(0); // Safety ++ return nullptr; // Avoid compiler warnings ++} ++ + + /** This threads handles all signals and alarms. */ + /* ARGSUSED */ +@@ -3265,10 +3274,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) + if (abort_loop) + { + DBUG_PRINT("quit",("signal_handler: calling my_thread_end()")); +- my_thread_end(); +- signal_thread_in_use= 0; +- pthread_exit(0); // Safety +- return 0; // Avoid compiler warnings ++ return exit_signal_handler(); + } + switch (sig) { + case SIGTERM: +@@ -3287,6 +3293,7 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) + PSI_CALL_delete_current_thread(); + my_sigset(sig, SIG_IGN); + break_connect_loop(); // MIT THREAD has a alarm thread ++ return exit_signal_handler(); + } + break; + case SIGHUP: