Fairly recently, these jobs have all been failing with the following error:
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
Exited with code 100
I am about to update that job to start with while sudo fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do sleep 1; done or something similar, but this behavior is strange enough I figured it was worth a post here. It seems that the instance fires up and then, what, runs apt update on its own? Does it upgrade things as well? Either way, it feels like the commands shouldn’t execute until the instance is completely setup, and having apt still running implies that the instance is not completely setup. Thoughts?
Search for this error on the forum - this has come up before here. I believe I created a machine instance to replicate the issue, but at that time failed to do so.
I think I would use a loop and sleep also, good idea.
Indeed, I see some posts, but no solutions (just more workarounds). The general feeling I get from those posts is that the machine executor doesn’t get much love, which is unfortunate. I’ll add the sleep workaround, but I don’t consider that a solution. I think CircleCI needs some image tweaks for their machine executor.
Hi Kyle. I think we have an internal bug report on this, I know support has done some research on it before. Let me go confirm that and get one created if not.
This will be fixed as part of the new image which also updates linux. I don’t have an exact timeline for this, I recommend watching https://discuss.circleci.com/c/announcements