Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 更新alpha-8e6eb70内核后首次下载GeoIP.dat和GeoSite.dat会报错,内核无法启动 #1572

Closed
6 of 7 tasks
aslfjk opened this issue Oct 7, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@aslfjk
Copy link

aslfjk commented Oct 7, 2024

Verify steps

  • I have read the documentation and understand the meaning of all configuration items I have written, avoiding a large number of seemingly useful options or default values.
  • I have not reviewed the documentation and resolve this issue.
  • I have not searched the Issue Tracker for the problem I am going to raise.
  • I have tested with the latest Alpha branch version, and the issue still persists.
  • I have provided server and client configuration files and processes that can reproduce the issue locally, rather than a desensitized complex client configuration file.
  • I have provided the simplest configuration that can reproduce the error I reported, rather than relying on remote servers, TUN, graphical client interfaces, or other closed-source software.
  • I have provided complete configuration files and logs, rather than providing only parts that I believe are useful due to confidence in my own intelligence.

Operating System

Windows

System Version

Win11 23H2 22631.4249

Mihomo Version

Mihomo Meta alpha-8e6eb70 linux amd64 with go1.23.2 2024-10-06T08:17:46+00:00
Use tags: with_gvisor

Configuration File

proxy-providers:
  1:
    url: ""
    type: http
    interval: 86400
    health-check: {enable: true,url: "https://www.gstatic.com/generate_204",interval: 300}
    override:
      additional-prefix: "[1]" 

proxies: 
  - name: "直连"
    type: direct
    udp: true

geodata-mode: true
geox-url:
  geoip: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
  geosite: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
  mmdb: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb"
  asn: "https://mirror.ghproxy.com/https://github.com/xishang0128/geoip/releases/download/latest/GeoLite2-ASN.mmdb"

dns:
  enable: true
  ipv6: true
  respect-rules: true
  enhanced-mode: fake-ip
  fake-ip-filter:
    - "*"
    - "+.lan"
    - "+.local"
    - "+.market.xiaomi.com"
  nameserver:
    - https://223.5.5.5/dns-query
  proxy-server-nameserver:
    - https://223.5.5.5/dns-query
  nameserver-policy:
    "geosite:cn,private":
      - https://223.5.5.5/dns-query
    "geosite:geolocation-!cn":
      - "https://dns.cloudflare.com/dns-query"
      - "https://dns.google/dns-query"

proxy-groups:

  - name: 默认
    type: select
    proxies: [自动选择]

  - name: 国内
    type: select
    proxies:  [直连]

  - name: 其他
    type: select
    proxies:  [默认]

  - name: 自动选择
    type: url-test
    include-all: true
    tolerance: 10

rules:
  - GEOIP,CN,国内
  - MATCH,其他

Description

首次启动无法自动下载GeoIP.dat和geosite.dat,当其中任意一个文件缺失时报错

Reproduction Steps

不存在GeoIP.dat和geosite.dat任一文件时重启内核

Logs

# 缺失GeoIP.dat
time="2024-10-07T18:00:52.701423199+08:00" level=info msg="Start initial configuration in progress"
time="2024-10-07T18:00:52.702193651+08:00" level=info msg="Geodata Loader mode: standard"
time="2024-10-07T18:00:52.702202719+08:00" level=info msg="Geosite Matcher implementation: succinct"
time="2024-10-07T18:00:52.702257824+08:00" level=info msg="Load GeoSite rule: cn"
time="2024-10-07T18:00:53.002316233+08:00" level=info msg="Load GeoSite rule: github"
time="2024-10-07T18:00:53.059147392+08:00" level=info msg="Finished initial GeoSite rule github => Github, records: 27"
time="2024-10-07T18:00:53.063467163+08:00" level=info msg="Load GeoSite rule: twitter"
time="2024-10-07T18:00:53.114562529+08:00" level=info msg="Finished initial GeoSite rule twitter => Twitter, records: 23"
time="2024-10-07T18:00:53.118554518+08:00" level=info msg="Load GeoSite rule: youtube"
time="2024-10-07T18:00:53.165267331+08:00" level=info msg="Finished initial GeoSite rule youtube => YouTube, records: 176"
time="2024-10-07T18:00:53.168565449+08:00" level=info msg="Load GeoSite rule: google"
time="2024-10-07T18:00:53.216092856+08:00" level=info msg="Finished initial GeoSite rule google => Google, records: 1135"
time="2024-10-07T18:00:53.220870386+08:00" level=info msg="Load GeoSite rule: telegram"
time="2024-10-07T18:00:53.260692283+08:00" level=info msg="Finished initial GeoSite rule telegram => Telegram, records: 19"
time="2024-10-07T18:00:53.262194436+08:00" level=info msg="Load GeoSite rule: netflix"
time="2024-10-07T18:00:53.307280061+08:00" level=info msg="Finished initial GeoSite rule netflix => NETFLIX, records: 28"
time="2024-10-07T18:00:53.307350984+08:00" level=info msg="Load GeoSite rule: bilibili"
time="2024-10-07T18:00:53.358251192+08:00" level=info msg="Finished initial GeoSite rule bilibili => 哔哩哔哩, records: 50"
time="2024-10-07T18:00:53.358327183+08:00" level=info msg="Load GeoSite rule: bahamut"
time="2024-10-07T18:00:53.413080513+08:00" level=info msg="Finished initial GeoSite rule bahamut => 巴哈姆特, records: 5"
time="2024-10-07T18:00:53.413154696+08:00" level=info msg="Load GeoSite rule: spotify"
time="2024-10-07T18:00:53.467896552+08:00" level=info msg="Finished initial GeoSite rule spotify => Spotify, records: 21"
time="2024-10-07T18:00:53.467991436+08:00" level=info msg="Finished initial GeoSite rule CN => 国内, records: 92350"
time="2024-10-07T18:00:53.468011373+08:00" level=info msg="Load GeoSite rule: geolocation-!cn"
time="2024-10-07T18:00:53.600010431+08:00" level=info msg="Finished initial GeoSite rule geolocation-!cn => 其他, records: 30934"
time="2024-10-07T18:00:53.600103748+08:00" level=info msg="Can't find GeoIP.dat, start download"
panic: should never be called

goroutine 18 [running]:
main.main.func1({0xc0006040f0?, 0x0?}, {0x0?, 0xc0006040f0?}, {0xc00060f380?, 0x40fb05?})
        github.com/metacubex/mihomo/main.go:63 +0x25
net.(*Resolver).dial(0xc0005e8f50?, {0x1614a20?, 0xc002f1ce00?}, {0x1402a57?, 0xc000135dc0?}, {0xc0025fda60?, 0x0?})
        net/lookup.go:684 +0x63
net.(*Resolver).exchange(_, {_, _}, {_, _}, {{{0x6d, 0x69, 0x72, 0x72, 0x6f, ...}, ...}, ...}, ...)
        net/dnsclient_unix.go:184 +0x34a
net.(*Resolver).tryOneName(0x1fe8320, {0x16149b0, 0xc0000a05f0}, 0xc0005e1c20?, {0xc00260f1b8, 0x13}, 0x1c)
        net/dnsclient_unix.go:315 +0x4cb
net.(*Resolver).goLookupIPCNAMEOrder.func3.1(0x6964?)
        net/dnsclient_unix.go:668 +0x85
created by net.(*Resolver).goLookupIPCNAMEOrder.func3 in goroutine 15
        net/dnsclient_unix.go:667 +0x13f

# 缺失GeoSite.dat
time="2024-10-07T18:02:07.977058087+08:00" level=info msg="Start initial configuration in progress"
time="2024-10-07T18:02:07.977825858+08:00" level=info msg="Geodata Loader mode: standard"
time="2024-10-07T18:02:07.977833661+08:00" level=info msg="Geosite Matcher implementation: succinct"
time="2024-10-07T18:02:07.977884367+08:00" level=info msg="Can't find GeoSite.dat, start download"
panic: should never be called

goroutine 18 [running]:
main.main.func1({0xc0004021b0?, 0x0?}, {0x0?, 0xc0004021b0?}, {0xc000137380?, 0x40fb05?})
        github.com/metacubex/mihomo/main.go:63 +0x25
net.(*Resolver).dial(0xc00020e100?, {0x1614a20?, 0xc0000f8ee0?}, {0x1402a57?, 0xc000135dc0?}, {0xc0005df540?, 0x0?})
        net/lookup.go:684 +0x63
net.(*Resolver).exchange(_, {_, _}, {_, _}, {{{0x6d, 0x69, 0x72, 0x72, 0x6f, ...}, ...}, ...}, ...)
        net/dnsclient_unix.go:184 +0x34a
net.(*Resolver).tryOneName(0x1fe8320, {0x16149b0, 0xc0005e9950}, 0xc0001eaf00?, {0xc0003de660, 0x13}, 0x1c)
        net/dnsclient_unix.go:315 +0x4cb
net.(*Resolver).goLookupIPCNAMEOrder.func3.1(0x0?)
        net/dnsclient_unix.go:668 +0x85
created by net.(*Resolver).goLookupIPCNAMEOrder.func3 in goroutine 15
        net/dnsclient_unix.go:667 +0x13f
@aslfjk aslfjk added the bug Something isn't working label Oct 7, 2024
@aslfjk aslfjk changed the title [Bug] 更新alpha-8e6eb70内核后首次下载GeoIP.dat会报错,内核无法启动 [Bug] 更新alpha-8e6eb70内核后首次下载GeoIP.dat和GeoSite.dat会报错,内核无法启动 Oct 7, 2024
@xishang0128
Copy link
Contributor

I have provided the simplest configuration that can reproduce the error I reported

@lochuan
Copy link

lochuan commented Oct 8, 2024

Same error

@dycwuxing
Copy link

同样,mac下核心反复重启

@SharerMax
Copy link

SharerMax commented Oct 8, 2024

x86-64 openwrt 23.05.5 下有同样的问题

临时解决办法:手动下载GeoSite.dat和GeoIP.dat 到运行目录

@matto49
Copy link

matto49 commented Oct 9, 2024

same error

@wwqgtxx
Copy link
Collaborator

wwqgtxx commented Oct 9, 2024

fixed in: 08dcef8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants