Hi,
Below are my suggestions to the error.
Firstly As the size of RAM 16GB, which is not recommended to the Yocto image build. However, you can try to reduce concurrency and ease memory in con/local.conf
BB_NUMBER_THREADS = "N"
PARALLEL_MAKE = "-j N"
More details, you can refer to here
Then can check if stale lock files in build directory if so, then remove and restart the build.
Regards
Harvey