From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UNxKLix9GF+HFgAA0tVLHw (envelope-from ) for ; Wed, 22 Jul 2020 17:53:48 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id MP78KSx9GF9BdgAAbx9fmQ (envelope-from ) for ; Wed, 22 Jul 2020 17:53:48 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 887E4940220 for ; Wed, 22 Jul 2020 17:53:47 +0000 (UTC) Received: from localhost ([::1]:51986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jyIw4-00081f-T6 for larch@yhetil.org; Wed, 22 Jul 2020 13:53:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jyIvO-0007TA-VZ for bug-guix@gnu.org; Wed, 22 Jul 2020 13:53:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jyIvO-0001Uk-LY for bug-guix@gnu.org; Wed, 22 Jul 2020 13:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jyIvO-0000nV-Jb for bug-guix@gnu.org; Wed, 22 Jul 2020 13:53:02 -0400 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 X-Spam-Score: -2.4 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=famulari.name header.s=mesmtp header.b=YeF8I 8d; dkim=fail (rsa verify failed) header.d=messagingengine.com header.s=fm3 header.b=Ib+vlnBg; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 2.49 X-TUID: Xjqdby9BeIfb --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--