#2856 kojira: skip unlocking of child locks
Merged a year ago by tkopecek. Opened a year ago by tkopecek.
tkopecek/koji issue2851b  into  master

file modified
+11 -2
@@ -309,10 +309,19 @@ 



      def release_locks(self):

+         # Only parent process should have locked locks in 3.9+, child ones will

+         # be reinitilized to free state

+         # In older pythons, state could be random (and no module_lock)

          if self.module_lock:

-             logging._releaseLock()

+             try:

+                 logging._releaseLock()

+             except RuntimeError:

+                 pass

          for lock in self.locks:

-             lock.release()

+             try:

+                 lock.release()

+             except RuntimeError:

+                 pass



  class RepoManager(object):

verified that this change fixes error when applied to the reproducer script from #2851, though I haven't tested with kojira itself.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

a year ago

I can confirm this fixes the issue in my private Koji instance and rmtree jobs are being completed successfully.

Metadata Update from @mfilip:
- Pull-request tagged with: testing-done

a year ago

Commit 98f81d6 fixes this pull-request

Pull-Request has been merged by tkopecek

a year ago