mbox series

[RFC,0/1] External fix for sporadic schroot race issue

Message ID 20241205155312.2373479-1-amikan@ilbers.de
Headers show
Series External fix for sporadic schroot race issue | expand

Message

Anton Mikanovich Dec. 5, 2024, 3:53 p.m. UTC
After some experimenting with locking inside and outside of schroot and
sbuild tools I've finally found the way how to made almost the same
locking in Isar only without much build speed influence.

The idea is to cover all separate schroot calls with the lock based on
what type of the call it is:
- Session begin and any commands in already present session will use
the lock in shared mode, so multiple executions possible.
- Session end which can remove config files and cause race scenario
will use the lock in exclusive mode, so it will wait for the time no
other schroot instances running.

Luckly we always use schroot with separate session create/end commands
even inside sbuild.
The only thing needed is to put a little script into the location
inserted to PATH.

This patch is not tested yet because issue reproducing is quite tricky.

Anton Mikanovich (1):
  meta: Protect schroot config management

 meta/classes/dpkg.bbclass   |  3 +++
 meta/classes/sbuild.bbclass |  6 ++++++
 scripts/schroot             | 43 +++++++++++++++++++++++++++++++++++++
 3 files changed, 52 insertions(+)
 create mode 100755 scripts/schroot