SQM showing error in 19.07.0-rc2

Router: TP-Link TL-WR841N/ND v8 4MB ROM with 32 MB RAM
Firmware Version: OpenWrt 19.07.0-rc2
Kernel Version: 4.14.156

Latest OpenWrt 19.07.0-rc2 released version SQM shows me following error when it starts:

root@OpenWrt:~# /etc/init.d/sqm restart
SQM: Stopping SQM on eth1.1
SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev eth1.1 ingress
SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4eth1.1 root
SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: Stopping SQM on pppoe-wan
SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev pppoe-wan ingress
SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: Invalid argument
SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /usr/sbin/tc qdisc del dev ifb4pppoe-wan root
SQM: ERROR: cmd_wrapper: tc: LAST ERROR: RTNETLINK answers: No such file or directory
SQM: Starting SQM script: layer_cake.qos on pppoe-wan, in: 0 Kbps, out: 4900 Kbps
SQM: Using generic sqm_start_default function.
SQM: layer_cake.qos was started on pppoe-wan successfully
SQM: Starting SQM script: layer_cake.qos on eth1.1, in: 0 Kbps, out: 9800 Kbps
SQM: Using generic sqm_start_default function.
SQM: layer_cake.qos was started on eth1.1 successfully

SQM file:

config queue 'eth1'
	option download '0'
	option debug_logging '0'
	option verbosity '5'
	option qdisc 'cake'
	option script 'layer_cake.qos'
	option qdisc_advanced '1'
	option ingress_ecn 'NOECN'
	option egress_ecn 'NOECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'diffserv8 nat dual-dsthost'
	option linklayer 'ethernet'
	option interface 'pppoe-wan'
	option upload '4900'
	option enabled '1'
	option overhead '30'
	option eqdisc_opts 'diffserv8 nat dual-srchost ack-filter'
	option squash_ingress '1'
	option squash_dscp '0'

config queue
	option debug_logging '0'
	option verbosity '5'
	option download '0'
	option qdisc 'cake'
	option script 'layer_cake.qos'
	option qdisc_advanced '1'
	option ingress_ecn 'NOECN'
	option egress_ecn 'ECN'
	option qdisc_really_really_advanced '1'
	option iqdisc_opts 'diffserv8 nat dual-srchost'
	option linklayer 'ethernet'
	option upload '9800'
	option enabled '1'
	option interface 'eth1.1'
	option overhead '30'
	option eqdisc_opts 'diffserv8 nat dual-dsthost ingress'
	option squash_ingress '1'
	option squash_dscp '0'

tc -s qdisc

qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 619152367 bytes 2722427 pkt (dropped 0, overlimits 0 requeues 4)
 backlog 0b 0p requeues 4
  maxpacket 1488 drop_overlimit 0 new_flow_count 23 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
 Sent 1424083915 bytes 2370001 pkt (dropped 0, overlimits 0 requeues 3)
 backlog 0b 0p requeues 3
  maxpacket 1494 drop_overlimit 0 new_flow_count 10 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc cake 8049: dev eth1.1 root refcnt 2 bandwidth 9800Kbit diffserv8 dual-dsthost nat nowash ingress no-ack-filter split-gso rtt 100.0ms noatm overhead 30
 Sent 16922016 bytes 18690 pkt (dropped 1481, overlimits 24533 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 119040b of 4Mb
 capacity estimate: 9800Kbit
 min/max network layer size:           40 /    1480
 min/max overhead-adjusted size:       70 /    1510
 average network hdr offset:           14

                  Tin 0        Tin 1        Tin 2        Tin 3        Tin 4        Tin 5        Tin 6        Tin 7
  thresh       9800Kbit     8575Kbit     7503Kbit     6565Kbit     5744Kbit     5026Kbit     4398Kbit     3848Kbit
  target          5.0ms        5.0ms        5.0ms        5.0ms        5.0ms        5.0ms        5.0ms        5.0ms
  interval      100.0ms      100.0ms      100.0ms      100.0ms      100.0ms      100.0ms      100.0ms      100.0ms
  pk_delay        177us          0us          7us        4.6ms       12.3ms          0us         63us        1.9ms
  av_delay         25us          0us          0us        465us        2.2ms          0us          3us        370us
  sp_delay         19us          0us          0us         28us         27us          0us          3us        125us
  backlog            0b           0b           0b           0b           0b           0b           0b           0b
  pkts            16629            0            1         3118          203            0           24          196
  bytes        16971910            0         1392      1803066       182478            0         7402        94280
  way_inds            0            0            0            0            0            0            0            0
  way_miss            8            0            1           53            6            0           24            2
  way_cols            0            0            0            0            0            0            0            0
  drops            1402            0            0           78            1            0            0            0
  marks               0            0            0            0            0            0            0            0
  ack_drop            0            0            0            0            0            0            0            0
  sp_flows            0            0            1            0            0            0            1            0
  bk_flows            0            0            0            1            0            0            0            0
  un_flows            0            0            0            0            0            0            0            0
  max_len          1444            0         1392         1494         1392            0          519          524
  quantum           300          300          300          300          300          300          300          300

qdisc cake 8046: dev pppoe-wan root refcnt 2 bandwidth 4900Kbit diffserv8 dual-srchost nat nowash ack-filter split-gso rtt 100.0ms noatm overhead 30
 Sent 9727561 bytes 18419 pkt (dropped 754, overlimits 13959 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 93Kb of 4Mb
 capacity estimate: 4900Kbit
 min/max network layer size:           40 /    1480
 min/max overhead-adjusted size:       70 /    1510
 average network hdr offset:            0

                  Tin 0        Tin 1        Tin 2        Tin 3        Tin 4        Tin 5        Tin 6        Tin 7
  thresh       4900Kbit     4287Kbit     3751Kbit     3282Kbit     2872Kbit     2513Kbit     2199Kbit     1924Kbit
  target          5.0ms        5.0ms        5.0ms        5.5ms        6.3ms        7.2ms        8.2ms        9.4ms
  interval      100.0ms      100.0ms      100.0ms      100.5ms      101.3ms      102.2ms      103.2ms      104.4ms
  pk_delay       16.3ms          0us        1.6ms        5.8ms          0us          0us        222us          0us
  av_delay        9.3ms          0us         37us        4.0ms          0us          0us          7us          0us
  sp_delay         20us          0us         36us         45us          0us          0us          7us          0us
  backlog            0b           0b           0b           0b           0b           0b           0b           0b
  pkts            16114            0           16         3017            0            0           26            0
  bytes         9259518            0        17832      1559475            0            0         2052            0
  way_inds            0            0            0            0            0            0            0            0
  way_miss            8            0            5           47            0            0           26            0
  way_cols            0            0            0            0            0            0            0            0
  drops             688            0            0           63            0            0            0            0
  marks               0            0            0            0            0            0            0            0
  ack_drop            0            0            0            3            0            0            0            0
  sp_flows            4            0            0            1            0            0            1            0
  bk_flows            0            0            0            1            0            0            0            0
  un_flows            0            0            0            0            0            0            0            0
  max_len          1480            0         1378         1480            0            0          106            0
  quantum           300          300          300          300          300          300          300          300

In output it shows cake works. The error only shows when I input '0' in ingress field (to selectively disable ingress shaping on both SQM instances).
In previous OpenWrt builds SQM wasn't showing any error. Is this a bug? Any idea?

This means that you PPPoE-Link disappeared, and SQM when trying to tear it down (as hotplug triggered a /etc/init.d/sqm stop) runs into an error because that interface it tries to tear down does not exist anymore. For transient interfaces like PPP-interfaces that unfortunately is to be expected, for other interface types however that is a serious condition worth reporting.
SQM's error reporting has had a serious overhaul between versions and became more verbose. Let me mull about how to deal with this arguable false-positive error message.

2 Likes

Thanks for quick reply! :smiley: and sure that means it's safe to avoid this message right? Although core cake is working in the background.

Ah, crap, just noted this, the Error is still benign for you, and has the same root cause, but I need to fix a different part (in addition to the other disappearing interface case).

1 Like

Ah it's okay no rush :stuck_out_tongue:
Do you think I should revert back to 18.06.5 stable version? Or should I just ignore the error and good to go?

Just ignore the error output, it is both true and irrelevant at the same time. If no shaper is instantiated on ingress we should not bother to tear down the ifb we never set up in the first place. But before the logging changes sqm simply had silenced these tear down calls completely. When changing to the new mode I changed that to be verbose instead of silent. In retrospect maybe we should just silence it again, as so far it has only cought false positives.

4 Likes

Exactly, that will stop people (like me) from panicking at least.