OpenClash icon indicating copy to clipboard operation
OpenClash copied to clipboard

错误:内核状态异常,请查看《内核日志》排查异常原因!

Open tyc2277949421 opened this issue 3 months ago • 24 comments

Verify Steps

  • [x] Tracker 我已经在 Issue Tracker 中找过我要提出的问题
  • [x] Branch 我知道 OpenClash 的 Dev 分支切换开关位于插件设置-版本更新中,或者我会手动下载并安装 Dev 分支的 OpenClash
  • [x] Latest 我已经使用最新 Dev 版本测试过,问题依旧存在
  • [x] Relevant 我知道 OpenClash 与 内核(Core)、控制面板(Dashboard)、在线订阅转换(Subconverter)等项目之间无直接关系,仅相互调用
  • [x] Definite 这确实是 OpenClash 出现的问题
  • [ ] Contributors 我有能力协助 OpenClash 开发并解决此问题
  • [ ] Meaningless 我提交的是无意义的催促更新或修复请求

OpenClash Version

v0.47.006

Bug on Environment

Official OpenWrt

OpenWrt Version

OpenWrt 24.10.2 r28739-d9340319c6

Bug on Platform

Linux-arm64

Describe the Bug

错误:内核状态异常,请查看《内核日志》排查异常原因!

To Reproduce

配置好启动就会复现

OpenClash Log

2025-09-22 13:01:16 OpenClash 关闭成功!
2025-09-22 13:01:16 第六步:删除 OpenClash 残留文件...
2025-09-22 13:01:08 第五步: 重启 Dnsmasq 程序...
2025-09-22 13:01:08 第四步: 关闭 Clash 主程序...
2025-09-22 13:01:08 第三步: 关闭 OpenClash 守护程序...
2025-09-22 13:01:05 第二步: 删除 OpenClash 防火墙规则...
2025-09-22 13:01:05 第一步: 备份当前策略组状态...
2025-09-22 13:01:05 OpenClash 开始关闭...
2025-09-22 13:01:05 错误:内核状态异常,请查看《内核日志》排查异常原因!
2025-09-22 13:01:00 OpenClash 启动成功,请等待服务器上线!
2025-09-22 13:01:00 第七步: 添加计划任务,启动进程守护程序...
2025-09-22 13:01:00 提示:开始添加自定义防火墙规则...
2025-09-22 13:01:00 警告:因为端口范围【9000-9998】存在于防火墙规则设置【NAS-APP】自动绕过后可能造成客户端的正常连接无法到达内核,如有需要,请在插件设置-来源流量访问控制中自行添加!
2025-09-22 13:01:00 提示:正在根据防火墙端口转发和防火墙通信规则添加端口绕过规则...
2025-09-22 13:00:57 提示:检测到 Firewall4,使用 NFTABLE 规则...
2025-09-22 13:00:57 提示:DNS 劫持未开启...
2025-09-22 13:00:57 第六步: 设置防火墙规则...
2025-09-22 13:00:54 第五步: 设置 Dnsmasq 程序...
2025-09-22 13:00:54 第四步: 启动主程序...
2025-09-22 13:00:54 第三步: 快速启动模式,跳过修改配置文件...
2025-09-22 13:00:54 第二步: 组件运行前检查...
2025-09-22 13:00:52 第一步: 获取配置...
2025-09-22 13:00:52 OpenClash 开始启动...

OpenClash Config


Expected Behavior

希望能正常启动

Additional Context

No response

tyc2277949421 avatar Sep 22 '25 13:09 tyc2277949421

同折腾了很久,版本降级到0.46.064就可以

qipeng090 avatar Sep 22 '25 13:09 qipeng090

因为端口范围【9000-9998】存在于防火墙规则设置【NAS-APP】 是不是看一下fw设置端口占用情况?或是在外部控制里将管理页面端口换其它端口号(默认是9090)

yellowsavant avatar Sep 23 '25 00:09 yellowsavant

没有内核日志?

vernesong avatar Sep 23 '25 02:09 vernesong

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

tyc2277949421 avatar Sep 23 '25 07:09 tyc2277949421

内存不足

vernesong avatar Sep 23 '25 10:09 vernesong

确实了 我的内存不足 我只要启动的瞬间关闭后台哪个管理页面 就能正常运行 然后我打开管理页面就会提示核心异常

xiaomajy avatar Sep 23 '25 10:09 xiaomajy

这是通病,解决办法:重启机器

mafangtou avatar Sep 24 '25 00:09 mafangtou

https://github.com/MetaCubeX/mihomo/releases/tag/v1.19.14 内核升级了,解决了一些连接未关闭的BUG,也许内存占用会下降一些。

minisind avatar Sep 25 '25 03:09 minisind

内存不足

最新版本需要多大的内存才能跑起来啊?

qipeng090 avatar Sep 26 '25 04:09 qipeng090

内存小就尽量少用geo规则,或者手动增加swap

vernesong avatar Sep 26 '25 09:09 vernesong

https://forum.openwrt.org/t/openwrt-24-10-3-service-release/240940

升级最新版 24.10.3 固件吧。 这个升级会降低很多系统本身的内存占用,非常好。 我的IPQ6000, 512M,以前用24.10.2 搭配 CLASH,也出现过内存不足,进程多次被杀死的日志。 换成24.10.3 后,内存的占用下降了20%多,再没有出现这种现象了。 另外我还安装了 zram-swap ,可以压缩一部分使用不高的内存。 用CPU时间换取内存空间。

minisind avatar Sep 26 '25 10:09 minisind

我的256mb 已经拿去升级了512了 话说就一个openwrt和opencalss

https://forum.openwrt.org/t/openwrt-24-10-3-service-release/240940

升级最新版 24.10.3 固件吧。 这个升级会降低很多系统本身的内存占用,非常好。 我的IPQ6000, 512M,以前用24.10.2 搭配 CLASH,也出现过内存不足,进程多次被杀死的日志。 换成24.10.3 后,内存的占用下降了20%多,再没有出现这种现象了。 另外我还安装了 zram-swap ,可以压缩一部分使用不高的内存。 用CPU时间换取内存空间。

我的256mb 已经拿去升级了512了 话说就一个openwrt和opencalss 512还不够吗

xiaomajy avatar Sep 26 '25 10:09 xiaomajy

启动瞬间高容易被oom

vernesong avatar Sep 26 '25 11:09 vernesong

三个吃内存的大插件,规则都是保存在内存中吧。 CPU干预非常少,要不无法保证网速了。 我这个用的512M,在24.10.2时会不稳定,升到24.10.3 后不再因内存不足杀进程了。 Image

minisind avatar Sep 26 '25 13:09 minisind

三个吃内存的大插件,规则都是保存在内存中吧。 CPU干预非常少,要不无法保证网速了。 我这个用的512M,在24.10.2时会不稳定,升到24.10.3 后不再因内存不足杀进程了。 Image

那就好 我还以为我白升级512了

xiaomajy avatar Sep 26 '25 13:09 xiaomajy

同折腾了很久,版本降级到0.46.064就可以

OP24, 然后按照你说的先安装0.46.064, 安装后openclash会自动升级到0.47.010,内核alpha-g40e0813,就OK了。MT3000折腾很久才好用。谢谢提示!

tanzhuoning avatar Oct 03 '25 03:10 tanzhuoning

同折腾了很久,版本降级到0.46.064就可以

OP24, 然后按照你说的先安装0.46.064, 安装后openclash会自动升级到0.47.010,内核alpha-g40e0813,就OK了。MT3000折腾很久才好用。谢谢提示!

我用的树莓派4B(2Gb) 其他啥都没跑,内存应该没问题吧......降级到0.46.064, 安装后openclash会自动升级到0.47.010,然后还是会出现这个问题 我发现我每次都是正常运行12分钟多一点点就报错!快被搞崩溃了

kklod avatar Oct 13 '25 04:10 kklod

同折腾了很久,版本降级到0.46.064就可以

OP24, 然后按照你说的先安装0.46.064, 安装后openclash会自动升级到0.47.010,内核alpha-g40e0813,就OK了。MT3000折腾很久才好用。谢谢提示!

我用的树莓派4B(2Gb) 其他啥都没跑,内存应该没问题吧......降级到0.46.064, 安装后openclash会自动升级到0.47.010,然后还是会出现这个问题 我发现我每次都是正常运行12分钟多一点点就报错!快被搞崩溃了

可以装nikki试试,一般这种被系统kill的情况和固件关系比较大

vernesong avatar Oct 13 '25 07:10 vernesong

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

Brandon-1024 avatar Oct 17 '25 04:10 Brandon-1024

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

除了openclash 还有些什么吃内存的插件吗?

minisind avatar Oct 17 '25 06:10 minisind

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

除了openclash 还有些什么吃内存的插件吗?

没有,我上个周末刚因为内存占用的问题更新了24.10.3,目前AX3000T的256MB内存稳定占用率在75%。 原先确实会跑到85%-90%,但是这几天在修改Geo系列数据自动更新为每天凌晨更新的时候,早上就看到报这样的异常信息。 然后再次点击更新订阅配置后就拨上去了,一点儿额外修改操作都没有。

笑死,不放心看了一眼,居然是机场配置文件本身,这你怎么搞? Image 打开系统日志,果然是疯狂报NOT ENOUGH MEMORY FOR THE ALLOCATION. Image

怕不是因为机场本身搞了一堆规则导致的吧,比如特定访问指定特定节点这种? 我曾经怀疑过这个问题,咨询机场搭建商,回答是没法进行节点简化。 Image

那么如果是这样,我是不是应该选用轻量规则模板来屏蔽掉流媒体什么之类的分流规则来保证运行呢? Image

Brandon-1024 avatar Oct 17 '25 08:10 Brandon-1024

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

除了openclash 还有些什么吃内存的插件吗?

没有,我上个周末刚因为内存占用的问题更新了24.10.3,目前AX3000T的256MB内存稳定占用率在75%。 原先确实会跑到85%-90%,但是这几天在修改Geo系列数据自动更新为每天凌晨更新的时候,早上就看到报这样的异常信息。 然后再次点击更新订阅配置后就拨上去了,一点儿额外修改操作都没有。

笑死,不放心看了一眼,居然是机场配置文件本身,这你怎么搞? Image 打开系统日志,果然是疯狂报NOT ENOUGH MEMORY FOR THE ALLOCATION. Image

怕不是因为机场本身搞了一堆规则导致的吧,比如特定访问指定特定节点这种? 我曾经怀疑过这个问题,咨询机场搭建商,回答是没法进行节点简化。 Image

那么如果是这样,我是不是应该选用轻量规则模板来屏蔽掉流媒体什么之类的分流规则来保证运行呢? Image

我的用法,是取多个机场节点合并,手搓YAML文件,上传OPENCLASH。 节点不正常的话,再去订阅更新一下节点。

minisind avatar Oct 17 '25 09:10 minisind

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

除了openclash 还有些什么吃内存的插件吗?

没有,我上个周末刚因为内存占用的问题更新了24.10.3,目前AX3000T的256MB内存稳定占用率在75%。 原先确实会跑到85%-90%,但是这几天在修改Geo系列数据自动更新为每天凌晨更新的时候,早上就看到报这样的异常信息。 然后再次点击更新订阅配置后就拨上去了,一点儿额外修改操作都没有。 笑死,不放心看了一眼,居然是机场配置文件本身,这你怎么搞? Image 打开系统日志,果然是疯狂报NOT ENOUGH MEMORY FOR THE ALLOCATION. Image 怕不是因为机场本身搞了一堆规则导致的吧,比如特定访问指定特定节点这种? 我曾经怀疑过这个问题,咨询机场搭建商,回答是没法进行节点简化。 Image 那么如果是这样,我是不是应该选用轻量规则模板来屏蔽掉流媒体什么之类的分流规则来保证运行呢? Image

我的用法,是取多个机场节点合并,手搓YAML文件,上传OPENCLASH。 节点不正常的话,再去订阅更新一下节点。

这样岂不是很不自动,听起来就很麻烦嗷,OvO

Brandon-1024 avatar Oct 18 '25 13:10 Brandon-1024

补充内核日志 2025-09-23 15:33:11 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:11 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:11 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:11 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:33:11 level=info msg="Start initial configuration in progress" 2025-09-23 15:33:00 level=info msg="Load GeoSite rule: cn" 2025-09-23 15:33:00 level=warning msg="replace fallback-filter.geosite with nameserver-policy, it will be removed in the future" 2025-09-23 15:33:00 level=info msg="Geosite Matcher implementation: succinct" 2025-09-23 15:33:00 level=info msg="Geodata Loader mode: memconservative" 2025-09-23 15:32:59 level=info msg="Start initial configuration in progress"

这个我一直以来都经常碰见,卡在“Load GeoSite rule: cn”不能继续。 手动更新订阅配置就能再次拨上去,如果是内存的话,我用的AX3000T确实只有256MB。 如果是这个原因的话,我就真的考虑换个大内存再测试了。

除了openclash 还有些什么吃内存的插件吗?

没有,我上个周末刚因为内存占用的问题更新了24.10.3,目前AX3000T的256MB内存稳定占用率在75%。 原先确实会跑到85%-90%,但是这几天在修改Geo系列数据自动更新为每天凌晨更新的时候,早上就看到报这样的异常信息。 然后再次点击更新订阅配置后就拨上去了,一点儿额外修改操作都没有。 笑死,不放心看了一眼,居然是机场配置文件本身,这你怎么搞? Image 打开系统日志,果然是疯狂报NOT ENOUGH MEMORY FOR THE ALLOCATION. Image 怕不是因为机场本身搞了一堆规则导致的吧,比如特定访问指定特定节点这种? 我曾经怀疑过这个问题,咨询机场搭建商,回答是没法进行节点简化。 Image 那么如果是这样,我是不是应该选用轻量规则模板来屏蔽掉流媒体什么之类的分流规则来保证运行呢? Image

我的用法,是取多个机场节点合并,手搓YAML文件,上传OPENCLASH。 节点不正常的话,再去订阅更新一下节点。

我觉得我好像找到办法了,定时重启。 每天凌晨自动更新所有库,然后更新配置,然后重启路由器。 目前测试了两天,都能顺利启动,但是因为重启看不到配置的更新日志, 有概率配置并没有自动更新,这个事情有别人发ISSUE了。

Brandon-1024 avatar Oct 21 '25 00:10 Brandon-1024