Subject: bug#30644: Cuirass runs out of build users

From: [email-masked] (Ludovic Courtès)
Date: Sun, 11 Mar 2018 22:43:48 +0100

Hi,

Danny Milosavljevic <[email-masked]> skribis:

> On Thu, 08 Mar 2018 13:01:01 +0100
> [email-masked] (Ludovic Courtès) wrote:
>
>> So what’s your take on this?
>
> sqlite has a sqlite-unlock-notify.  We should wrap it and use it when we get the
> "locked" error code.
>
> We should also enable extended error codes https://sqlite.org/c3ref/extended_result_codes.html .
>
> See also https://sqlite.org/unlock_notify.html for a blocking version of _step (to the right).

Interesting.

> Do we want cuirass to block until the lock is available?

The POSIX thread itself should not block.  Rather the fiber should yield
to other fibers.

So we could do the blocking-step within ‘non-blocking’ block as defined
in (cuirass utils), though ‘non-blocking’ as currently implemented is a
bit expensive.

Or we could simply poll: catch those exceptions and try again later.  If
this is rare enough, as seems to be the case, that might be an
acceptable approach.

Thoughts?

Ludo’.