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

frpc will crash about every 3 days #4516

Open
1 of 11 tasks
Hanmo123 opened this issue Oct 27, 2024 · 6 comments
Open
1 of 11 tasks

frpc will crash about every 3 days #4516

Hanmo123 opened this issue Oct 27, 2024 · 6 comments

Comments

@Hanmo123
Copy link

Hanmo123 commented Oct 27, 2024

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/[email protected]/command.go:983 +0xaca                                                      
github.com/spf13/cobra.(*Command).ExecuteC(0x11c78e0)                                                            
        github.com/spf13/[email protected]/command.go:1115 +0x3ff                                                     
github.com/spf13/cobra.(*Command).Execute(...)                                                                   
        github.com/spf13/[email protected]/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/[email protected]/timedsched.go:90 +0x109                                               
created by github.com/xtaci/kcp-go/v5.NewTimedSched in goroutine 1                                               
        github.com/xtaci/kcp-go/[email protected]/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/[email protected]/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
@fatedier
Copy link
Owner

Can you test it without KCP enabled?

@Hanmo123
Copy link
Author

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

@fatedier
Copy link
Owner

Search in your frp configuration file?

@fatedier
Copy link
Owner

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

@fatedier
Copy link
Owner

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

@Hanmo123
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants