vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
17.65k stars 3.19k forks source link

[Bug] v0.46.006-beta无法启动 #3847

Closed Aethersailor closed 7 months ago

Aethersailor commented 7 months ago

Verify Steps

OpenClash Version

v0.46.006-beta

Bug on Environment

Immortalwrt

OpenWrt Version

SNAPSHOT

Bug on Platform

Linux-amd64(x86-64)

Describe the Bug

2024-04-13 13:32:22 错误:无法获取 General 部分的转发端口设置, OpenClash 使用原始配置文件启动失败 2024-04-13 13:32:22 错误:无法获取 DNS 部分的运行模式设置, OpenClash 使用原始配置文件启动失败 2024-04-13 13:32:22 错误:无法获取 DNS 部分的监听端口设置, OpenClash 使用原始配置文件启动失败 2024-04-13 13:32:22 错误:OpenClash 启动失败,尝试使用原始配置文件启动...

OpenClash在全新编译的6.6内核系统上无法启动,已经确定同样的配置曾经是可以启动的 这和系统内核的版本太高有没有关系?openclash的内核日志中有报错信息

To Reproduce

设置Openclash,更新配置>启动

OpenClash Log

插件日志:
2024-04-13 13:32:28 第六步:删除 OpenClash 残留文件...
2024-04-13 13:32:24 第五步: 重启 Dnsmasq 程序...
2024-04-13 13:32:24 第四步: 关闭 Clash 主程序...
2024-04-13 13:32:24 第三步: 关闭 OpenClash 守护程序...
2024-04-13 13:32:24 第二步: 删除 OpenClash 防火墙规则...
2024-04-13 13:32:23 第一步: 备份当前策略组状态...
2024-04-13 13:32:23 OpenClash 开始关闭...
2024-04-13 13:32:22 错误:无法获取 General 部分的转发端口设置, OpenClash 使用原始配置文件启动失败
2024-04-13 13:32:22 错误:无法获取 DNS 部分的运行模式设置, OpenClash 使用原始配置文件启动失败
2024-04-13 13:32:22 错误:无法获取 DNS 部分的监听端口设置, OpenClash 使用原始配置文件启动失败
2024-04-13 13:32:22 错误:OpenClash 启动失败,尝试使用原始配置文件启动...
2024-04-13 13:32:22 第六步: 等待主程序下载外部文件...
2024-04-13 13:32:17 第五步: 检查内核启动状态...
2024-04-13 13:32:16 配置文件【/etc/openclash/SSRDOG.yaml】测试成功...
2024-04-13 13:32:14 启动前调用内核测试配置文件...
2024-04-13 13:32:14 提示:检测到配置了 Meta 内核专属功能,调用 Meta 内核启动...
2024-04-13 13:32:14 第四步: 启动主程序...
2024-04-13 13:32:13 提示:开始运行自定义覆写脚本...
2024-04-13 13:32:10 第三步: 修改配置文件...
2024-04-13 13:32:10 第二步: 组件运行前检查...
2024-04-13 13:32:10 第一步: 获取配置...
2024-04-13 13:32:10 OpenClash 开始启动...
2024-04-13 13:32:09 第六步:删除 OpenClash 残留文件...
2024-04-13 13:32:06 第五步: 重启 Dnsmasq 程序...
2024-04-13 13:32:06 第四步: 关闭 Clash 主程序...
2024-04-13 13:32:06 第三步: 关闭 OpenClash 守护程序...
2024-04-13 13:32:06 第二步: 删除 OpenClash 防火墙规则...
2024-04-13 13:32:06 第一步: 备份当前策略组状态...
2024-04-13 13:32:06 OpenClash 开始关闭...
2024-04-13 13:32:06 OpenClash 重新启动中...

内核日志
github.com/metacubex/mihomo/main.go:109 +0x615
main.main()
    github.com/metacubex/mihomo/hub/hub.go:50 +0x245
github.com/metacubex/mihomo/hub.Parse({0x0, 0x0, 0x7fffea84ff9d?})
    github.com/metacubex/mihomo/hub/executor/executor.go:103 +0x295
github.com/metacubex/mihomo/hub/executor.ApplyConfig(0xc0009e0000, 0x1)
    github.com/metacubex/mihomo/hub/executor/executor.go:356 +0x9e
github.com/metacubex/mihomo/hub/executor.updateTun(0xc000296508)
    github.com/metacubex/mihomo/listener/listener.go:534 +0x1af
github.com/metacubex/mihomo/listener.ReCreateTun({0x1, {0xc00041a3d0, 0x4}, 0x1, {0xc0009da250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:256 +0x1a8d
github.com/metacubex/mihomo/listener/sing_tun.New({0x1, {0xc00041a3d0, 0x4}, 0x1, {0xc0009da250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/component/resolver/system.go:14 +0xbb
github.com/metacubex/mihomo/component/resolver.AddSystemDnsBlacklist({0xc006796020?, 0x4?, 0xc0000510a0?})
goroutine 1 [running]:
panic: assignment to entry in nil map
2024-04-13 13:32:18 level=info msg="Mixed(http+socks) proxy listening at: [::]:7893"
2024-04-13 13:32:18 level=info msg="TProxy server listening at: [::]:7895"
2024-04-13 13:32:18 level=info msg="Redirect proxy listening at: [::]:7892"
2024-04-13 13:32:18 level=info msg="SOCKS proxy listening at: [::]:7891"
2024-04-13 13:32:18 level=info msg="HTTP proxy listening at: [::]:7890"
2024-04-13 13:32:18 level=info msg="DNS server listening at: [::]:7874"
2024-04-13 13:32:18 level=info msg="Use tcp concurrent"
2024-04-13 13:32:18 level=info msg="Sniffer is loaded and working"
2024-04-13 13:32:18 level=info msg="RESTful API listening at: [::]:9090"
2024-04-13 13:32:18 level=info msg="Initial configuration complete, total time: 657ms"
2024-04-13 13:32:18 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:32:18 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:32:17 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:32:17 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:32:17 level=info msg="Start initial configuration in progress"
2024-04-13 13:32:16 level=info msg="Initial configuration complete, total time: 769ms"
2024-04-13 13:32:16 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:32:16 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:32:15 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:32:15 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:32:15 level=info msg="Start initial configuration in progress"
2024-04-13 13:32:06 level=error msg="yaml: unmarshal errors:\n  line 1: cannot unmarshal !!str `<html> ...` into config.RawConfig"
    github.com/metacubex/mihomo/main.go:109 +0x615
main.main()
    github.com/metacubex/mihomo/hub/hub.go:50 +0x245
github.com/metacubex/mihomo/hub.Parse({0x0, 0x0, 0x7ffdf0584f9d?})
    github.com/metacubex/mihomo/hub/executor/executor.go:103 +0x295
github.com/metacubex/mihomo/hub/executor.ApplyConfig(0xc000a10000, 0x1)
    github.com/metacubex/mihomo/hub/executor/executor.go:356 +0x9e
github.com/metacubex/mihomo/hub/executor.updateTun(0xc000296508)
    github.com/metacubex/mihomo/listener/listener.go:534 +0x1af
github.com/metacubex/mihomo/listener.ReCreateTun({0x1, {0xc00041a3b0, 0x4}, 0x1, {0xc000a0a250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:256 +0x1a8d
github.com/metacubex/mihomo/listener/sing_tun.New({0x1, {0xc00041a3b0, 0x4}, 0x1, {0xc000a0a250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/component/resolver/system.go:14 +0xbb
github.com/metacubex/mihomo/component/resolver.AddSystemDnsBlacklist({0xc006673e20?, 0x4?, 0xc000abe840?})
goroutine 1 [running]:
panic: assignment to entry in nil map
2024-04-13 13:31:31 level=info msg="Mixed(http+socks) proxy listening at: [::]:7893"
2024-04-13 13:31:31 level=info msg="TProxy server listening at: [::]:7895"
2024-04-13 13:31:31 level=info msg="Redirect proxy listening at: [::]:7892"
2024-04-13 13:31:31 level=info msg="SOCKS proxy listening at: [::]:7891"
2024-04-13 13:31:31 level=info msg="HTTP proxy listening at: [::]:7890"
2024-04-13 13:31:31 level=info msg="DNS server listening at: [::]:7874"
2024-04-13 13:31:31 level=info msg="Use tcp concurrent"
2024-04-13 13:31:31 level=info msg="Sniffer is loaded and working"
2024-04-13 13:31:31 level=info msg="RESTful API listening at: [::]:9090"
2024-04-13 13:31:31 level=info msg="Initial configuration complete, total time: 651ms"
2024-04-13 13:31:31 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:31:31 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:31:31 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:31:31 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:31:31 level=info msg="Start initial configuration in progress"
2024-04-13 13:31:29 level=info msg="Initial configuration complete, total time: 805ms"
2024-04-13 13:31:29 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:31:29 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:31:28 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:31:28 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:31:28 level=info msg="Start initial configuration in progress"
2024-04-13 13:31:18 level=info msg="Initial configuration complete, total time: 26ms"
2024-04-13 13:31:18 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:31:18 level=info msg="Geodata Loader mode: memconservative"
2024-04-13 13:31:18 level=info msg="Start initial configuration in progress"
    github.com/metacubex/mihomo/main.go:109 +0x615
main.main()
    github.com/metacubex/mihomo/hub/hub.go:50 +0x245
github.com/metacubex/mihomo/hub.Parse({0x0, 0x0, 0x7ffe05fc0f9d?})
    github.com/metacubex/mihomo/hub/executor/executor.go:103 +0x295
github.com/metacubex/mihomo/hub/executor.ApplyConfig(0xc000a30000, 0x1)
    github.com/metacubex/mihomo/hub/executor/executor.go:356 +0x9e
github.com/metacubex/mihomo/hub/executor.updateTun(0xc000294508)
    github.com/metacubex/mihomo/listener/listener.go:534 +0x1af
github.com/metacubex/mihomo/listener.ReCreateTun({0x1, {0xc0004183d0, 0x4}, 0x1, {0xc000a2a250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:256 +0x1a8d
github.com/metacubex/mihomo/listener/sing_tun.New({0x1, {0xc0004183d0, 0x4}, 0x1, {0xc000a2a250, 0x1, 0x1}, 0x0, 0x0, {0x2420000, ...}, ...}, ...)
    github.com/metacubex/mihomo/component/resolver/system.go:14 +0xbb
github.com/metacubex/mihomo/component/resolver.AddSystemDnsBlacklist({0xc000ae0740?, 0x4?, 0xc0002ce800?})
goroutine 1 [running]:
panic: assignment to entry in nil map
2024-04-13 13:30:07 level=info msg="Mixed(http+socks) proxy listening at: [::]:7893"
2024-04-13 13:30:07 level=info msg="TProxy server listening at: [::]:7895"
2024-04-13 13:30:07 level=info msg="Redirect proxy listening at: [::]:7892"
2024-04-13 13:30:07 level=info msg="SOCKS proxy listening at: [::]:7891"
2024-04-13 13:30:07 level=info msg="HTTP proxy listening at: [::]:7890"
2024-04-13 13:30:07 level=info msg="DNS server listening at: [::]:7874"
2024-04-13 13:30:07 level=info msg="Use tcp concurrent"
2024-04-13 13:30:07 level=info msg="Sniffer is loaded and working"
2024-04-13 13:30:07 level=info msg="RESTful API listening at: [::]:9090"
2024-04-13 13:30:07 level=info msg="Initial configuration complete, total time: 643ms"
2024-04-13 13:30:07 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:30:07 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:30:06 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:30:06 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:30:06 level=info msg="Start initial configuration in progress"
2024-04-13 13:30:03 level=info msg="Initial configuration complete, total time: 680ms"
2024-04-13 13:30:03 level=warning msg="Deprecated: Use Sniff instead"
2024-04-13 13:30:03 level=warning msg="[CacheFile] can't open cache file: open /etc/openclash/cache.db: permission denied"
2024-04-13 13:30:03 level=info msg="Start initial GeoIP rule cn => 🎯 全球直连, records: 11220"
2024-04-13 13:30:03 level=info msg="Geosite Matcher implementation: succinct"
2024-04-13 13:30:03 level=info msg="Geodata Loader mode: standard"
2024-04-13 13:30:03 level=info msg="Start initial configuration in progress"

调试日志已作为附件上传

OpenClash Config

No response

Expected Behavior

如以往情况正常启动

Additional Context

OpenClash 调试日志.log

SQ528 commented 7 months ago

没事别更新那么新,我前面从0.03更新到0.05然后一开就断网,然后卸载重装了0.03,看到0.06出来了这次我不为所动了!

RayWangQvQ commented 7 months ago

同样bug,内核更新到alpha-g6f0fe85出现,之前一直是好的

github.com/metacubex/mihomo/main.go:109 +0x580
main.main()
    github.com/metacubex/mihomo/hub/hub.go:50 +0x210
github.com/metacubex/mihomo/hub.Parse({0x0, 0x0, 0x194d150?})
    github.com/metacubex/mihomo/hub/executor/executor.go:103 +0x284
github.com/metacubex/mihomo/hub/executor.ApplyConfig(0x40000ea0c0, 0x1)
    github.com/metacubex/mihomo/hub/executor/executor.go:356 +0x88
github.com/metacubex/mihomo/hub/executor.updateTun(0x40000f6008)
    github.com/metacubex/mihomo/listener/listener.go:534 +0x194
github.com/metacubex/mihomo/listener.ReCreateTun({0x1, {0x40001115f8, 0x4}, 0x1, {0x4000041f10, 0x1, 0x1}, 0x0, 0x0, {0x1ee3920, ...}, ...}, ...)
    github.com/metacubex/mihomo/listener/sing_tun/server.go:256 +0x131c
github.com/metacubex/mihomo/listener/sing_tun.New({0x1, {0x40001115f8, 0x4}, 0x1, {0x4000041f10, 0x1, 0x1}, 0x0, 0x0, {0x1ee3920, ...}, ...}, ...)
    github.com/metacubex/mihomo/component/resolver/system.go:14 +0xf4
github.com/metacubex/mihomo/component/resolver.AddSystemDnsBlacklist({0x40006840a0?, 0x4?, 0x400016adc0?})
goroutine 1 [running]:
panic: assignment to entry in nil map
2024-04-13 20:44:07 level=info msg="Mixed(http+socks) proxy listening at: [::]:7893"
2024-04-13 20:44:07 level=info msg="TProxy server listening at: [::]:7895"
2024-04-13 20:44:07 level=info msg="Redirect proxy listening at: [::]:7892"
2024-04-13 20:44:07 level=info msg="SOCKS proxy listening at: [::]:7891"
2024-04-13 20:44:07 level=info msg="HTTP proxy listening at: [::]:7890"
2024-04-13 20:44:07 level=info msg="DNS server listening at: [::]:7874"
2024-04-13 20:44:07 level=info msg="Sniffer is closed"
2024-04-13 20:44:07 level=info msg="Authentication of local server updated"
2024-04-13 20:44:07 level=info msg="RESTful API listening at: [::]:9090"
2024-04-13 20:44:07 level=info msg="Initial configuration complete, total time: 19236ms"
RayWangQvQ commented 7 months ago

手动回退内核版本到alpha-g16fadd2后恢复正常

root@NX:/etc/openclash/core# ./clash_meta -v
Mihomo Meta alpha-g16fadd2 linux arm64 with go1.22.2 Wed Apr 10 20:12:53 UTC 2024
Use tags: with_gvisor