This post has 2 answers, both had hangs and required two different solutions.
TL;DR - When bitbake tdx-reference-multimedia-image
, it hangs around 5000 tasks, due to deadlocking. One solution is based on the server (Ubuntu) and the other solution is based on local laptop (Windows 11, Ubuntu via WSL).
SERVER - Qt KEEPS HANGING AND GETS DEADLOCKED
As @Mowlwurf mentioned, problem arises when there are too much parallel threads/tasks with too few RAM. When the build is running, if the RAM usage gets too high, the build process gets in a deadlock situation, so we need to reduce the RAM usage by reducing the count of used cores. This solved the problem by checking how many cores the server had and I kept decreasing until it stopped deadlocking. Build completed!
For others that want to know…
In the server, I used nproc
to know my count, which was 36. In the build/conf/local.conf
file, put
BB_NUMBER_THREADS=“24”
PARALLEL_MAKE=“-j 15”
Yocto documents recommended that PARALLEL_MAKE
not to be more than 20, and I tried with 20 but deadlocked too, but 15 worked. (see Post 9)
Then I go ahead and clean everything, removed everything in build folder EXCEPT conf folder.
Then it works.
LOCAL WSL LAPTOP - TAINTED URL FROM FORCED RUN
Similar problem as the server, except in this case, we adjust the WSL config file first (see first post by Markus). I believe because it hung/got deadlocked and I had to force closed the bitbake instruction, it came up with issues. This caused the URL of one recipe to be was tainted, so we -c cleanall
and removed some files/folders (see Post 6 by Markus for instructions).
This now works as well. This thread has been solved! All credit goes to @Mowlwurf.
I will use the first reply as the solution because that’s truly the answer to the question.