Open wsm25 opened 1 year ago
用 root 运行就没有问题。基于上述输出猜测是把 Cache 写入磁盘的时候的问题。 gdb 输出:
Thread 26 "subconverter" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff482e700 (LWP 44631)]
0x00007ffff78e9161 in __GI__IO_fwrite (buf=0x7fffe801d530, size=1, count=2219, fp=0x0) at iofwrite.c:37
37 iofwrite.c: No such file or directory.
可以看到这里的 fp
是 0,可能是没有检查文件是否可写入就直接写入。
调用栈:
#0 0x00007ffff78e9161 in __GI__IO_fwrite (buf=0x7fffe801d530, size=1, count=2219, fp=0x0) at iofwrite.c:37
#1 0x000055555576baea in fileWrite (path="cache/4074ea87243959c457d3eb895b417b72",
content=";设置规则标志位\nsurge_ruleset=REJECT,rules/DivineEngine/Surge/Ruleset/Guard/Hijacking.list\nsurge_ruleset=DIRECT,https://subconverter.oss-ap-southeast-1.aliyuncs.com/Rules/RuleSet/ForceDirect"..., overwrite=true)
at /src/utils/file.cpp:107
#2 0x000055555567f6ee in webGet (
url="https://raw.githubusercontent.com/CareyWang/Rules/master/RemoteConfig/universal/no-urltest.ini", proxy="",
cache_ttl=300, response_headers=0x0, request_headers=0x0) at /src/handler/webget.cpp:359
#3 0x00005555556708ef in operator() (__closure=0x7ffff002e7f8) at /src/handler/multithread.cpp:69
...
确认版本最新
检索issue
subconverter版本
v0.7.2
转换过程
clash 转 clash
转换设置
sub?target=clash&url=xxx&config=https%3A%2F%2Fraw.githubusercontent.com%2FCareyWang%2FRules%2Fmaster%2FRemoteConfig%2Funiversal%2Fno-urltest.ini&emoji=true&list=false&udp=false&tfo=false&scv=false&fdn=false&sort=false
复现步骤
为了配置一个 service,将文件夹移至
/usr/share
下,运行/usr/share/subconverter/subconverter
,访问 subconverter 地址立即报错 Segmentation fault期望结果
正常输出
实际结果
Segmentation fault
错误信息