[GH-ISSUE #502] panic: send on closed channel #383

Closed
opened 2026-05-05 12:11:53 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @terry-fei on GitHub (Oct 30, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/502

What version of frp are you using (./frpc -v or ./frps -v)?
0.13

What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN="/usr/local/go/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/itman/gopath"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build283162280=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Configures you used:
frps.ini
vhost_http_port = 8080
bind_port = 7000

frpc.ini
[web01]
type = http
local_ip = 192.168.100.200
local_port = 8081
custom_domains = somedomain

Steps to reproduce the issue:
1.先断开客户端
2.请求相关域名
3.服务端有几率crash

Describe the results you received:
panic: send on closed channel

goroutine 233 [running]:
github.com/fatedier/frp/utils/vhost.(*VhostMuxer).handle(0xc420050aa0, 0xa7d820, 0xc4203b8c40)
/home/itman/gopath/src/github.com/fatedier/frp/utils/vhost/vhost.go:165 +0x4e3
created by github.com/fatedier/frp/utils/vhost.(*VhostMuxer).run
/home/itman/gopath/src/github.com/fatedier/frp/utils/vhost/vhost.go:117 +0x73

Originally created by @terry-fei on GitHub (Oct 30, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/502 **What version of frp are you using (./frpc -v or ./frps -v)?** 0.13 **What operating system and processor architecture are you using (`go env`)?** GOARCH="amd64" GOBIN="/usr/local/go/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/itman/gopath" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build283162280=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" **Configures you used:** frps.ini vhost_http_port = 8080 bind_port = 7000 frpc.ini [web01] type = http local_ip = 192.168.100.200 local_port = 8081 custom_domains = somedomain **Steps to reproduce the issue:** 1.先断开客户端 2.请求相关域名 3.服务端有几率crash **Describe the results you received:** panic: send on closed channel goroutine 233 [running]: github.com/fatedier/frp/utils/vhost.(*VhostMuxer).handle(0xc420050aa0, 0xa7d820, 0xc4203b8c40) /home/itman/gopath/src/github.com/fatedier/frp/utils/vhost/vhost.go:165 +0x4e3 created by github.com/fatedier/frp/utils/vhost.(*VhostMuxer).run /home/itman/gopath/src/github.com/fatedier/frp/utils/vhost/vhost.go:117 +0x73
gitea-mirror 2026-05-05 12:11:53 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@fatedier commented on GitHub (Oct 30, 2017):

错误日志方便多贴一些吗?

<!-- gh-comment-id:340463578 --> @fatedier commented on GitHub (Oct 30, 2017): 错误日志方便多贴一些吗?
Author
Owner

@terry-fei commented on GitHub (Oct 30, 2017):

服务器报的只有这些信息,还有一个很严重的问题,就是http代理,开启一段时间就会断开

2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24949: i/o timeout
2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24944: i/o timeout
2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24948: i/o timeout
2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24946: i/o timeout
2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:40:47 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:40:47 [W] [vhost.go:129] get hostname from http/https request error: EOF
2017/10/30 06:41:37 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:22350: i/o timeout
2017/10/30 06:41:37 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:22351: i/o timeout

只要出现这个信息,就必须重启了,不然永远访问不了

<!-- gh-comment-id:340475144 --> @terry-fei commented on GitHub (Oct 30, 2017): 服务器报的只有这些信息,还有一个很严重的问题,就是http代理,开启一段时间就会断开 ``` 2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:34:38 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24949: i/o timeout 2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24944: i/o timeout 2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24948: i/o timeout 2017/10/30 06:34:43 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:24946: i/o timeout 2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:39:24 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:40:47 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:40:47 [W] [vhost.go:129] get hostname from http/https request error: EOF 2017/10/30 06:41:37 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:22350: i/o timeout 2017/10/30 06:41:37 [W] [vhost.go:129] get hostname from http/https request error: read tcp 39.107.12.147:8080->218.10.128.61:22351: i/o timeout ``` 只要出现这个信息,就必须重启了,不然永远访问不了
Author
Owner

@fatedier commented on GitHub (Oct 31, 2017):

不同的问题可以另开一个 issue,前面的问题我需要看一下。

<!-- gh-comment-id:340635926 --> @fatedier commented on GitHub (Oct 31, 2017): 不同的问题可以另开一个 issue,前面的问题我需要看一下。
Author
Owner

@fatedier commented on GitHub (Nov 1, 2017):

定位到问题了,已 fix。

<!-- gh-comment-id:340963936 --> @fatedier commented on GitHub (Nov 1, 2017): 定位到问题了,已 fix。
Author
Owner

@terry-fei commented on GitHub (Nov 1, 2017):

👍

<!-- gh-comment-id:340970682 --> @terry-fei commented on GitHub (Nov 1, 2017): 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#383
No description provided.