public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Try fix for omp crash
@ 2026-11-23  9:32 Igor Gnatenko
  0 siblings, 0 replies; only message in thread
From: Igor Gnatenko @ 2026-11-23  9:32 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 7b81210f7b49a5a81e0246b3e84627826ad89970
            Author : Igor Gnatenko <ignatenkobrain@fedoraproject.org>
            Date   : 2019-06-11T12:48:53+02:00
            Stats  : +46/-2 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/7b81210f7b49a5a81e0246b3e84627826ad89970?branch=pmatilai-v6

            Log:
            Try fix for omp crash

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>

---
diff --git a/0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch b/0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch
new file mode 100644
index 0000000..540d440
--- /dev/null
+++ b/0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch
@@ -0,0 +1,43 @@
+From 526641ceeca12fbaa878401f8e65d17f240a9ae5 Mon Sep 17 00:00:00 2001
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue, 11 Jun 2019 10:50:01 +0300
+Subject: [PATCH] Only permit one thread at a time in addFileToTag()
+
+When creating packages in parallel, more than one thread can call
+this at once. As it's modifying global macro state to update file
+name and line number, things will get garbled if we permit more than
+one thread.
+
+While this is necessary for the above reason, and should fix #742,
+it shouldn't crash even without this so there's probably something
+else wrong too.
+
+Closes: #742
+---
+ build/pack.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/build/pack.c b/build/pack.c
+index 447e3ec94..ab72750be 100644
+--- a/build/pack.c
++++ b/build/pack.c
+@@ -113,6 +113,8 @@ static rpmRC addFileToTag(rpmSpec spec, const char * file,
+     if (file == NULL)
+ 	return RPMRC_OK;
+ 
++    #pragma omp critical
++    {
+     fn = rpmGetPath("%{_builddir}/%{?buildsubdir:%{buildsubdir}/}", file, NULL);
+ 
+     f = fopen(fn, "r");
+@@ -151,6 +153,7 @@ exit:
+     }
+     free(fn);
+     freeStringBuf(sb);
++    } /* omp critical */
+ 
+     return rc;
+ }
+-- 
+2.22.0
+

diff --git a/rpm.spec b/rpm.spec
index 519cbee..bb7a4a5 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -21,7 +21,7 @@
 
 %global rpmver 4.14.90
 %global snapver git14653
-%global rel 10
+%global rel 11
 
 %global srcver %{version}%{?snapver:-%{snapver}}
 %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -50,7 +50,8 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch
 # https://github.com/rpm-software-management/rpm/pull/473
 Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
 # https://github.com/rpm-software-management/rpm/issues/742
-Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch
+#Patch7: 0001-Revert-Run-binary-package-generation-in-parallel-thr.patch
+Patch7: 0001-Only-permit-one-thread-at-a-time-in-addFileToTag.patch
 
 # Patches already upstream:
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:32 [rpms/rpm] pmatilai-v6: Try fix for omp crash Igor Gnatenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox