SQM does not always detect cake as available qdisc at boot

I have lately noticed that SQM does not always properly recognize cake at startup. The list of available qdiscs in LuCI contains then only fq_codel, but no trace of cake. Manually running /usr/lib/sqm/update-available-qdiscs brings cake to the qdisc list.

Note the time difference below. fq_codel detected at boot, cake later on manual run:

root@router1:~# /usr/lib/sqm/update-available-qdiscs

root@router1:~# ls -l /tmp/run/sqm/available_qdiscs/
-rw-r--r--    1 root     root             0 May 26 20:38 cake
-rw-r--r--    1 root     root             0 May 26 19:10 fq_codel

I have noticed this several times after the reboot after the flashing of new master firmware into my ipq806x/R7800. (I am usually using simple/fq_codel, but I have lately used also cake. So it is hard to say if this is really new, or already something old.)

I suspect that there is some race condition or similar in the SQM startup process, so that it misses detecting cake.

I haven't tried to debug it further, but thought to mention it case somebody else runs into that. Could be that a small delay in the detection script would help, or something similar.

Filed an issue: https://github.com/tohojo/sqm-scripts/issues/122

@ldir @moeller0 @tohojo

2 Likes