pkgqueue_get_next: Ensure returning empty is an empty ready-to-build queue.
Note the queue may have waiting-for-dependency items but it should
not have anything in the ready-to-build queue.
Similar to the comments in pkgqueue_empty() we need to ensure
no blank jobs are returned. It is possible for a race to happen
where pkgqueue_get_next() returns a blank job, build_queue()
gets it and checks pkgqueue_empty() and sees it is not empty,
loops around and runs the sanity check due to idle builders
and calls crashed_build() on an item that just got balanced
and was temporarily missing in the find(1) call which itself
is not an atomic/locked view of the queue.
This became apparent after making pkgqueue_balance_pool() into a
separate worker process. The first job in the queue would sometimes
get moved while the first pkgqueue_get_next() was called and
immediately get "stuck_in_queue".
Revert INJOB changes.
Jobs within jobs work fine. It's just that they do not _inherit_ the
parent process jobs.
Revert "prefixers: Supported nested jobs (need to use pids here)"
This reverts commit 6d6d888f0f796e974517f31984ebd6f89a721308.
Revert "kill_job: Assert not killing a nested job"
This reverts commit 1a1a34c3750688d2df42dff7ab769dbef21fd3c4.
bulk tests: rework some logclean and error handling.
- Unhide output
- Only consider lock acquisition failure OK
- Don't logclean while acquiring test contexts
- While here avoid bootstrap code with test context lookup
- logclean: Ignore potential harmless race in find_broken_latest_per_pkg_links