I think the message that nix prints when something is blocking the build could be a bit more descriptive. "waiting for locks or build slots" does not indicate whether there is a resource problem that the user needs to go fix (let alone what the resource problem is), or whether the same build is already underway by another process. Even turning the logging up to vomit doens't yield anything particularly insightful.
Possibly related: it _is_ possible to run multiple Nix instances in parallel as root and get an error (instead of blocking to wait for build slots) after running out of build users.
@ledettwy Any interest in providing a patch, or suggested output at least?
@shlevy Splitting it down the middle seems like a good start. If an output path is locked, does that always mean that it is being built by another process? In that case, I would have a message that looked something like: "waiting for /nix/store/... to be built". If it's an out of resources issue, it should say "waiting for build slots". This would at least remove the ambiguity. Should generate a list of what all the conditions that can cause that message to appear are.
See #1216
See #3577
Most helpful comment
@shlevy Splitting it down the middle seems like a good start. If an output path is locked, does that always mean that it is being built by another process? In that case, I would have a message that looked something like: "waiting for /nix/store/... to be built". If it's an out of resources issue, it should say "waiting for build slots". This would at least remove the ambiguity. Should generate a list of what all the conditions that can cause that message to appear are.