From unknown Sat Jun 14 19:48:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42476: Krita fails to start Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 22 Jul 2020 17:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42476 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42476@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15954403272997 (code B ref -1); Wed, 22 Jul 2020 17:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jul 2020 17:52:07 +0000 Received: from localhost ([127.0.0.1]:42964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuP-0000ly-Th for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:35304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuI-0000li-9x for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuI-0006Jb-1m for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:54 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuA-0001Ld-F5 for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:53 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id C094810B4; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 22 Jul 2020 13:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:mime-version:content-type; s= mesmtp; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6XuqV3Rwnz7rFrjng=; b=YeF8I 8dcJLMY0Emk7j94WntfbxR2GKxhr/bZYnng9gXECjydWCydMTTwTQ4q4FL5SI+LI uqfoUyeANlAl1nrOk2PtKzzJ2qjJA3xHOSpNEM+c+vxhVh9v3OHXD0UJbxW2ewbG wFA5cRHz2eMFbp/lajOGUvfcrS6zcRpP+ITrYs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6Xu qV3Rwnz7rFrjng=; b=Ib+vlnBgODzrWh0mxlo9lbDCOhbu/O20ZLcNK61X9tU5x PrQ2DAF4JdJv/tI0WtnaOUaXPHA/KryZ1l7hurcgxwdRnKPx4XgJkv6PG8x4AzWy /9Uf33553zol7pmdGfevLTmARHU496KfINEgL2hleUEUAd3/7XAszWDl3OYBGWsd F66L5dwldl4b9Xu2KypEhq6GVjlPSui22lO76excTWlamxU9+gVJJdXhVA4qZ7H+ aX0qRc0Gzozk4U0h4MoGgct8lTcc+Rd0lubzfxMdU7VNAeizYwwZP0qMkCsKaecs NIa04oIxHKB3FVr/avhQkYfYOxPAvZ4DGzY/gNFhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesmhdtreertd dtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepteefieekkefhkeejuefguefhieevffekge eileduhfetfefgfedtleefffekkeeunecuffhomhgrihhnpehqthdrihhonecukfhppeej fedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 2833D3280064 for ; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Date: Wed, 22 Jul 2020 13:51:41 -0400 From: Leo Famulari Message-ID: <20200722175141.GA21000@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline Received-SPF: pass client-ip=64.147.123.19; envelope-from=leo@famulari.name; helo=wout3-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 13:51:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Currently, Krita fails to start after loading its splash screen. It just hangs forever. I found this upstream bug report in Qt: https://bugreports.qt.io/browse/QTBUG-83207 Currently, I'm testing the build of Krita based on the Qt patch in that bug report. I've attached my patch. --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Fix-Krita.patch" >From 616b65411505555f71e44618eeb969cf6aa64f02 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jul 2020 13:47:39 -0400 Subject: [PATCH] gnu: Fix Krita. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde.scm (qtbase-for-krita): New variable. (krita)[inputs]: Replace qtbase with qtbase-for-krita. --- gnu/local.mk | 1 + gnu/packages/kde.scm | 10 +- .../patches/qtbase-fix-krita-deadlock.patch | 110 ++++++++++++++++++ gnu/packages/qt.scm | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch diff --git a/gnu/local.mk b/gnu/local.mk index a1bd6a644a..6464181548 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1488,6 +1488,7 @@ dist_patch_DATA = \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ + %D%/packages/patches/qtbase-fix-krita-deadlock.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 9a80e362b6..9fa8ed7c15 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -360,6 +360,14 @@ a module for implementing ODF Gantt charts, which are bar charts that illustrate project schedules.") (license license:gpl2+))) +(define qtbase-for-krita + (package + (inherit qtbase) + (source (origin + (inherit (package-source qtbase)) + (patches (append (origin-patches (package-source qtbase)) + (search-patches "qtbase-fix-krita-deadlock.patch"))))))) + (define-public krita (package (name "krita") @@ -434,7 +442,7 @@ illustrate project schedules.") ("openexr" ,openexr) ("perl" ,perl) ("poppler-qt5" ,poppler-qt5) - ("qtbase" ,qtbase) + ("qtbase" ,qtbase-for-krita) ("qtdeclarative" ,qtdeclarative) ("qtmultimedia" ,qtmultimedia) ("qtsvg" ,qtsvg) diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch new file mode 100644 index 0000000000..d3554be3c9 --- /dev/null +++ b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch @@ -0,0 +1,110 @@ +Fix a deadlock in Krita: + +https://bugreports.qt.io/browse/QTBUG-83207 + +Patch copied from Qt bug tracker: + +https://codereview.qt-project.org/c/qt/qtbase/+/296034 + +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 02 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c..be9d92b 100644 +--- a/src/corelib/plugin/qlibrary.cpp ++++ b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +- mutex.lock(); + bool ret = load_sys(); +- mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97..a5c72f8 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ + + bool QLibraryPrivate::load_sys() + { ++ QMutexLocker locker(&mutex); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ + } + #endif + ++ locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ + } + } + #endif ++ ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf76..ef58724 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp ++++ b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++ QMutexLocker locker(&mutex); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++ locker.unlock(); + Handle hnd = nullptr; + for (const QString &attempt : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 0cb36427a0..e0e71c595d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -342,6 +342,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtbase (package (name "qtbase") + ;; TODO Remove ((gnu packages kde) qtbase-for-krita) when upgrading qtbase. (version "5.14.2") (source (origin (method url-fetch) -- 2.26.2 --UlVJffcvxoiEqYs2-- From unknown Sat Jun 14 19:48:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Famulari Subject: bug#42476: closed (Re: Krita fails to start) Message-ID: References: <20200723204408.GA17133@jasmine.lan> <20200722175141.GA21000@jasmine.lan> X-Gnu-PR-Message: they-closed 42476 X-Gnu-PR-Package: guix Reply-To: 42476@debbugs.gnu.org Date: Thu, 23 Jul 2020 20:45:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1595537101-13977-1" This is a multi-part message in MIME format... ------------=_1595537101-13977-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42476: Krita fails to start which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42476@debbugs.gnu.org. --=20 42476: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42476 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595537101-13977-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42476-done) by debbugs.gnu.org; 23 Jul 2020 20:44:20 +0000 Received: from localhost ([127.0.0.1]:46158 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyi4i-0003cS-17 for submit@debbugs.gnu.org; Thu, 23 Jul 2020 16:44:20 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58201) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyi4d-0003c4-EG for 42476-done@debbugs.gnu.org; Thu, 23 Jul 2020 16:44:18 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 3EE7C5C00B7; Thu, 23 Jul 2020 16:44:10 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 23 Jul 2020 16:44:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:mime-version:content-type; s= mesmtp; bh=pP/3KlV0uzaWPOc+hSXeKnGwUTkHiaF3JmXv9AAxvYI=; b=r6fnZ /ge3wuYRZMysIFZuVSfP32W8z+ZRqIZdLMab5HgeHoSP7OBLb5muTUKCZuJ1hJ4v zOFTx1WEO8Z+nuT06Cwwg9Pkkg222i4Ow+qWkmiEBcTl9zvQcSWQMv72cipL3JgH ymEF0ovqT3hYTc346tm/OpCZ2U1OdlgZmTeHDY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=pP/3KlV0uzaWPOc+hSXeKnGwUTkHi aF3JmXv9AAxvYI=; b=YJPh9ndLQeToUFDs+Nu1x7odGN03ecK77hQi8EEMph72I 2R36o+ykAQDWUF5EyFb6hoDonkowEJ4arVHwWAFU8re9K7uE99DJS0J6Lp1BbrDp 6obptW5e6nCFGxYAmHtxzVgDWKxgYcfFatT3k1XyBCQGuZg+THOvFk6DR3L18uAO m7NurmCRCAJGmt0Kqtq2yfpJheZLCy6r5PBK1AKAcDZw7AcdP22z8p0hD+Uby1g5 1QWuc/h6k9bAwAUfKNfMGgosabXenJC95GnxL/ZVac6q6HjJdyyLuUC4ynwlOzEJ cf8QcB9pN4ZZi09mTuGC4Rpf1TryD5Ti3joAG+N9A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrhedugdduheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesghdtreertd dtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepjeeiuedtffelgeduheeghffhudeuueelve evgeegheevffekiefhvedvhfekfedvnecukfhppeejfedrudeguddruddvjedrudegieen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvghose hfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id ED8C930600A3 for <42476-done@debbugs.gnu.org>; Thu, 23 Jul 2020 16:44:09 -0400 (EDT) Date: Thu, 23 Jul 2020 16:44:08 -0400 From: Leo Famulari To: 42476-done@debbugs.gnu.org Subject: Re: Krita fails to start Message-ID: <20200723204408.GA17133@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42476-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline This should be fixed with commit 5f63905096e456097fca206f56ce9257f72faf64 --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl8Z9pgACgkQJkb6MLrK fwj03xAAh5dYGEnWHuNrIj7otOEDVP15xddmL6K1TAcjzQ7CAFLNhQMtP5VF6xRt RSuZj8xgh80svv8I50lnpbjKjFdHawX2a7aKSAAUeWce7ytQ4gCN29ZiZH893Hqc HSFHZYzp+GJn0co51m0rTffa5jmWzEG3Lnga1SSAa8Wc6kmIH3Dg8z4muD8e8W// n655IrizsLztFa6vORTDCb3D0k4fXWXCfMq4W/0AXWZII98LeQvkF1rpIcdP6wWi pMYT7TNQdaiAzv5XF0uTR71o50znoODt1ZaBIGGLAT5TQk08kxvcQ8QkzORV5Rha TeupGgGMUJJsARvJkMKP7G8USzKRA1nJ/eBglt7dUavIZj5eIZ+8sWS52j5J+fKY 4mZqjHeaTAGPBCptg1GlKolek3Vhbyivfm7R6IyZ1bEMveP72d07LkMiunJsB6uQ xG8fH787zSVQ3KR7V1t1SqF4D5A+6F1szc59wpREW9in3EpJ3mnV8M1ukdoG6mdK +STQAWSfKtgYRqpS2hdY+/UnmVfdZc7WThS5qQAWJy5dvcGhFXx5lXkK0M/NvCOG R9cu9NXkQxm0E9tREXL8WRRt5z3fyZRdFSu+rxlD7fC7uqJqqSQg9ErC4FqZ8/nB 52smmKhwow6y8203fmDhTK8tYULB8HKciX5cQWYM4Vv7n9bCZN4= =re3q -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- ------------=_1595537101-13977-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jul 2020 17:52:07 +0000 Received: from localhost ([127.0.0.1]:42964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuP-0000ly-Th for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:35304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuI-0000li-9x for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuI-0006Jb-1m for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:54 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuA-0001Ld-F5 for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:53 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id C094810B4; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 22 Jul 2020 13:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:mime-version:content-type; s= mesmtp; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6XuqV3Rwnz7rFrjng=; b=YeF8I 8dcJLMY0Emk7j94WntfbxR2GKxhr/bZYnng9gXECjydWCydMTTwTQ4q4FL5SI+LI uqfoUyeANlAl1nrOk2PtKzzJ2qjJA3xHOSpNEM+c+vxhVh9v3OHXD0UJbxW2ewbG wFA5cRHz2eMFbp/lajOGUvfcrS6zcRpP+ITrYs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6Xu qV3Rwnz7rFrjng=; b=Ib+vlnBgODzrWh0mxlo9lbDCOhbu/O20ZLcNK61X9tU5x PrQ2DAF4JdJv/tI0WtnaOUaXPHA/KryZ1l7hurcgxwdRnKPx4XgJkv6PG8x4AzWy /9Uf33553zol7pmdGfevLTmARHU496KfINEgL2hleUEUAd3/7XAszWDl3OYBGWsd F66L5dwldl4b9Xu2KypEhq6GVjlPSui22lO76excTWlamxU9+gVJJdXhVA4qZ7H+ aX0qRc0Gzozk4U0h4MoGgct8lTcc+Rd0lubzfxMdU7VNAeizYwwZP0qMkCsKaecs NIa04oIxHKB3FVr/avhQkYfYOxPAvZ4DGzY/gNFhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesmhdtreertd dtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepteefieekkefhkeejuefguefhieevffekge eileduhfetfefgfedtleefffekkeeunecuffhomhgrihhnpehqthdrihhonecukfhppeej fedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 2833D3280064 for ; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Date: Wed, 22 Jul 2020 13:51:41 -0400 From: Leo Famulari To: bug-guix@gnu.org Subject: Krita fails to start Message-ID: <20200722175141.GA21000@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline Received-SPF: pass client-ip=64.147.123.19; envelope-from=leo@famulari.name; helo=wout3-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 13:51:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Currently, Krita fails to start after loading its splash screen. It just hangs forever. I found this upstream bug report in Qt: https://bugreports.qt.io/browse/QTBUG-83207 Currently, I'm testing the build of Krita based on the Qt patch in that bug report. I've attached my patch. --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Fix-Krita.patch" >From 616b65411505555f71e44618eeb969cf6aa64f02 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jul 2020 13:47:39 -0400 Subject: [PATCH] gnu: Fix Krita. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde.scm (qtbase-for-krita): New variable. (krita)[inputs]: Replace qtbase with qtbase-for-krita. --- gnu/local.mk | 1 + gnu/packages/kde.scm | 10 +- .../patches/qtbase-fix-krita-deadlock.patch | 110 ++++++++++++++++++ gnu/packages/qt.scm | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch diff --git a/gnu/local.mk b/gnu/local.mk index a1bd6a644a..6464181548 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1488,6 +1488,7 @@ dist_patch_DATA = \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ + %D%/packages/patches/qtbase-fix-krita-deadlock.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 9a80e362b6..9fa8ed7c15 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -360,6 +360,14 @@ a module for implementing ODF Gantt charts, which are bar charts that illustrate project schedules.") (license license:gpl2+))) +(define qtbase-for-krita + (package + (inherit qtbase) + (source (origin + (inherit (package-source qtbase)) + (patches (append (origin-patches (package-source qtbase)) + (search-patches "qtbase-fix-krita-deadlock.patch"))))))) + (define-public krita (package (name "krita") @@ -434,7 +442,7 @@ illustrate project schedules.") ("openexr" ,openexr) ("perl" ,perl) ("poppler-qt5" ,poppler-qt5) - ("qtbase" ,qtbase) + ("qtbase" ,qtbase-for-krita) ("qtdeclarative" ,qtdeclarative) ("qtmultimedia" ,qtmultimedia) ("qtsvg" ,qtsvg) diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch new file mode 100644 index 0000000000..d3554be3c9 --- /dev/null +++ b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch @@ -0,0 +1,110 @@ +Fix a deadlock in Krita: + +https://bugreports.qt.io/browse/QTBUG-83207 + +Patch copied from Qt bug tracker: + +https://codereview.qt-project.org/c/qt/qtbase/+/296034 + +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 02 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c..be9d92b 100644 +--- a/src/corelib/plugin/qlibrary.cpp ++++ b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +- mutex.lock(); + bool ret = load_sys(); +- mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97..a5c72f8 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ + + bool QLibraryPrivate::load_sys() + { ++ QMutexLocker locker(&mutex); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ + } + #endif + ++ locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ + } + } + #endif ++ ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf76..ef58724 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp ++++ b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++ QMutexLocker locker(&mutex); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++ locker.unlock(); + Handle hnd = nullptr; + for (const QString &attempt : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 0cb36427a0..e0e71c595d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -342,6 +342,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtbase (package (name "qtbase") + ;; TODO Remove ((gnu packages kde) qtbase-for-krita) when upgrading qtbase. (version "5.14.2") (source (origin (method url-fetch) -- 2.26.2 --UlVJffcvxoiEqYs2-- ------------=_1595537101-13977-1-- From unknown Sat Jun 14 19:48:21 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Famulari Subject: bug#42476: closed (Re: Krita fails to start) Message-ID: References: <20200723223049.GA31218@jasmine.lan> <20200722175141.GA21000@jasmine.lan> X-Gnu-PR-Message: they-closed 42476 X-Gnu-PR-Package: guix Reply-To: 42476@debbugs.gnu.org Date: Thu, 23 Jul 2020 22:31:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1595543462-32324-1" This is a multi-part message in MIME format... ------------=_1595543462-32324-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #42476: Krita fails to start which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 42476@debbugs.gnu.org. --=20 42476: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D42476 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1595543462-32324-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 42476-done) by debbugs.gnu.org; 23 Jul 2020 22:31:00 +0000 Received: from localhost ([127.0.0.1]:46253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyjjw-0008P9-02 for submit@debbugs.gnu.org; Thu, 23 Jul 2020 18:31:00 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:46117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyjjs-0008Ot-Vy for 42476-done@debbugs.gnu.org; Thu, 23 Jul 2020 18:30:59 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id C26E45C00B3; Thu, 23 Jul 2020 18:30:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 23 Jul 2020 18:30:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=q+w9qMbwpDKgSY7tYW9wcQ2t QMn1YX6xdIpXJrpG4D4=; b=jv+8qLihB74ipkneKhEY8/rAT4Qao7SK6Kl5+4ft oOwalMbfotdXktEPR3rlBc/DH6BOEqoMVvhvVr83NPHZ3V3CUVGA5SSt0Ee8Du1m iGCdgUidskcYrOk6eqto7noSaTVfJcruSwgm8IZTkAPjt4K/z3hRGCnBDTswF6pl y8o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=q+w9qM bwpDKgSY7tYW9wcQ2tQMn1YX6xdIpXJrpG4D4=; b=ESTWFaGfRJ87aaabta4C/z 3uGUi4SpPfIU3BwhSe6/PAqpSSVEYXblrZIk1SJ38zvB5gdeaD9uBQoDYOtSfuXJ z6u/77VEaxNLJXx9ydSl896gU8Eimpk95TgUbdiabquio7yFn05hF+y8W+TBcsuw sB1QYBfexflNmAOKl0bh5y1HowkWE8AyIlm8Tu/qVvBZv/SDH7X12ij45NEQz6t1 PTVe/ledybeiSyENNgYQYrAcDEaMHbuSIsZIZWB9Punm9wgwgrgbuI2Y8bJkq+m4 Jz5WhxtsjYqfoQgax3f/iSk1mEv4/9GoyD7kBmqFekc/GCi++G8x+/AI81ZOaw+A == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrhedvgddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehgtderre dttddvnecuhfhrohhmpefnvghoucfhrghmuhhlrghrihcuoehlvghosehfrghmuhhlrghr ihdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeejfefffefhgeeukedvledtheelteetue evieethedvhffghedtteehuefhfffhgeenucffohhmrghinhepvghvrghlrdhstgenucfk phepjeefrddugedurdduvdejrddugeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvg X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 71D2D3280066 for <42476-done@debbugs.gnu.org>; Thu, 23 Jul 2020 18:30:51 -0400 (EDT) Date: Thu, 23 Jul 2020 18:30:49 -0400 From: Leo Famulari To: 42476-done@debbugs.gnu.org Subject: Re: Krita fails to start Message-ID: <20200723223049.GA31218@jasmine.lan> References: <20200723204408.GA17133@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wac7ysb48OaltWcw" Content-Disposition: inline In-Reply-To: <20200723204408.GA17133@jasmine.lan> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 42476-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --wac7ysb48OaltWcw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jul 23, 2020 at 04:44:08PM -0400, Leo Famulari wrote: > This should be fixed with commit > 5f63905096e456097fca206f56ce9257f72faf64 That commit actually broke `guix pull` as shown below. Sorry! ------ Backtrace: In ice-9/boot-9.scm: 222:29 19 (map1 _) 222:29 18 (map1 _) 222:29 17 (map1 _) 222:29 16 (map1 _) 222:17 15 (map1 (((gnu packages kde)) ((gnu packages libevent)) ((gnu packages libidn)) ((gnu packages #)) ((?)) ?)) 3297:17 14 (resolve-interface (gnu packages kde) #:select _ #:hide _ #:prefix _ #:renamer _ #:version _) In ice-9/threads.scm: 390:8 13 (_ _) In ice-9/boot-9.scm: 3223:13 12 (_) In ice-9/threads.scm: 390:8 11 (_ _) In ice-9/boot-9.scm: 3507:20 10 (_) 2806:4 9 (save-module-excursion _) 3527:26 8 (_) In unknown file: 7 (primitive-load-path "gnu/packages/kde" #) In ice-9/eval.scm: 626:19 6 (_ #) 293:34 5 (_ #) 173:47 4 (_ #(# #)) 159:9 3 (_ #(# #)) 191:35 2 (_ #(# #)) 223:20 1 (proc #(# #)) In unknown file: 0 (%resolve-variable (7 . qtbase) #) ERROR: In procedure %resolve-variable: error: qtbase: unbound variable ------ I fixed it by moving qtbase-for-krita package to (gnu packages qt) and pushed as 0448bfe2d769998ba33c288a07738e13b02113a4. I'm not sure exactly what's wrong but my hunch is that there is a module dependency cycle. --wac7ysb48OaltWcw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAl8aD5kACgkQJkb6MLrK fwhfhA/7B6x5GJ/LpKf3P6Yfufsxg08ZETXRt4XzlEPF72qUVZPu8d6a0u9QQ78x gy5MVKWa5VpYIaVq3Y+Er6HPtJ9s+Bl/RiBgqgAWE3JrSKixsjmm9RNmWIXz8fhj ocToC+ZucZaRvZ+eTmPCFDJtx0/iPJYa8mhFivj9Ub5Qx4QrDsrPSjcDc0Dcq46V QAiJw1ORMz4pZ+ygQc5iwoQUSgmYZbEJZHNVAcXhhqCW3r4+StDQuGe/fyKEdS67 OPFfxxOB2AXr0KzIeXgoYhFpm3mZxOYB0BXcqRXwh8J1ZdaacySoEVyGxH3L81WU OHSO2kdaNGMA/fwVapYiwTcjIE3IHIfFUOeS3GxYnQRXT6YBjAymrvGbhnsD/b50 rqgnBf0QIwGB0MzCcKq6s68qsds8e6u9I66H5bcK/c7mdiD0Go21PQmxYb59sfkd AkuFeoUBK/X53YvR1t4iFCp5hfapWpZUcnQhMnF/On3ymtN55Xwk9bX1Vd0pKYkU euhWzfsbTxziRt4Xjdk8URJg+WFBzxNWkVjwbWM6XIw7uk9Mr6J533TDSTc1e+XR 40zgvd3x1qFBhkP4GqDTa/53MoRPyqVmIJCkMCMDShsDeINlD4VEuYfP5WBFrx9t 7tAK2agexO/AGeTB2XL7OLv97PqiJHNq8S2oopms71E3ziEJ29Q= =kikH -----END PGP SIGNATURE----- --wac7ysb48OaltWcw-- ------------=_1595543462-32324-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jul 2020 17:52:07 +0000 Received: from localhost ([127.0.0.1]:42964 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuP-0000ly-Th for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:35304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyIuI-0000li-9x for submit@debbugs.gnu.org; Wed, 22 Jul 2020 13:52:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuI-0006Jb-1m for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:54 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:41729) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIuA-0001Ld-F5 for bug-guix@gnu.org; Wed, 22 Jul 2020 13:51:53 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id C094810B4; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 22 Jul 2020 13:51:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:subject:message-id:mime-version:content-type; s= mesmtp; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6XuqV3Rwnz7rFrjng=; b=YeF8I 8dcJLMY0Emk7j94WntfbxR2GKxhr/bZYnng9gXECjydWCydMTTwTQ4q4FL5SI+LI uqfoUyeANlAl1nrOk2PtKzzJ2qjJA3xHOSpNEM+c+vxhVh9v3OHXD0UJbxW2ewbG wFA5cRHz2eMFbp/lajOGUvfcrS6zcRpP+ITrYs= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=hPi1VwTKOJF6JemTOQcDb8jbaR6Xu qV3Rwnz7rFrjng=; b=Ib+vlnBgODzrWh0mxlo9lbDCOhbu/O20ZLcNK61X9tU5x PrQ2DAF4JdJv/tI0WtnaOUaXPHA/KryZ1l7hurcgxwdRnKPx4XgJkv6PG8x4AzWy /9Uf33553zol7pmdGfevLTmARHU496KfINEgL2hleUEUAd3/7XAszWDl3OYBGWsd F66L5dwldl4b9Xu2KypEhq6GVjlPSui22lO76excTWlamxU9+gVJJdXhVA4qZ7H+ aX0qRc0Gzozk4U0h4MoGgct8lTcc+Rd0lubzfxMdU7VNAeizYwwZP0qMkCsKaecs NIa04oIxHKB3FVr/avhQkYfYOxPAvZ4DGzY/gNFhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrgeelgdduudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkgggtugesmhdtreertd dtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhi rdhnrghmvgeqnecuggftrfgrthhtvghrnhepteefieekkefhkeejuefguefhieevffekge eileduhfetfefgfedtleefffekkeeunecuffhomhgrihhnpehqthdrihhonecukfhppeej fedrudeguddruddvjedrudegieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (c-73-141-127-146.hsd1.pa.comcast.net [73.141.127.146]) by mail.messagingengine.com (Postfix) with ESMTPA id 2833D3280064 for ; Wed, 22 Jul 2020 13:51:44 -0400 (EDT) Date: Wed, 22 Jul 2020 13:51:41 -0400 From: Leo Famulari To: bug-guix@gnu.org Subject: Krita fails to start Message-ID: <20200722175141.GA21000@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline Received-SPF: pass client-ip=64.147.123.19; envelope-from=leo@famulari.name; helo=wout3-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/22 13:51:45 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Currently, Krita fails to start after loading its splash screen. It just hangs forever. I found this upstream bug report in Qt: https://bugreports.qt.io/browse/QTBUG-83207 Currently, I'm testing the build of Krita based on the Qt patch in that bug report. I've attached my patch. --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-Fix-Krita.patch" >From 616b65411505555f71e44618eeb969cf6aa64f02 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 22 Jul 2020 13:47:39 -0400 Subject: [PATCH] gnu: Fix Krita. * gnu/packages/patches/qtbase-fix-krita-deadlock.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/kde.scm (qtbase-for-krita): New variable. (krita)[inputs]: Replace qtbase with qtbase-for-krita. --- gnu/local.mk | 1 + gnu/packages/kde.scm | 10 +- .../patches/qtbase-fix-krita-deadlock.patch | 110 ++++++++++++++++++ gnu/packages/qt.scm | 1 + 4 files changed, 121 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qtbase-fix-krita-deadlock.patch diff --git a/gnu/local.mk b/gnu/local.mk index a1bd6a644a..6464181548 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1488,6 +1488,7 @@ dist_patch_DATA = \ %D%/packages/patches/qrcodegen-cpp-make-install.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/qtbase-absolute-runpath.patch \ + %D%/packages/patches/qtbase-fix-krita-deadlock.patch \ %D%/packages/patches/qtbase-moc-ignore-gcc-macro.patch \ %D%/packages/patches/qtbase-use-TZDIR.patch \ %D%/packages/patches/qtscript-disable-tests.patch \ diff --git a/gnu/packages/kde.scm b/gnu/packages/kde.scm index 9a80e362b6..9fa8ed7c15 100644 --- a/gnu/packages/kde.scm +++ b/gnu/packages/kde.scm @@ -360,6 +360,14 @@ a module for implementing ODF Gantt charts, which are bar charts that illustrate project schedules.") (license license:gpl2+))) +(define qtbase-for-krita + (package + (inherit qtbase) + (source (origin + (inherit (package-source qtbase)) + (patches (append (origin-patches (package-source qtbase)) + (search-patches "qtbase-fix-krita-deadlock.patch"))))))) + (define-public krita (package (name "krita") @@ -434,7 +442,7 @@ illustrate project schedules.") ("openexr" ,openexr) ("perl" ,perl) ("poppler-qt5" ,poppler-qt5) - ("qtbase" ,qtbase) + ("qtbase" ,qtbase-for-krita) ("qtdeclarative" ,qtdeclarative) ("qtmultimedia" ,qtmultimedia) ("qtsvg" ,qtsvg) diff --git a/gnu/packages/patches/qtbase-fix-krita-deadlock.patch b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch new file mode 100644 index 0000000000..d3554be3c9 --- /dev/null +++ b/gnu/packages/patches/qtbase-fix-krita-deadlock.patch @@ -0,0 +1,110 @@ +Fix a deadlock in Krita: + +https://bugreports.qt.io/browse/QTBUG-83207 + +Patch copied from Qt bug tracker: + +https://codereview.qt-project.org/c/qt/qtbase/+/296034 + +From 276fa8383a7535765be7182883ef4aade17ce013 Mon Sep 17 00:00:00 2001 +From: Thiago Macieira +Date: Thu, 02 Apr 2020 12:08:41 -0300 +Subject: [PATCH] QLibrary: fix deadlock caused by fix to QTBUG-39642 + +Commit ae6f73e8566fa76470937aca737141183929a5ec inserted a mutex around +the entire load_sys(). We had reasoed that deadlocks would only occur if +the object creation in instance() recursed into its own instance(), +which was already a bug. But we had forgotten that dlopen()/ +LoadLibrary() executes initialization code from the module being loaded, +which could cause a recursion back into the same QPluginLoader or +QLibrary object. This recursion is benign because the module *is* loaded +and dlopen()/LoadLibrary() returns the same handle. + +[ChangeLog][QtCore][QLibrary and QPluginLoader] Fixed a deadlock that +would happen if the plugin or library being loaded has load-time +initialization code (C++ global variables) that recursed back into the +same QLibrary or QPluginLoader object. + +PS: QLibraryPrivate::loadPlugin() updates pluginState outside a mutex +lock, so pluginState should be made an atomic variable. Once that is +done, we'll only need locking the mutex to update errorString (no +locking before loading). + +Fixes: QTBUG-83207 +Task-number: QTBUG-39642 +Change-Id: Ibdc95e9af7bd456a94ecfffd160209304e5ab2eb +Reviewed-by: Volker Hilsheimer +Reviewed-by: David Faure +--- + +diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp +index ddb053c..be9d92b 100644 +--- a/src/corelib/plugin/qlibrary.cpp ++++ b/src/corelib/plugin/qlibrary.cpp +@@ -576,9 +576,7 @@ + + Q_TRACE(QLibraryPrivate_load_entry, fileName); + +- mutex.lock(); + bool ret = load_sys(); +- mutex.unlock(); + if (qt_debug_component()) { + if (ret) { + qDebug() << "loaded library" << fileName; +diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp +index 017aa97..a5c72f8 100644 +--- a/src/corelib/plugin/qlibrary_unix.cpp ++++ b/src/corelib/plugin/qlibrary_unix.cpp +@@ -123,6 +123,7 @@ + + bool QLibraryPrivate::load_sys() + { ++ QMutexLocker locker(&mutex); + QString attempt; + QFileSystemEntry fsEntry(fileName); + +@@ -213,6 +214,7 @@ + } + #endif + ++ locker.unlock(); + bool retry = true; + Handle hnd = nullptr; + for (int prefix = 0; retry && !hnd && prefix < prefixes.size(); prefix++) { +@@ -273,6 +275,8 @@ + } + } + #endif ++ ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg(fileName, qdlerror()); + } +diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp +index 000bf76..ef58724 100644 +--- a/src/corelib/plugin/qlibrary_win.cpp ++++ b/src/corelib/plugin/qlibrary_win.cpp +@@ -78,6 +78,7 @@ + // fileName + // + // NB If it's a plugin we do not ever try the ".dll" extension ++ QMutexLocker locker(&mutex); + QStringList attempts; + + if (pluginState != IsAPlugin) +@@ -95,6 +96,7 @@ + attempts.prepend(QDir::rootPath() + fileName); + #endif + ++ locker.unlock(); + Handle hnd = nullptr; + for (const QString &attempt : qAsConst(attempts)) { + #ifndef Q_OS_WINRT +@@ -115,6 +117,7 @@ + #ifndef Q_OS_WINRT + SetErrorMode(oldmode); + #endif ++ locker.relock(); + if (!hnd) { + errorString = QLibrary::tr("Cannot load library %1: %2").arg( + QDir::toNativeSeparators(fileName), qt_error_string()); diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 0cb36427a0..e0e71c595d 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -342,6 +342,7 @@ developers using C++ or QML, a CSS & JavaScript like language.") (define-public qtbase (package (name "qtbase") + ;; TODO Remove ((gnu packages kde) qtbase-for-krita) when upgrading qtbase. (version "5.14.2") (source (origin (method url-fetch) -- 2.26.2 --UlVJffcvxoiEqYs2-- ------------=_1595543462-32324-1-- From unknown Sat Jun 14 19:48:21 2025 X-Loop: help-debbugs@gnu.org Subject: bug#42476: Krita fails to start Resent-From: "Boris A. Dekshteyn" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 24 Jul 2020 02:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42476 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 42476@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159555853131909 (code B ref -1); Fri, 24 Jul 2020 02:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Jul 2020 02:42:11 +0000 Received: from localhost ([127.0.0.1]:46395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jynf1-0008Ib-31 for submit@debbugs.gnu.org; Thu, 23 Jul 2020 22:42:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:53802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jyney-0008IS-3Q for submit@debbugs.gnu.org; Thu, 23 Jul 2020 22:42:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jynex-00041A-Rb for bug-guix@gnu.org; Thu, 23 Jul 2020 22:42:07 -0400 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]:41094) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jynev-0000iv-VW for bug-guix@gnu.org; Thu, 23 Jul 2020 22:42:07 -0400 Received: by mail-lj1-x234.google.com with SMTP id z24so8451629ljn.8 for ; Thu, 23 Jul 2020 19:42:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=FPP6R9JZnWcX3x6kn3Fl0KwFW1LB79tNQrPRploRAic=; b=lu4uCDCzz9kT+kOIqq8v09NNaaYhWkFDb9sVWVA/7AJmdM53F//fUF6UGQkIgE9YEa ie4EU03Qq1ywCSLaGbqmYOpTFV4nJXlz7JZeiKkfMUiL96bzg60wY/rlzkar7an/ibU/ URP2hSgo/iGD84Dw9VoOe9LIPE0YyZq7Y2WoftC/XRf8sVOUv1Ehrs6clJsw0axSrEaE FsFGtwUokypegZrA8r5/eK80qC0V7sKkcT3iDRX2DskN1Vu/NFXAWo6CtQfb/CsNw+Gr 8nRmeH9oUvSIglJVNTDWMTnOiK4sLhWUD7xRtp9DUXBfMdav/oeKRKmlQa7X5IPwLzZk 1Kyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=FPP6R9JZnWcX3x6kn3Fl0KwFW1LB79tNQrPRploRAic=; b=m5uEoGsdh/lVxY2lc3aGEGb4coImFBaN8cdaKcbr+89rg4STcJ31ORShQdYY0xbGve 02Acr28y6XVvG5LYfR1A6JkWMeJNPCRG11DyRj6UQZv1mJXxo9gy3AmefJ+ZOHI8w76C DnWp+vS97UEau9UGDFR6n+1G5T8bl2Xe0E/M0moWQjLumr1Cwv55E7FAxaHPbLKsWktt OVNd87wdZKOhSTTZRJWaDQxoEY/WefluKZssPbE7LMphKjOiKW6TSgw+0IF4ILc94Be/ /CmWDO2FAWdnep7xYfPEN7TFK5AIRi2zhx8qzQ4qGDX7aGCISVQnT6xAlhyvYJdwWi1V p0Fg== X-Gm-Message-State: AOAM532JSn6mcblkb214QAe20PFlMOETZp4gQLV2cyk9NyiV63C98/sr ugl7n3T8yHYpM6hGNYFXlNa/j8Dt1kY= X-Google-Smtp-Source: ABdhPJzhMAYNfhW6nlUuZlQSXidJET8r8AFN05vkTkr3qWLkcgdFJwqMuvYcXLuNQ390usLcj44NFA== X-Received: by 2002:a2e:b167:: with SMTP id a7mr3437876ljm.83.1595558523075; Thu, 23 Jul 2020 19:42:03 -0700 (PDT) Received: from localhost ([2001:470:24:e81:e248:c95d:b39b:cf51]) by smtp.gmail.com with ESMTPSA id z16sm3316853ljg.68.2020.07.23.19.42.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jul 2020 19:42:02 -0700 (PDT) From: "Boris A. Dekshteyn" References: <20200722175141.GA21000@jasmine.lan> Date: Fri, 24 Jul 2020 14:41:55 +1200 In-Reply-To: <20200722175141.GA21000@jasmine.lan> (Leo Famulari's message of "Wed, 22 Jul 2020 13:51:41 -0400") Message-ID: <877dutd47g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::234; envelope-from=boris.dekshteyn@gmail.com; helo=mail-lj1-x234.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hello, Leo Famulari writes: > Currently, Krita fails to start after loading its splash screen. It just > hangs forever. > > I found this upstream bug report in Qt: > > https://bugreports.qt.io/browse/QTBUG-83207 > > Currently, I'm testing the build of Krita based on the Qt patch in that > bug report. > > I've attached my patch. fixed in krita 4.3, relased about a month ago: - (version "4.2.9") + (version "4.3.0") (source (origin (method url-fetch) (uri (string-append @@ -372,7 +372,7 @@ illustrate project schedules.") "/krita-" version ".tar.gz")) (sha256 (base32 - "1a3djmjhnvlp8dpiz68s0lwg71nv3ypq592jfgsnm5zlxa0vp1cz")))) + "1njbxv7b56if838gv7ydzm1sprgmaabnp0jlj0bxryxzfdy8hwfh")))) -- WBR, Boris Dekshteyn