mihomo icon indicating copy to clipboard operation
mihomo copied to clipboard

[Bug] DoH HTTP Transport inner panic

Open Skyxim opened this issue 2 years ago • 2 comments

Verify steps

  • [X] 确保你使用的是本仓库最新的的 clash 或 clash Alpha 版本 Ensure you are using the latest version of Clash or Clash Premium from this repository.
  • [X] 如果你可以自己 debug 并解决的话,提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
  • [X] 我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
  • [X] 我已经使用 Alpha 分支版本测试过,问题依旧存在 I have tested using the dev branch, and the issue still exists.
  • [X] 我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
  • [X] 这是 Clash 核心的问题,并非我所使用的 Clash 衍生版本(如 OpenClash、KoolClash 等)的特定问题 This is an issue of the Clash core per se, not to the derivatives of Clash, like OpenClash or KoolClash.

Clash version

alpha-g984bf27

What OS are you seeing the problem on?

Linux

Clash config

dns:
perfer-h3: true
nameserver:
- https://dns.alidns.com/query
- https://doh.pub/query

Clash log

github.com/Dreamacro/clash/common/picker/picker.go:64 +0xa0
created by github.com/Dreamacro/clash/common/picker.(*Picker[...]).Go
 github.com/Dreamacro/clash/common/picker/picker.go:67 +0x70
github.com/Dreamacro/clash/common/picker.(*Picker[...]).Go.func1()
 github.com/Dreamacro/clash/dns/util.go:271 +0xe4
github.com/Dreamacro/clash/dns.batchExchange.func1()
 github.com/Dreamacro/clash/dns/doh.go:134 +0x150
github.com/Dreamacro/clash/dns.(*dnsOverHTTPS).ExchangeContext(0xf2bfb0?, {0x1114278, 0x400106b450}, 0x0?)
 github.com/Dreamacro/clash/dns/doh.go:192
github.com/Dreamacro/clash/dns.(*dnsOverHTTPS).exchangeHTTPS(...)
 github.com/Dreamacro/clash/dns/doh.go:225 +0x364
github.com/Dreamacro/clash/dns.(*dnsOverHTTPS).exchangeHTTPSClient(0x4000108380, {0x1114278, 0x400106b450}, 0x4000d14390, 0x4003047da8)
 net/http/client.go:582
net/http.(*Client).Do(...)
 net/http/client.go:716 +0x6dc
net/http.(*Client).do(0x4000d14390, 0x4001025700)
 net/http/client.go:176 +0x98
net/http.(*Client).send(0x4000d14390, 0x4001025700, {0x40030c89c8?, 0x1c184?, 0x1a8c4c0?})
 net/http/client.go:252 +0x4d8
net/http.send(0x4001025700, {0x1106480, 0x400081d540}, {0x296c6c?, 0x8?, 0x1a8c4c0?})
 net/http/roundtrip.go:17 +0x1c
net/http.(*Transport).RoundTrip(0x4001025800?, 0x1106480?)
 net/http/transport.go:613 +0x724
net/http.(*Transport).roundTrip(0x400081d540, 0x4001025800)
 net/http/transport.go:1482 +0x3d4
net/http.(*Transport).decConnsPerHost(0x400081d540, {{0x0, 0x0}, {0x40027126c0, 0x5}, {0x40029c0b70, 0xb}, 0x0})
goroutine 767232 [running]:
panic: net/http: internal error: connCount underflow


### Description

无

Skyxim avatar May 23 '23 02:05 Skyxim

遇到了类似情况:

panic: net/http: internal error: connCount underflow

goroutine 10940 [running]:
net/http.(*Transport).decConnsPerHost(0x140006e5680, {{0x0, 0x0}, {0x140024c9080, 0x5}, {0x14003b0b0e0, 0xb}, 0x0})
	net/http/transport.go:1482 +0x3e4
net/http.(*Transport).dialConnFor(0x0?, 0x140004240b0)
	net/http/transport.go:1465 +0x114
created by net/http.(*Transport).decConnsPerHost
	net/http/transport.go:1494 +0x2e4

athenakia avatar Oct 21 '23 09:10 athenakia

这边也遇到了类似情况

StalinCCCP avatar Jan 19 '25 06:01 StalinCCCP