Deadlock in new Tpool implementation
The new Tpool uses as many task queues as worker threads. If a worker thread finds nothing to do, it will wait for a task to arrive at its own task queue.
Currently it is observed that sometimes all but one worker thread are waiting on their input queues and the single working thread spawns a child task but puts it into the same queue as the current task. And if the current task then waits for the child task there is a deadlock, because the child task will only be executed after the current task is finished!
This was observed at the UE by executing this NTN scenario:
gNB:
sudo ./ran_build/build/nr-softmodem -O ../ci-scripts/conf_files/gnb.sa.band66.ntn.25prb.rfsim.conf --rfsim --rfsimulator.prop_delay 238.74
UE:
sudo ./ran_build/build/nr-uesoftmodem --band 66 -C 2152680000 --CO -400000000 -r 25 --numerology 0 --ssb 48 --rfsim --rfsimulator.prop_delay 238.74 -O ../targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf
I'd propose to go back to a single, but lock-free queue.