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] 连启用tfo的ss协议的节点,v1.18.10、v1.19.0和alpha-89dfabe内核会导致ssl连接出错 #1739

Closed
9 tasks done
lxp0gb opened this issue Dec 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@lxp0gb
Copy link

lxp0gb commented Dec 23, 2024

Verify steps

  • I have read the documentation and understand the meaning of all the configuration items I have written, rather than just piling up seemingly useful options or default values.
  • I have carefully reviewed the documentation and have not resolved the issue.
  • I have searched the Issue Tracker for the issue I want to raise and did not find it.
  • I am a non-Chinese user.
  • I have tested with the latest Alpha branch version, and the issue still persists.
  • I have provided the server and client configuration files and processes that can reproduce the issue locally, rather than a sanitized complex client configuration file.
  • I provided the simplest configuration that can be used to reproduce the errors in my report, rather than relying on remote servers or piling on a lot of unnecessary configurations for reproduction.
  • I have provided complete logs, rather than just the parts I think are useful out of confidence in my own intelligence.
  • I have directly reproduced the error using the Mihomo command-line program, rather than using other tools or scripts.

Operating System

MacOS

System Version

15.2

Mihomo Version

Mihomo Meta v1.19.0 darwin amd64 with go1.23.3 Mon Dec 9 09:51:22 UTC 2024
Mihomo Meta alpha-89dfabe darwin amd64 with go1.23.4 Thu Dec 19 07:56:08 UTC 2024

Configuration File

# config-with-tfo.yaml
port: 17890
socks-port: 17891
allow_lan: false
mode: rule
log-level: debug
dns:
  nameserver:
    - 119.28.28.28
proxies:
  - { name: 'local ss node with tfo', type: ss, server: 127.0.0.1, port: 8388, cipher: aes-128-gcm, password: 'QJ7wuaUvZi4jQ81cSxulkQ==', tfo: true }
  - { name: 'local ss node without tfo', type: ss, server: 127.0.0.1, port: 8388, cipher: aes-128-gcm, password: 'QJ7wuaUvZi4jQ81cSxulkQ==', tfo: false }
proxy-groups:
  - name: "Auto"
    type: select
    proxies:
      - 'local ss node with tfo'
rules:
  - MATCH,Auto

Description

v1.18.10和v1.19.0版本的内核连启用tfo的ss协议的节点,无论远程节点还是本地节点,访问https协议的网页都会引起SSL_ERROR_SYSCALL。

Reproduction Steps

  1. 本地开启用tfo的ss服务
    本地ss服务,我这里用https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.21.2/shadowsocks-v1.21.2.x86_64-apple-darwin.tar.xz,用其他也能复现

config.json

{
"server": "127.0.0.1",
"server_port": 8388,
"password": "QJ7wuaUvZi4jQ81cSxulkQ==",
"method": "aes-128-gcm",
"tfo": true
}

./ssserver -c config.json

  1. mihomo core v1.19.0连上面的本地ss服务器
    ./mihomo-darwin-amd64-compatible-v1.19.0 -f config-with-tfo.yaml

config-with-tfo.yaml

port: 17890
socks-port: 17891
allow_lan: false
mode: rule
log-level: debug
dns:
nameserver:
- 119.28.28.28
proxies:

  • { name: 'local ss node with tfo', type: ss, server: 127.0.0.1, port: 8388, cipher: aes-128-gcm, password: 'QJ7wuaUvZi4jQ81cSxulkQ==', tfo: true }
  • { name: 'local ss node without tfo', type: ss, server: 127.0.0.1, port: 8388, cipher: aes-128-gcm, password: 'QJ7wuaUvZi4jQ81cSxulkQ==', tfo: false }
    proxy-groups:
  • name: "Auto"
    type: select
    proxies:
    • 'local ss node with tfo'
      rules:
  • MATCH,Auto
  1. 方便复现看具体错误表现,我这里用curl访问baidu
    http_proxy=http://127.0.0.1:17890 https_proxy=http://127.0.0.1:17890 all_proxy=socks5://127.0.0.1:27891 curl -v https://www.baidu.com

curl的output是

  • Uses proxy env variable https_proxy == 'http://127.0.0.1:17890'
  • Trying 127.0.0.1:17890...
  • Connected to 127.0.0.1 (127.0.0.1) port 17890
  • CONNECT tunnel: HTTP/1.1 negotiated
  • allocate connect buffer
  • Establish HTTP proxy tunnel to www.baidu.com:443

CONNECT www.baidu.com:443 HTTP/1.1
Host: www.baidu.com:443
User-Agent: curl/8.7.1
Proxy-Connection: Keep-Alive

< HTTP/1.1 200 Connection established
<

  • CONNECT phase completed
  • CONNECT tunnel established, response 200
  • ALPN: curl offers h2,http/1.1
  • (304) (OUT), TLS handshake, Client hello (1):
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.baidu.com:443
  • Closing connection
    curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to www.baidu.com:443
  1. 作为对比,只改用v1.18.9版的内核,其他步骤不变,内核debug log看内核“好像”正常运行和处理请求,但对应curl在ssl连接握手时出错,output是
  • Uses proxy env variable https_proxy == 'http://127.0.0.1:17890'
  • Trying 127.0.0.1:17890...
  • Connected to 127.0.0.1 (127.0.0.1) port 17890
  • CONNECT tunnel: HTTP/1.1 negotiated
  • allocate connect buffer
  • Establish HTTP proxy tunnel to www.baidu.com:443

CONNECT www.baidu.com:443 HTTP/1.1
Host: www.baidu.com:443
User-Agent: curl/8.7.1
Proxy-Connection: Keep-Alive

< HTTP/1.1 200 Connection established
<

  • CONNECT phase completed
  • CONNECT tunnel established, response 200
  • ALPN: curl offers h2,http/1.1
  • (304) (OUT), TLS handshake, Client hello (1):
  • CAfile: /etc/ssl/cert.pem
  • CApath: none
  • (304) (IN), TLS handshake, Server hello (2):
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
  • TLSv1.2 (IN), TLS handshake, Server key exchange (12):
  • TLSv1.2 (IN), TLS handshake, Server finished (14):
  • TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
  • TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.2 (OUT), TLS handshake, Finished (20):
  • TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
  • TLSv1.2 (IN), TLS handshake, Finished (20):
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 / [blank] / UNDEF
  • ALPN: server accepted http/1.1
  • Server certificate:
  • subject: C=CN; ST=beijing; L=beijing; O=Beijing Baidu Netcom Science Technology Co., Ltd; CN=baidu.com
  • start date: Jul 8 01:41:02 2024 GMT
  • expire date: Aug 9 01:41:01 2025 GMT
  • subjectAltName: host "www.baidu.com" matched cert's "*.baidu.com"
  • issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign RSA OV SSL CA 2018
  • SSL certificate verify ok.
  • using HTTP/1.x

GET / HTTP/1.1
Host: www.baidu.com
User-Agent: curl/8.7.1
Accept: /

  • Request completely sent off
    < HTTP/1.1 200 OK
    < Accept-Ranges: bytes
    < Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform
    < Connection: keep-alive
    < Content-Length: 2443
    < Content-Type: text/html
    < Date: Mon, 23 Dec 2024 08:29:59 GMT
    < Etag: "58860401-98b"
    < Last-Modified: Mon, 23 Jan 2017 13:24:17 GMT
    < Pragma: no-cache
    < Server: bfe/1.0.8.18
    < Set-Cookie: BDORZ=27315; max-age=86400; domain=.baidu.com; path=/
    <
<title>百度一下,你就知道</title>
新闻 hao123 地图 视频 贴吧 登录 <script>document.write('登录');
            </script> <a href=//www.baidu.com/more/ name=tj_briicon class=bri style="display: block;">更多产品</a> </div> </div> </div> <div id=ftCon> <div id=ftConw> <p id=lh> <a href=http://home.baidu.com>关于百度</a> <a href=http://ir.baidu.com>About Baidu</a> </p> <p id=cp>&copy;2017&nbsp;Baidu&nbsp;<a href=http://www.baidu.com/duty/>使用百度前必读</a>&nbsp; <a href=http://jianyi.baidu.com/ class=cp-feedback>意见反馈</a>&nbsp;京ICP证030173号&nbsp; <img src=//www.baidu.com/img/gs.gif> </p> </div> </div> </div> </body> </html>
  • Connection #0 to host 127.0.0.1 left intact
  1. 同样步骤测试alpha-89dfabe版本内核,内核会Panic,debug log见“Logs”,curl的output同v1.19.0

Logs

# Mihomo Core v1.19.0 debug log
INFO[2024-12-23T16:23:04.753136+08:00] Start initial configuration in progress      
INFO[2024-12-23T16:23:04.756763+08:00] Geodata Loader mode: memconservative         
INFO[2024-12-23T16:23:04.756785+08:00] Geosite Matcher implementation: succinct     
INFO[2024-12-23T16:23:04.761239+08:00] Initial configuration complete, total time: 7ms 
INFO[2024-12-23T16:23:04.774156+08:00] Sniffer is closed                            
INFO[2024-12-23T16:23:04.77578+08:00] HTTP proxy listening at: 127.0.0.1:17890     
INFO[2024-12-23T16:23:04.775982+08:00] SOCKS proxy listening at: 127.0.0.1:17891    
INFO[2024-12-23T16:23:04.780895+08:00] Start initial Compatible provider default    
INFO[2024-12-23T16:23:04.780945+08:00] Start initial Compatible provider Auto       
DEBU[2024-12-23T16:23:12.502847+08:00] Auth success from 127.0.0.1:55668 ->         
DEBU[2024-12-23T16:23:12.504811+08:00] [Rule] use default rules                     
INFO[2024-12-23T16:23:12.507397+08:00] [TCP] 127.0.0.1:55668 --> www.baidu.com:443 match Match using Auto[local ss node with tfo] 

# alpha-89dfabe版本内核的debug log
INFO[2024-12-23T16:37:37.328936000+08:00] Start initial configuration in progress      
INFO[2024-12-23T16:37:37.332835000+08:00] Geodata Loader mode: memconservative         
INFO[2024-12-23T16:37:37.332914000+08:00] Geosite Matcher implementation: succinct     
INFO[2024-12-23T16:37:37.333493000+08:00] Initial configuration complete, total time: 4ms 
INFO[2024-12-23T16:37:37.345452000+08:00] Sniffer is closed                            
INFO[2024-12-23T16:37:37.347168000+08:00] HTTP proxy listening at: 127.0.0.1:17890     
INFO[2024-12-23T16:37:37.347391000+08:00] SOCKS proxy listening at: 127.0.0.1:17891    
INFO[2024-12-23T16:37:37.351391000+08:00] Start initial Compatible provider default    
INFO[2024-12-23T16:37:37.351445000+08:00] Start initial Compatible provider Auto       
DEBU[2024-12-23T16:37:41.619067000+08:00] Auth success from 127.0.0.1:55835 ->         
DEBU[2024-12-23T16:37:41.620202000+08:00] [Rule] use default rules                     
INFO[2024-12-23T16:37:41.623578000+08:00] [TCP] 127.0.0.1:55835 --> www.baidu.com:443 match Match using Auto[local ss node with tfo] 
fatal error: stack not a power of 2

runtime stack:
runtime.throw({0xe1a68d9?, 0x7ff7b39c6730?})
	runtime/panic.go:1067 +0x48 fp=0x7ff7b39c66f0 sp=0x7ff7b39c66c0 pc=0xd5aa188
runtime.stackfree({0x7ff7b39c67b0?, 0xd590230?})
	runtime/stack.go:451 +0x347 fp=0x7ff7b39c6778 sp=0x7ff7b39c66f0 pc=0xd58ba47
runtime.gfput(0xc000060508, 0xc0001a6a80)
	runtime/proc.go:5143 +0x5a fp=0x7ff7b39c67e0 sp=0x7ff7b39c6778 pc=0xd57dc5a
runtime.gdestroy(0xc0001a6a80)
	runtime/proc.go:4315 +0x230 fp=0x7ff7b39c6820 sp=0x7ff7b39c67e0 pc=0xd57c0f0
runtime.goexit0(0xc0001a6a80?)
	runtime/proc.go:4267 +0x13 fp=0x7ff7b39c6838 sp=0x7ff7b39c6820 pc=0xd57be93
runtime.mcall()
	runtime/asm_amd64.s:459 +0x4e fp=0x7ff7b39c6850 sp=0x7ff7b39c6838 pc=0xd5b0e8e

goroutine 1 gp=0xc0000061c0 m=nil [select]:
runtime.gopark(0xc000055d98?, 0x2?, 0x30?, 0x77?, 0xc000055cfc?)
	runtime/proc.go:424 +0xce fp=0xc000055b88 sp=0xc000055b68 pc=0xd5aa2ae
runtime.selectgo(0xc000055d98, 0xc000055cf8, 0x1?, 0x0, 0x0?, 0x1)
	runtime/select.go:335 +0x7a5 fp=0xc000055cb0 sp=0xc000055b88 pc=0xd585fc5
main.main()
	github.com/metacubex/mihomo/main.go:176 +0xf99 fp=0xc000055f50 sp=0xc000055cb0 pc=0xe194339
runtime.main()
	runtime/proc.go:272 +0x28b fp=0xc000055fe0 sp=0xc000055f50 pc=0xd573a8b
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000055fe8 sp=0xc000055fe0 pc=0xd5b2ec1

goroutine 2 gp=0xc000006c40 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc000070fa8 sp=0xc000070f88 pc=0xd5aa2ae
runtime.goparkunlock(...)
	runtime/proc.go:430
runtime.forcegchelper()
	runtime/proc.go:337 +0xb3 fp=0xc000070fe0 sp=0xc000070fa8 pc=0xd573dd3
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000070fe8 sp=0xc000070fe0 pc=0xd5b2ec1
created by runtime.init.7 in goroutine 1
	runtime/proc.go:325 +0x1a

goroutine 3 gp=0xc000007180 m=nil [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc000071780 sp=0xc000071760 pc=0xd5aa2ae
runtime.goparkunlock(...)
	runtime/proc.go:430
runtime.bgsweep(0xc00004e080)
	runtime/mgcsweep.go:317 +0xdf fp=0xc0000717c8 sp=0xc000071780 pc=0xd55c2bf
runtime.gcenable.gowrap1()
	runtime/mgc.go:204 +0x25 fp=0xc0000717e0 sp=0xc0000717c8 pc=0xd550965
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0000717e8 sp=0xc0000717e0 pc=0xd5b2ec1
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000007340 m=nil [GC scavenge wait]:
runtime.gopark(0x10000?, 0xe369fb8?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc000071f78 sp=0xc000071f58 pc=0xd5aa2ae
runtime.goparkunlock(...)
	runtime/proc.go:430
runtime.(*scavengerState).park(0xf00b5c0)
	runtime/mgcscavenge.go:425 +0x49 fp=0xc000071fa8 sp=0xc000071f78 pc=0xd559c89
runtime.bgscavenge(0xc00004e080)
	runtime/mgcscavenge.go:658 +0x59 fp=0xc000071fc8 sp=0xc000071fa8 pc=0xd55a219
runtime.gcenable.gowrap2()
	runtime/mgc.go:205 +0x25 fp=0xc000071fe0 sp=0xc000071fc8 pc=0xd550905
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000071fe8 sp=0xc000071fe0 pc=0xd5b2ec1
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:205 +0xa5

goroutine 5 gp=0xc000007c00 m=nil [finalizer wait]:
runtime.gopark(0xc000070648?, 0xd547245?, 0xb0?, 0x1?, 0xc0000061c0?)
	runtime/proc.go:424 +0xce fp=0xc000070620 sp=0xc000070600 pc=0xd5aa2ae
runtime.runfinq()
	runtime/mfinal.go:193 +0x107 fp=0xc0000707e0 sp=0xc000070620 pc=0xd54f967
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0000707e8 sp=0xc0000707e0 pc=0xd5b2ec1
created by runtime.createfing in goroutine 1
	runtime/mfinal.go:163 +0x3d

goroutine 6 gp=0xc000007dc0 m=nil [chan receive]:
runtime.gopark(0xc000200000?, 0xc00009c000?, 0x0?, 0x0?, 0xc000072698?)
	runtime/proc.go:424 +0xce fp=0xc000072640 sp=0xc000072620 pc=0xd5aa2ae
runtime.chanrecv(0xc0000a6150, 0xc000072720, 0x1)
	runtime/chan.go:639 +0x41c fp=0xc0000726b8 sp=0xc000072640 pc=0xd54057c
runtime.chanrecv2(0x0?, 0x0?)
	runtime/chan.go:494 +0x12 fp=0xc0000726e0 sp=0xc0000726b8 pc=0xd540152
github.com/metacubex/mihomo/common/observable.(*Observable[...]).process(0xe6a8d00)
	github.com/metacubex/mihomo/common/observable/observable.go:16 +0x55 fp=0xc0000727c0 sp=0xc0000726e0 pc=0xd7290b5
github.com/metacubex/mihomo/common/observable.NewObservable[...].gowrap1()
	github.com/metacubex/mihomo/common/observable/observable.go:63 +0x25 fp=0xc0000727e0 sp=0xc0000727c0 pc=0xd728a45
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0000727e8 sp=0xc0000727e0 pc=0xd5b2ec1
created by github.com/metacubex/mihomo/common/observable.NewObservable[...] in goroutine 1
	github.com/metacubex/mihomo/common/observable/observable.go:63 +0xd6

goroutine 7 gp=0xc0001a6c40 m=nil [chan receive]:
runtime.gopark(0xc000072f60?, 0xd658005?, 0x50?, 0xdc?, 0xe6afe40?)
	runtime/proc.go:424 +0xce fp=0xc000072f18 sp=0xc000072ef8 pc=0xd5aa2ae
runtime.chanrecv(0xc0000a6460, 0x0, 0x1)
	runtime/chan.go:639 +0x41c fp=0xc000072f90 sp=0xc000072f18 pc=0xd54057c
runtime.chanrecv1(0x0?, 0x0?)
	runtime/chan.go:489 +0x12 fp=0xc000072fb8 sp=0xc000072f90 pc=0xd540132
runtime.unique_runtime_registerUniqueMapCleanup.func1(...)
	runtime/mgc.go:1781
runtime.unique_runtime_registerUniqueMapCleanup.gowrap1()
	runtime/mgc.go:1784 +0x2f fp=0xc000072fe0 sp=0xc000072fb8 pc=0xd55398f
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000072fe8 sp=0xc000072fe0 pc=0xd5b2ec1
created by unique.runtime_registerUniqueMapCleanup in goroutine 1
	runtime/mgc.go:1779 +0x96

goroutine 8 gp=0xc0001a7340 m=nil [chan receive]:
runtime.gopark(0xc000118000?, 0x7b7524413fe?, 0x0?, 0xca?, 0xe67a688?)
	runtime/proc.go:424 +0xce fp=0xc000080ee8 sp=0xc000080ec8 pc=0xd5aa2ae
runtime.chanrecv(0xc000110000, 0xc000080fa0, 0x1)
	runtime/chan.go:639 +0x41c fp=0xc000080f60 sp=0xc000080ee8 pc=0xd54057c
runtime.chanrecv2(0x3b9aca00?, 0x0?)
	runtime/chan.go:494 +0x12 fp=0xc000080f88 sp=0xc000080f60 pc=0xd540152
github.com/metacubex/mihomo/tunnel/statistic.(*Manager).handle(0xc0000fb0e0)
	github.com/metacubex/mihomo/tunnel/statistic/manager.go:116 +0x6f fp=0xc000080fc8 sp=0xc000080f88 pc=0xda5480f
github.com/metacubex/mihomo/tunnel/statistic.init.0.gowrap1()
	github.com/metacubex/mihomo/tunnel/statistic/manager.go:27 +0x25 fp=0xc000080fe0 sp=0xc000080fc8 pc=0xda54325
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000080fe8 sp=0xc000080fe0 pc=0xd5b2ec1
created by github.com/metacubex/mihomo/tunnel/statistic.init.0 in goroutine 1
	github.com/metacubex/mihomo/tunnel/statistic/manager.go:27 +0x1cd

goroutine 23 gp=0xc0003f41c0 m=nil [IO wait]:
runtime.gopark(0xc000082d38?, 0xc000082d68?, 0x56?, 0x53?, 0xc000082d50?)
	runtime/proc.go:424 +0xce fp=0xc000082cf0 sp=0xc000082cd0 pc=0xd5aa2ae
runtime.netpollblock(0xc0000126a8?, 0xd53e566?, 0x0?)
	runtime/netpoll.go:575 +0xf7 fp=0xc000082d28 sp=0xc000082cf0 pc=0xd56cbd7
internal/poll.runtime_pollWait(0xe8467310, 0x72)
	runtime/netpoll.go:351 +0x85 fp=0xc000082d48 sp=0xc000082d28 pc=0xd5a95e5
internal/poll.(*pollDesc).wait(0xc000139200?, 0xe86698b8?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x27 fp=0xc000082d70 sp=0xc000082d48 pc=0xd6232a7
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc000139200)
	internal/poll/fd_unix.go:620 +0x295 fp=0xc000082e18 sp=0xc000082d70 pc=0xd627675
net.(*netFD).accept(0xc000139200)
	net/fd_unix.go:172 +0x29 fp=0xc000082ed0 sp=0xc000082e18 pc=0xd677a29
net.(*TCPListener).accept(0xc0003cc680)
	net/tcpsock_posix.go:159 +0x1e fp=0xc000082f20 sp=0xc000082ed0 pc=0xd68b6de
net.(*TCPListener).Accept(0xc0003cc680)
	net/tcpsock.go:372 +0x30 fp=0xc000082f50 sp=0xc000082f20 pc=0xd68a710
github.com/metacubex/mihomo/listener/http.NewWithAuthenticator.func1()
	github.com/metacubex/mihomo/listener/http/server.go:69 +0x79 fp=0xc000082fe0 sp=0xc000082f50 pc=0xe0ec339
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000082fe8 sp=0xc000082fe0 pc=0xd5b2ec1
created by github.com/metacubex/mihomo/listener/http.NewWithAuthenticator in goroutine 1
	github.com/metacubex/mihomo/listener/http/server.go:67 +0x274

goroutine 24 gp=0xc0003f4380 m=nil [IO wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc00006ece0 sp=0xc00006ecc0 pc=0xd5aa2ae
runtime.netpollblock(0x0?, 0xd53e566?, 0x0?)
	runtime/netpoll.go:575 +0xf7 fp=0xc00006ed18 sp=0xc00006ece0 pc=0xd56cbd7
internal/poll.runtime_pollWait(0xe84671f8, 0x72)
	runtime/netpoll.go:351 +0x85 fp=0xc00006ed38 sp=0xc00006ed18 pc=0xd5a95e5
internal/poll.(*pollDesc).wait(0xc000139280?, 0x0?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x27 fp=0xc00006ed60 sp=0xc00006ed38 pc=0xd6232a7
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0xc000139280)
	internal/poll/fd_unix.go:620 +0x295 fp=0xc00006ee08 sp=0xc00006ed60 pc=0xd627675
net.(*netFD).accept(0xc000139280)
	net/fd_unix.go:172 +0x29 fp=0xc00006eec0 sp=0xc00006ee08 pc=0xd677a29
net.(*TCPListener).accept(0xc0003cc700)
	net/tcpsock_posix.go:159 +0x1e fp=0xc00006ef10 sp=0xc00006eec0 pc=0xd68b6de
net.(*TCPListener).Accept(0xc0003cc700)
	net/tcpsock.go:372 +0x30 fp=0xc00006ef40 sp=0xc00006ef10 pc=0xd68a710
github.com/metacubex/mihomo/listener/socks.NewWithAuthenticator.func1()
	github.com/metacubex/mihomo/listener/socks/tcp.go:63 +0x92 fp=0xc00006efe0 sp=0xc00006ef40 pc=0xe0ee5b2
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc00006efe8 sp=0xc00006efe0 pc=0xd5b2ec1
created by github.com/metacubex/mihomo/listener/socks.NewWithAuthenticator in goroutine 1
	github.com/metacubex/mihomo/listener/socks/tcp.go:61 +0x28f

goroutine 25 gp=0xc0003f4540 m=nil [IO wait]:
runtime.gopark(0xc000293590?, 0x4000?, 0x0?, 0x40?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc000085db8 sp=0xc000085d98 pc=0xd5aa2ae
runtime.netpollblock(0x0?, 0x2bcfe0?, 0xc0?)
	runtime/netpoll.go:575 +0xf7 fp=0xc000085df0 sp=0xc000085db8 pc=0xd56cbd7
internal/poll.runtime_pollWait(0xe84670e0, 0x72)
	runtime/netpoll.go:351 +0x85 fp=0xc000085e10 sp=0xc000085df0 pc=0xd5a95e5
internal/poll.(*pollDesc).wait(0x6?, 0x30?, 0x0)
	internal/poll/fd_poll_runtime.go:84 +0x27 fp=0xc000085e38 sp=0xc000085e10 pc=0xd6232a7
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).RawRead(0xc000139300, 0xc000293590)
	internal/poll/fd_unix.go:717 +0x125 fp=0xc000085e98 sp=0xc000085e38 pc=0xd627e65
net.(*rawConn).Read(0xc0000743a8, 0x0?)
	net/rawconn.go:44 +0x36 fp=0xc000085ed0 sp=0xc000085e98 pc=0xd686d16
github.com/metacubex/mihomo/common/net/packet.(*enhanceUDPConn).WaitReadFrom(0xc0003dc7b0)
	github.com/metacubex/mihomo/common/net/packet/packet_posix.go:23 +0x175 fp=0xc000085f18 sp=0xc000085ed0 pc=0xd7e8575
github.com/metacubex/mihomo/listener/socks.NewUDP.func1()
	github.com/metacubex/mihomo/listener/socks/udp.go:59 +0x9e fp=0xc000085fe0 sp=0xc000085f18 pc=0xe0ef61e
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000085fe8 sp=0xc000085fe0 pc=0xd5b2ec1
created by github.com/metacubex/mihomo/listener/socks.NewUDP in goroutine 1
	github.com/metacubex/mihomo/listener/socks/udp.go:57 +0x276

goroutine 28 gp=0xc0003f48c0 m=nil [GC worker (idle)]:
runtime.gopark(0xc0001676c0?, 0x0?, 0x1?, 0x26?, 0xc0003fa778?)
	runtime/proc.go:424 +0xce fp=0xc0003fa738 sp=0xc0003fa718 pc=0xd5aa2ae
runtime.gcBgMarkWorker(0xc0001677a0)
	runtime/mgc.go:1412 +0xe9 fp=0xc0003fa7c8 sp=0xc0003fa738 pc=0xd552ca9
runtime.gcBgMarkStartWorkers.gowrap1()
	runtime/mgc.go:1328 +0x25 fp=0xc0003fa7e0 sp=0xc0003fa7c8 pc=0xd552b85
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0003fa7e8 sp=0xc0003fa7e0 pc=0xd5b2ec1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1328 +0x105

goroutine 29 gp=0xc0003f4a80 m=nil [GC worker (idle)]:
runtime.gopark(0x7b71811b837?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc0003faf38 sp=0xc0003faf18 pc=0xd5aa2ae
runtime.gcBgMarkWorker(0xc0001677a0)
	runtime/mgc.go:1412 +0xe9 fp=0xc0003fafc8 sp=0xc0003faf38 pc=0xd552ca9
runtime.gcBgMarkStartWorkers.gowrap1()
	runtime/mgc.go:1328 +0x25 fp=0xc0003fafe0 sp=0xc0003fafc8 pc=0xd552b85
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0003fafe8 sp=0xc0003fafe0 pc=0xd5b2ec1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1328 +0x105

goroutine 30 gp=0xc0003f4c40 m=nil [GC worker (idle)]:
runtime.gopark(0x7b718061326?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc0003fb738 sp=0xc0003fb718 pc=0xd5aa2ae
runtime.gcBgMarkWorker(0xc0001677a0)
	runtime/mgc.go:1412 +0xe9 fp=0xc0003fb7c8 sp=0xc0003fb738 pc=0xd552ca9
runtime.gcBgMarkStartWorkers.gowrap1()
	runtime/mgc.go:1328 +0x25 fp=0xc0003fb7e0 sp=0xc0003fb7c8 pc=0xd552b85
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0003fb7e8 sp=0xc0003fb7e0 pc=0xd5b2ec1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1328 +0x105

goroutine 31 gp=0xc0003f5180 m=nil [GC worker (idle)]:
runtime.gopark(0x7b71811c102?, 0x0?, 0x0?, 0x0?, 0x0?)
	runtime/proc.go:424 +0xce fp=0xc000081f38 sp=0xc000081f18 pc=0xd5aa2ae
runtime.gcBgMarkWorker(0xc0001677a0)
	runtime/mgc.go:1412 +0xe9 fp=0xc000081fc8 sp=0xc000081f38 pc=0xd552ca9
runtime.gcBgMarkStartWorkers.gowrap1()
	runtime/mgc.go:1328 +0x25 fp=0xc000081fe0 sp=0xc000081fc8 pc=0xd552b85
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc000081fe8 sp=0xc000081fe0 pc=0xd5b2ec1
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1328 +0x105

goroutine 32 gp=0xc0003f5340 m=4 mp=0xc000077808 [syscall]:
runtime.sigNoteSleep(0xc000360010?)
	runtime/os_darwin.go:132 +0x18 fp=0xc0003f97a0 sp=0xc0003f9768 pc=0xd56ddf8
os/signal.signal_recv()
	runtime/sigqueue.go:149 +0x25 fp=0xc0003f97c0 sp=0xc0003f97a0 pc=0xd5ac405
os/signal.loop()
	os/signal/signal_unix.go:23 +0x13 fp=0xc0003f97e0 sp=0xc0003f97c0 pc=0xd696ef3
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0003f97e8 sp=0xc0003f97e0 pc=0xd5b2ec1
created by os/signal.Notify.func1.1 in goroutine 1
	os/signal/signal.go:151 +0x1f

goroutine 36 gp=0xc0003f56c0 m=nil [select, locked to thread]:
runtime.gopark(0xc0003fbfa8?, 0x2?, 0xb0?, 0xbe?, 0xc0003fbf98?)
	runtime/proc.go:424 +0xce fp=0xc0003fbe38 sp=0xc0003fbe18 pc=0xd5aa2ae
runtime.selectgo(0xc0003fbfa8, 0xc0003fbf94, 0x0?, 0x0, 0x0?, 0x1)
	runtime/select.go:335 +0x7a5 fp=0xc0003fbf60 sp=0xc0003fbe38 pc=0xd585fc5
runtime.ensureSigM.func1()
	runtime/signal_unix.go:1077 +0x16f fp=0xc0003fbfe0 sp=0xc0003fbf60 pc=0xd5a1b0f
runtime.goexit({})
	runtime/asm_amd64.s:1700 +0x1 fp=0xc0003fbfe8 sp=0xc0003fbfe0 pc=0xd5b2ec1
created by runtime.ensureSigM in goroutine 1
	runtime/signal_unix.go:1060 +0xc8
@lxp0gb lxp0gb added the bug Something isn't working label Dec 23, 2024
@lxp0gb
Copy link
Author

lxp0gb commented Dec 25, 2024

Test with latest alpha core <Mihomo Meta alpha-72a126e darwin amd64 with go1.23.4 Wed Dec 25 02:40:06 UTC 2024>, come up with the fatal error and runtime stack log, see attached log files.
curl output.txt
mihomo core log.txt

@lxp0gb lxp0gb closed this as completed Dec 25, 2024
@lxp0gb
Copy link
Author

lxp0gb commented Dec 25, 2024

Sorry guys, update test result with alpha 72a126e, but close by mistake, so reopen it.

@wwqgtxx
Copy link
Collaborator

wwqgtxx commented Dec 31, 2024

fixed: 368b1e1

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

2 participants