IrineSistiana / mosdns

一个 DNS 转发器
GNU General Public License v3.0
3k stars 340 forks source link

[Bug] 群晖DSM 7.2 ( Linux 3.10)上运行报错ERROR udp get dst address from oob #750

Open tyycssy007 opened 1 year ago

tyycssy007 commented 1 year ago

在提交之前,请确认

mosdns 版本

v5.2.1以及v5.2.1以上版本

操作系统

DSM 7.2 ( Linux 3.10.108 #64570 SMP Fri Jul 14 )

Bug 描述和复现步骤

自8月31日commit 后的版本,在群晖(LInux内核3.10)上运行会报错 ERROR udp get dst address from oob {error control msg does not have dst address}",并且CPU占用率较高。

使用的配置文件

自8月31日[commit](https://github.com/IrineSistiana/mosdns/commit/98701bdf59c18a6482c9b12bbaf056f3276a84c5)
后的版本,在群晖(LInux内核3.10)上运行会报错
`ERROR udp get dst address from oob {error  control msg does not have dst address}"`,并且CPU占用率较高。
使用的配置文件:

log:
    file: ""
    level: debug
plugins:

  - tag: try_cn
    type: forward
    args:
      concurrent: 3
      upstreams:
        - addr: "udp://223.5.5.5"
        - addr: "udp://114.114.114.114"
        - addr: "udp://119.29.29.29"
  - tag: main_sequence
    type: sequence
    args:
        - exec: $try_cn
        - matches: has_wanted_ans
          exec: accept

  - tag: udp_server53
    type: udp_server
    args:
      entry: main_sequence
      listen: :53
  - tag: "tcp_server53"
    type: "tcp_server"
    args:
      entry: main_sequence
      listen: :53
      idle_timeout: 5

mosdns 的 log 记录

root@Synology716:~#  /volume1/docker/mosdns start -c /volume1/docker/test.yaml
2023-11-06T20:00:30.872+0800    INFO    main config loaded      {"file": "/volume1/docker/test.yaml"}
2023-11-06T20:00:30.874+0800    INFO    loading plugin  {"tag": "try_cn", "type": "forward"}
2023-11-06T20:00:30.874+0800    INFO    loading plugin  {"tag": "main_sequence", "type": "sequence"}
2023-11-06T20:00:30.874+0800    INFO    loading plugin  {"tag": "udp_server53", "type": "udp_server"}
2023-11-06T20:00:30.874+0800    INFO    udp_server53    udp server started      {"addr": "[::]:53"}
2023-11-06T20:00:30.874+0800    INFO    loading plugin  {"tag": "tcp_server53", "type": "tcp_server"}
2023-11-06T20:00:30.875+0800    INFO    tcp_server53    tcp server started      {"addr": "[::]:53", "tls": false}
2023-11-06T20:00:30.875+0800    INFO    all plugins are loaded
2023-11-06T20:01:22.000+0800    ERROR   udp_server53    failed to get dst address from oob      {"error": "control msg does not have dst address"}
2023-11-06T20:01:22.012+0800    ERROR   udp_server53    failed to get dst address from oob      {"error": "control msg does not have dst address"}
2023-11-06T20:01:22.063+0800    ERROR   udp_server53    failed to get dst address from oob      {"error": "control msg does not have dst address"}
^C2023-11-06T20:01:37.111+0800  WARN    signal received {"signal": "interrupt"}
2023-11-06T20:01:37.111+0800    INFO    starting shutdown sequences
2023-11-06T20:01:37.111+0800    INFO    closing plugin  {"tag": "try_cn"}
2023-11-06T20:01:37.112+0800    INFO    closing plugin  {"tag": "main_sequence"}
2023-11-06T20:01:37.112+0800    INFO    closing plugin  {"tag": "udp_server53"}
2023-11-06T20:01:37.112+0800    WARN    udp_server53    read err        {"error": "read udp [::]:53: use of closed network connection"}
2023-11-06T20:01:37.112+0800    INFO    closing plugin  {"tag": "tcp_server53"}
2023-11-06T20:01:37.112+0800    INFO    all plugins were closed
IrineSistiana commented 1 year ago

control msg does not have dst address

这是内核的 bug 。

自8月31日commit

这个 commit 只是把 这个 bug log 下来了。

解决方法,不要泛监听。

youfly commented 4 months ago

所以真正的解决方法是啥?这个日志量巨大,真很糟心。