[GH-ISSUE #4516] frpc will crash about every 3 days #3568

Closed
opened 2026-05-05 14:17:37 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @Hanmo123 on GitHub (Oct 27, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4516

Bug Description

I have an frpc instance that proxies about 100 ports and another instance that proxies only `22, the latter is stable but the former has crashed for serveral times

frpc Version

0.60.0

frps Version

0.60.0

System Architecture

linux/amd64

Configurations

serverAddr = ""
serverPort = 7000

[auth]
method = "token"
token = ""

[[proxies]]
name = "ikuai"
type = "tcp"
localIP = "172.16.0.2"
localPort = 80
remotePort = 8067

{{- range $_, $v := parseNumberRangePair "10000-10099" "10000-10099" }}
[[proxies]]
name = "ikuai-{{ $v.First }}"
type = "tcp"
localIP = "172.16.0.2"
localPort = {{ $v.First }}
remotePort = {{ $v.Second }}
{{- end }}

Logs

fatal error: all goroutines are asleep - deadlock!                                                               
                                                                                                                 
goroutine 1 [chan receive, 693 minutes]:                                                                         
github.com/fatedier/frp/client.(*Service).Run(0xc0003187e0, {0xd5b980?, 0x12336c0?})                             
        github.com/fatedier/frp/client/service.go:191 +0x1bf                                                     
github.com/fatedier/frp/cmd/frpc/sub.startService(0xc00030b8c8, {0xc00019d608, 0x65, 0x8f}, {0x12336c0, 0x0, 0x0}
, {0x7ffc3ec09e0d, 0xe})                                                                                         
        github.com/fatedier/frp/cmd/frpc/sub/root.go:160 +0x357                                                  
github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffc3ec09e0d, 0xe})                                            
        github.com/fatedier/frp/cmd/frpc/sub/root.go:130 +0x185                                                  
github.com/fatedier/frp/cmd/frpc/sub.init.func2(0xc0001dda00?, {0xba70b6?, 0x4?, 0xba70ba?})                     
        github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x3e                                                    
github.com/spf13/cobra.(*Command).execute(0x11c78e0, {0xc000034130, 0x2, 0x2})                                   
        github.com/spf13/cobra@v1.8.0/command.go:983 +0xaca                                                      
github.com/spf13/cobra.(*Command).ExecuteC(0x11c78e0)                                                            
        github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff                                                     
github.com/spf13/cobra.(*Command).Execute(...)                                                                   
        github.com/spf13/cobra@v1.8.0/command.go:1039                                                            
github.com/fatedier/frp/cmd/frpc/sub.Execute()                                                                   
        github.com/fatedier/frp/cmd/frpc/sub/root.go:101 +0x31                                                   
main.main()                                                                                                      
        github.com/fatedier/frp/cmd/frpc/main.go:25 +0xf                                                         
                                                                                                                 
goroutine 6 [select, 693 minutes]:                                                                               
github.com/xtaci/kcp-go/v5.(*TimedSched).sched(0xc0000ee5a0)                                                     
        github.com/xtaci/kcp-go/v5@v5.6.13/timedsched.go:90 +0x109                                               
created by github.com/xtaci/kcp-go/v5.NewTimedSched in goroutine 1                                               
        github.com/xtaci/kcp-go/v5@v5.6.13/timedsched.go:78 +0xeb                                                

...

goroutine 56 [chan send]:                                                                                        
github.com/fatedier/frp/pkg/transport.(*transporterImpl).Send.func1()                          
        github.com/fatedier/frp/pkg/transport/message.go:57 +0x1e
github.com/fatedier/golib/errors.PanicToError(0x410130?)                                      
        github.com/fatedier/golib@v0.5.0/errors/errors.go:28 +0x57     
github.com/fatedier/frp/pkg/transport.(*transporterImpl).Send(0x0?, {0xa9b800?, 0xc0004166a0?})
        github.com/fatedier/frp/pkg/transport/message.go:56 +0x49
github.com/fatedier/frp/client/proxy.(*Manager).HandleEvent(0x10?, {0xaa05c0?, 0xc000486330?})
        github.com/fatedier/frp/client/proxy/proxy_manager.go:110 +0x7a 
github.com/fatedier/frp/client/proxy.(*Wrapper).close(...)         
        github.com/fatedier/frp/client/proxy/proxy_wrapper.go:177     
github.com/fatedier/frp/client/proxy.(*Wrapper).Stop(0xc000552ea0)
        github.com/fatedier/frp/client/proxy/proxy_wrapper.go:173 +0x151
github.com/fatedier/frp/client/proxy.(*Manager).Close(0xc00046f440)    
        github.com/fatedier/frp/client/proxy/proxy_manager.go:83 +0xbf
github.com/fatedier/frp/client.(*Control).worker(0xc00046f200)
        github.com/fatedier/frp/client/control.go:281 +0xd3
created by github.com/fatedier/frp/client.(*Control).Run in goroutine 1      
        github.com/fatedier/frp/client/control.go:108 +0x76
                                                                                                                 
goroutine 190 [chan receive, 693 minutes]:                                                                       
github.com/fatedier/frp/client.(*Service).keepControllerWorking(0xc0003187e0)
        github.com/fatedier/frp/client/service.go:197 +0x34
created by github.com/fatedier/frp/client.(*Service).Run in goroutine 1
        github.com/fatedier/frp/client/service.go:189 +0x19f

Steps to reproduce

I am not sure.
In my server, i need just wait...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @Hanmo123 on GitHub (Oct 27, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4516 ### Bug Description I have an frpc instance that proxies about 100 ports and another instance that proxies only `22, the latter is stable but the former has crashed for serveral times ### frpc Version 0.60.0 ### frps Version 0.60.0 ### System Architecture linux/amd64 ### Configurations ``` serverAddr = "" serverPort = 7000 [auth] method = "token" token = "" [[proxies]] name = "ikuai" type = "tcp" localIP = "172.16.0.2" localPort = 80 remotePort = 8067 {{- range $_, $v := parseNumberRangePair "10000-10099" "10000-10099" }} [[proxies]] name = "ikuai-{{ $v.First }}" type = "tcp" localIP = "172.16.0.2" localPort = {{ $v.First }} remotePort = {{ $v.Second }} {{- end }} ``` ### Logs ``` fatal error: all goroutines are asleep - deadlock! goroutine 1 [chan receive, 693 minutes]: github.com/fatedier/frp/client.(*Service).Run(0xc0003187e0, {0xd5b980?, 0x12336c0?}) github.com/fatedier/frp/client/service.go:191 +0x1bf github.com/fatedier/frp/cmd/frpc/sub.startService(0xc00030b8c8, {0xc00019d608, 0x65, 0x8f}, {0x12336c0, 0x0, 0x0} , {0x7ffc3ec09e0d, 0xe}) github.com/fatedier/frp/cmd/frpc/sub/root.go:160 +0x357 github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffc3ec09e0d, 0xe}) github.com/fatedier/frp/cmd/frpc/sub/root.go:130 +0x185 github.com/fatedier/frp/cmd/frpc/sub.init.func2(0xc0001dda00?, {0xba70b6?, 0x4?, 0xba70ba?}) github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x3e github.com/spf13/cobra.(*Command).execute(0x11c78e0, {0xc000034130, 0x2, 0x2}) github.com/spf13/cobra@v1.8.0/command.go:983 +0xaca github.com/spf13/cobra.(*Command).ExecuteC(0x11c78e0) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x3ff github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 github.com/fatedier/frp/cmd/frpc/sub.Execute() github.com/fatedier/frp/cmd/frpc/sub/root.go:101 +0x31 main.main() github.com/fatedier/frp/cmd/frpc/main.go:25 +0xf goroutine 6 [select, 693 minutes]: github.com/xtaci/kcp-go/v5.(*TimedSched).sched(0xc0000ee5a0) github.com/xtaci/kcp-go/v5@v5.6.13/timedsched.go:90 +0x109 created by github.com/xtaci/kcp-go/v5.NewTimedSched in goroutine 1 github.com/xtaci/kcp-go/v5@v5.6.13/timedsched.go:78 +0xeb ... goroutine 56 [chan send]: github.com/fatedier/frp/pkg/transport.(*transporterImpl).Send.func1() github.com/fatedier/frp/pkg/transport/message.go:57 +0x1e github.com/fatedier/golib/errors.PanicToError(0x410130?) github.com/fatedier/golib@v0.5.0/errors/errors.go:28 +0x57 github.com/fatedier/frp/pkg/transport.(*transporterImpl).Send(0x0?, {0xa9b800?, 0xc0004166a0?}) github.com/fatedier/frp/pkg/transport/message.go:56 +0x49 github.com/fatedier/frp/client/proxy.(*Manager).HandleEvent(0x10?, {0xaa05c0?, 0xc000486330?}) github.com/fatedier/frp/client/proxy/proxy_manager.go:110 +0x7a github.com/fatedier/frp/client/proxy.(*Wrapper).close(...) github.com/fatedier/frp/client/proxy/proxy_wrapper.go:177 github.com/fatedier/frp/client/proxy.(*Wrapper).Stop(0xc000552ea0) github.com/fatedier/frp/client/proxy/proxy_wrapper.go:173 +0x151 github.com/fatedier/frp/client/proxy.(*Manager).Close(0xc00046f440) github.com/fatedier/frp/client/proxy/proxy_manager.go:83 +0xbf github.com/fatedier/frp/client.(*Control).worker(0xc00046f200) github.com/fatedier/frp/client/control.go:281 +0xd3 created by github.com/fatedier/frp/client.(*Control).Run in goroutine 1 github.com/fatedier/frp/client/control.go:108 +0x76 goroutine 190 [chan receive, 693 minutes]: github.com/fatedier/frp/client.(*Service).keepControllerWorking(0xc0003187e0) github.com/fatedier/frp/client/service.go:197 +0x34 created by github.com/fatedier/frp/client.(*Service).Run in goroutine 1 github.com/fatedier/frp/client/service.go:189 +0x19f ``` ### Steps to reproduce I am not sure. In my server, i need just wait... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [X] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:17:37 -06:00
Author
Owner

@fatedier commented on GitHub (Oct 28, 2024):

Can you test it without KCP enabled?

<!-- gh-comment-id:2440602249 --> @fatedier commented on GitHub (Oct 28, 2024): Can you test it without KCP enabled?
Author
Owner

@Hanmo123 commented on GitHub (Oct 28, 2024):

I did not enable KCP manually in my server(and i dont know how to disable it, i tried the method below but it does not work), the OS is ProxmoxVE-8.0.3(based on debian 11).

image

<!-- gh-comment-id:2440619747 --> @Hanmo123 commented on GitHub (Oct 28, 2024): I did not enable KCP manually in my server(and i dont know how to disable it, i tried the method below but it does not work), the OS is ProxmoxVE-8.0.3(based on debian 11). ![image](https://github.com/user-attachments/assets/1f59bb19-c03c-4a36-b66d-6c0eee716d92)
Author
Owner

@fatedier commented on GitHub (Oct 28, 2024):

Search in your frp configuration file?

<!-- gh-comment-id:2440630087 --> @fatedier commented on GitHub (Oct 28, 2024): Search in your frp configuration file?
Author
Owner

@fatedier commented on GitHub (Oct 28, 2024):

Maybe it's not relevant, just ignore it for now.

<!-- gh-comment-id:2440649410 --> @fatedier commented on GitHub (Oct 28, 2024): Maybe it's not relevant, just ignore it for now.
Author
Owner

@fatedier commented on GitHub (Oct 28, 2024):

Is there a log before the fatal error? Were there any changes to the system, network, etc. before the crash?

<!-- gh-comment-id:2440652909 --> @fatedier commented on GitHub (Oct 28, 2024): Is there a log before the `fatal error`? Were there any changes to the system, network, etc. before the crash?
Author
Owner

@Hanmo123 commented on GitHub (Oct 28, 2024):

It's my first time I've used frp in this server.
But as i mentioned in the issue body, i started another frpc instance, which is stable:

serverAddr = ""
serverPort = 7000

[auth]
method = "token"
token = ""

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 2222

[[proxies]]
name = "pve"
type = "tcp"
localIP = "127.0.0.1"
localPort = 8006
remotePort = 8066

(both instances use the same frps)

<!-- gh-comment-id:2440680725 --> @Hanmo123 commented on GitHub (Oct 28, 2024): It's my first time I've used frp in this server. But as i mentioned in the issue body, i started another frpc instance, which is stable: ``` serverAddr = "" serverPort = 7000 [auth] method = "token" token = "" [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 2222 [[proxies]] name = "pve" type = "tcp" localIP = "127.0.0.1" localPort = 8006 remotePort = 8066 ``` (both instances use the same frps)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 21, 2024):

Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:2489824987 --> @github-actions[bot] commented on GitHub (Nov 21, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3568
No description provided.