openwrt / openwrt/packages

sqm-scripts: Stopping/Starting 100+ times a day

Open
#22,996 20 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @tohojo
Environment: aarch64_generic, FriendlyElec NanoPi R2S (rockchip/armv8), OpenWrt 23.05.2

Description:
SQM is stopping/starting 100+ times a day with these messages in the log:

Wed Dec 27 19:41:10 2023 user.notice SQM: Stopping SQM on eth0.34
Wed Dec 27 19:41:10 2023 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /sbin/tc qdisc del dev eth0.34 ingress
Wed Dec 27 19:41:10 2023 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Error: Invalid handle.
Wed Dec 27 19:41:10 2023 user.notice SQM: ERROR: cmd_wrapper: tc: FAILURE (2): /sbin/tc qdisc del dev eth0.34 root
Wed Dec 27 19:41:10 2023 user.notice SQM: ERROR: cmd_wrapper: tc: LAST ERROR: Error: Cannot delete qdisc with handle of zero.
Wed Dec 27 19:41:10 2023 user.notice SQM: Starting SQM script: piece_of_cake.qos on eth0.34, in: 85000 Kbps, out: 85000 Kbps

I can't find anything useful around these entries in the log. My WAN DHCP renews every 30 minutes but does not match up with these SQM restarts.

My question/report is actually 2-fold:

  1. Why does this happen about every 16-17 minutes, but also sometimes after only 2 minutes or 5...
  2. What about those ERROR messages?

This is my config:

root@nanort:~# cat /etc/config/sqm
config queue 'eth0'
        option enabled '1'
        option interface 'eth0.34'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'
        option debug_logging '0'
        option verbosity '5'
#       option download '68408' # 85% of 80.48 Mbps
#       option upload '73840'   # 85% of 86.87 Mbps
#       option download '72432' # 90% of 80.48 Mbps
#       option upload '78183'   # 90% of 86.87 Mbps
#       option download '76456' # 95% of 80.48 Mbps
#       option upload '82527'   # 95% of 86.87 Mbps
        option download '85000'
        option upload '85000'
        option linklayer 'ethernet'
        option overhead '44'

Please let me know what else I can supply or troubleshoot.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported /etc/config/sqm configuration, the SQM log entries, and the /sbin/tc commands shown in the report. Trace what triggers the repeated stop/start cycle and verify why the qdisc deletion commands return these errors; done means identifying the trigger and explaining whether the messages indicate a real failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.