Skip to content

Commit

Permalink
Don't kill orphans without the exclusive lock
Browse files Browse the repository at this point in the history
Turns out that the very next command 'self.buildroot.delete()' already
does this properly (locking the buildroot first to assure no other mock
process is killed, and then calling killOrphans).

Also, the '--rebuild' action calls 'do_rebuild' with 'commands.clean()'
first - which without asking killed existing background Mock processes:

    $ mock /tmp/tito/mock-4.1.post1-1.git.3565.2f68fb1.fc38.src.rpm
    INFO: mock.py version 4.1.post1 starting (python version = 3.11.4, NVR = mock-4.1.post1-1.git.3565.2f68fb1.fc38)...
    Start(bootstrap): init plugins
    INFO: selinux enabled
    Finish(bootstrap): init plugins
    Start: init plugins
    INFO: selinux enabled
    Finish: init plugins
    INFO: Signal handler active
    Start: run
    INFO: Start(/tmp/tito/mock-4.1.post1-1.git.3565.2f68fb1.fc38.src.rpm)  Config(fedora-38-x86_64)
    Start: clean chroot
    WARNING: Machine 8943e61c7fc54cf1bba7ebfbb9b03c36 still running. Killing...
    ERROR: Exception(/tmp/tito/mock-4.1.post1-1.git.3565.2f68fb1.fc38.src.rpm) Config(fedora-38-x86_64) 0 minutes 0 seconds
    INFO: Results and/or logs in: /var/lib/mock/fedora-38-x86_64/result
    ERROR: Build root is locked by another process.

My bet is that the 0960289 is anyway
the critical piece that will eventually fix all the bugs that we aimed
to fix with bf6f519.

This reverts commit bf6f519.
  • Loading branch information
praiskup committed Jul 24, 2023
1 parent 836509e commit 36b8767
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mock/py/mockbuild/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def clean(self):
if self.backup:
self.backup_results()
self.state.start("clean chroot")
util.orphansKill(self.buildroot.make_chroot_path())
self.buildroot.delete()
self.state.finish("clean chroot")

Expand Down

0 comments on commit 36b8767

Please sign in to comment.