vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
15.72k stars 2.93k forks source link

[Bug] Mata内核导致启动失败 #3885

Open GuangYu-yu opened 1 month ago

GuangYu-yu commented 1 month ago

Verify Steps

OpenClash Version

v0.46.003-249

Bug on Environment

Other

OpenWrt Version

openwrt-23.05

Bug on Platform

Linux-amd64(x86-64)

Describe the Bug

Meta内核容易启动失败,并且Meta面板进入到规则一栏中就会直接卡死。openclash对多条宽带的适配不太好,节点几乎无法使用,延迟测试也常常超时,只能绑定单一的PPPoE,但是多宽带优势就没了。fakeip模式导致无法使用ping,多条宽带需要使用mwan3插件来负载均衡,没法ping就会判断节点都离线。

To Reproduce

不知道是Mata内核本身,还是meta内核的部分功能,导致启动时容易无法启动。

OpenClash Log

github.com/metacubex/mihomo/main.go:114 +0x615
main.main()
    github.com/metacubex/mihomo/hub/hub.go:50 +0x245
github.com/metacubex/mihomo/hub.Parse({0x0, 0x0, 0x7fffb6779fad?})
    github.com/metacubex/mihomo/hub/executor/executor.go:103 +0x295
github.com/metacubex/mihomo/hub/executor.ApplyConfig(0xc000460000, 0x1)
    github.com/metacubex/mihomo/hub/executor/executor.go:355 +0x87
github.com/metacubex/mihomo/hub/executor.updateTun(0xc0002a8508)
    github.com/metacubex/mihomo/listener/listener.go:534 +0x190
github.com/metacubex/mihomo/listener.ReCreateTun({0x1, {0xc0003a43d0, 0x4}, 0x2, {0xc000456310, 0x1, 0x1}, 0x0, 0x0, {0x23f8e00, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:266 +0x1b8e
github.com/metacubex/mihomo/listener/sing_tun.New({0x1, {0xc0003a43d0, 0x4}, 0x2, {0xc000456310, 0x1, 0x1}, 0x0, 0x0, {0x23f8e00, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:175 +0x29
github.com/metacubex/mihomo/listener/sing_tun.New.func1()
    github.com/metacubex/mihomo/listener/sing_tun/server.go:334 +0xef
github.com/metacubex/mihomo/listener/sing_tun.(*Listener).Close(0xc0000061c0?)
    github.com/sagernet/sing@v0.3.0/common/cond.go:351 +0x15b
github.com/sagernet/sing/common.Close({0xc0000969d8?, 0x23f8e00?, 0x0?})
    github.com/metacubex/sing-tun@v0.2.1-0.20240214100323-23e40bfb9067/stack_mixed.go:264 +0x27
github.com/metacubex/sing-tun.(*Mixed).Close(0xc0007052e0)
    github.com/metacubex/gvisor@v0.0.0-20240214095142-666a73bcf165/pkg/tcpip/link/channel/channel.go:209 +0x2d
github.com/metacubex/gvisor/pkg/tcpip/link/channel.(*Endpoint).Attach(0x0, {0x0, 0x0})
goroutine 1 [running]:
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xf6de6d]
panic: runtime error: invalid memory address or nil pointer dereference
2024-05-12 10:39:39 level=info msg="Mixed(http+socks) proxy listening at: [::]:7893"
2024-05-12 10:39:39 level=info msg="TProxy server listening at: [::]:7895"
2024-05-12 10:39:39 level=info msg="Redirect proxy listening at: [::]:7892"
2024-05-12 10:39:39 level=info msg="SOCKS proxy listening at: [::]:7891"
2024-05-12 10:39:39 level=info msg="HTTP proxy listening at: [::]:7890"
2024-05-12 10:39:39 level=info msg="DNS server listening at: [::]:7874"
2024-05-12 10:39:39 level=info msg="Use tcp concurrent"
2024-05-12 10:39:39 level=info msg="Sniffer is loaded and working"
2024-05-12 10:39:39 level=info msg="Authentication of local server updated"
2024-05-12 10:39:39 level=info msg="RESTful API listening at: [::]:9090"
2024-05-12 10:39:39 level=info msg="Initial configuration complete, total time: 24ms"
2024-05-12 10:39:39 level=warning msg="Deprecated: Use Sniff instead"

2024-05-12 10:39:44 第六步:删除 OpenClash 残留文件...
2024-05-12 10:39:44 第五步: 重启 Dnsmasq 程序...
2024-05-12 10:39:44 第四步: 关闭 Clash 主程序...
2024-05-12 10:39:44 第三步: 关闭 OpenClash 守护程序...
2024-05-12 10:39:44 第二步: 删除 OpenClash 防火墙规则...
2024-05-12 10:39:44 第一步: 备份当前策略组状态...
2024-05-12 10:39:44 OpenClash 开始关闭...
2024-05-12 10:39:43 错误:无法获取 General 部分的转发端口设置, OpenClash 使用原始配置文件启动失败
2024-05-12 10:39:43 错误:无法获取 DNS 部分的运行模式设置, OpenClash 使用原始配置文件启动失败
2024-05-12 10:39:43 错误:无法获取 DNS 部分的监听端口设置, OpenClash 使用原始配置文件启动失败
2024-05-12 10:39:42 错误:OpenClash 启动失败,尝试使用原始配置文件启动...

OpenClash Config

No response

Expected Behavior

Meta内核及其功能正常使用。多宽带能正常使用mwan3负载均衡,能多宽带并发测试延迟,每个节点对应延迟最低的其中一条宽带建立连接。

Additional Context

No response