MetaCubeX / mihomo

A simple Python Pydantic model for Honkai: Star Rail parsed data from the Mihomo API.
https://wiki.metacubex.one
MIT License
13.84k stars 2.4k forks source link

[Bug] Reality fails to run by random [invalid memory address] #801

Open MrMohebi opened 8 months ago

MrMohebi commented 8 months ago

Verify steps

Clash version

v1.16.0 linux amd64

What OS are you seeing the problem on?

Linux

Clash config

###################### global #########################
bind-address: "*"

mode: rule
log-level: debug

keep-alive-interval: 30
find-process-mode: strict

profile:
  store-selected: true
  store-fake-ip: true

unified-delay: true

tcp-concurrent: true

global-client-fingerprint: chrome

sniffer:
  enable: false

###################### global #########################

###################### inbound #########################

mixed-port: 7575
allow-lan: true

#authentication:
#  - "test1:test1"
###################### inbound #########################

proxy-providers:
  provider1:
    type: file
    path: "./test_conf.yaml"
    interval: 3600
    health-check:
      enable: true
      interval: 600
      lazy: true
      url: https://cp.cloudflare.com/generate_204

proxy-groups:
  - name: "proxy"
    type: url-test
    url: 'https://www.gstatic.com/generate_204'
    interval: 300
    lazy: true
    tolerance: 50
    use:
      - provider1

rules:
  - MATCH,proxy

################## test_conf.yaml #########################

# it's a free and public config
proxies:
- client-fingerprint: randomized
  fingerprint: ''
  grpc-opts:
    grpc-service-name: vip
  name: proxy_2706795_proxy_5993760_t.meConfigsHub
  network: grpc
  port: 2053
  reality-opts:
    public-key: "SbVKOEMjK0sIlbwg4akyBg5mL5KZwwB-ed4eEE7YnRc"
    short-id: ''
  server: marzbanpanel.v2raypanell.ir
  servername: newconfig.v2raypanell.ir
  tls: true
  type: vless
  udp: false
  uuid: a4d36c5e-eefb-42df-ac45-e0295a266c90

################## end of test_conf.yaml #########################

Clash log

INFO[2023-10-17T11:03:21.650920379+03:30] Start initial configuration in progress      
INFO[2023-10-17T11:03:21.651140724+03:30] Geodata Loader mode: memconservative         
WARN[2023-10-17T11:03:21.651298133+03:30] Skip start health check timer due to it's started 
INFO[2023-10-17T11:03:21.651869885+03:30] Initial configuration complete, total time: 0ms 
INFO[2023-10-17T11:03:21.673354441+03:30] Sniffer is closed                            
INFO[2023-10-17T11:03:21.673422638+03:30] Use tcp concurrent                           
INFO[2023-10-17T11:03:21.673650235+03:30] Mixed(http+socks) proxy listening at: [::]:7575 
INFO[2023-10-17T11:03:21.673728834+03:30] Start initial compatible provider default    
INFO[2023-10-17T11:03:21.673795002+03:30] Start initial provider provider1             
DEBU[2023-10-17T11:03:21.799266828+03:30] initial random HelloID:ios                   
DEBU[2023-10-17T11:03:21.799315081+03:30] use specified fingerprint:Randomized         
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x9bea28]

goroutine 41 [running]:
github.com/Dreamacro/clash/component/tls.GetRealityConn({0x1630a88, 0x25be360}, {0x163a270, 0xc0000b6040}, {0xc00000e120?, 0x0?}, 0xc00066b040, 0xc0000e4540)
        github.com/Dreamacro/clash/component/tls/reality.go:83 +0x628
github.com/Dreamacro/clash/adapter/outbound.NewVless.NewHTTP2Client.func2({0x1630a88, 0x25be360}, {0x14197c2?, 0x3?}, {0xc0006ffd20?, 0x1c?}, 0xc00066b040?)
        github.com/Dreamacro/clash/transport/gun/gun.go:224 +0x165
golang.org/x/net/http2.(*Transport).dialTLS(0xc000326090?, {0x1630a88?, 0x25be360?}, {0x14197c2?, 0x410605?}, {0xc0006ffd20?, 0x2a?}, 0x0?)
        golang.org/x/net@v0.15.0/http2/transport.go:688 +0x1d1
golang.org/x/net/http2.(*Transport).dialClientConn(0x48bb3f?, {0x1630a88, 0x25be360}, {0xc0006ffd20, 0x1c}, 0x0?)
        golang.org/x/net@v0.15.0/http2/transport.go:665 +0x85
golang.org/x/net/http2.(*dialCall).dial(0xc00027bdc0, {0x1630a88?, 0x25be360?}, {0xc0006ffd20, 0x1c})
        golang.org/x/net@v0.15.0/http2/client_conn_pool.go:141 +0x45
created by golang.org/x/net/http2.(*clientConnPool).getStartDialLocked in goroutine 37
        golang.org/x/net@v0.15.0/http2/client_conn_pool.go:134 +0x1f6

Description

when we run the script, sometimes in random tryes it will throw this error. when there are lots of REALITY in provider. chance to fail is around 100%

shallbytwo commented 8 months ago

+1

stevejohnson7 commented 8 months ago

same as #797