arduino-create-agent icon indicating copy to clipboard operation
arduino-create-agent copied to clipboard

agent SIGSEGV panic without ipv6

Open bevand10 opened this issue 4 years ago • 1 comments

For various reasons, we have ipv6 disabled on our Ubuntu 18.04 LTS hosts.

I think it's the cause of this fatal panic?

INFO[0000] Version:1.1.251                              
INFO[0000] Hostname: bevand10-HP-EliteBook-840-G3       
INFO[0000] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0000] You specified a serial port regular expression filter: usb|acm|com 
INFO[0000] Your serial ports:                           
INFO[0000] 	{/dev/ttyUSB0    0x6001 0x0403 955A36978B false} 
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /                         --> main.homeHandler (2 handlers)
[GIN-debug] GET    /certificate.crt          --> main.certHandler (2 handlers)
[GIN-debug] DELETE /certificate.crt          --> main.deleteCertHandler (2 handlers)
[GIN-debug] POST   /upload                   --> main.uploadHandler (2 handlers)
[GIN-debug] GET    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] POST   /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WS     /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] WSS    /socket.io/               --> main.(*WsServer).ServeHTTP-fm (2 handlers)
[GIN-debug] GET    /info                     --> main.infoHandler (2 handlers)
[GIN-debug] POST   /killbrowser              --> main.killBrowserHandler (2 handlers)
[GIN-debug] POST   /pause                    --> main.pauseHandler (2 handlers)
[GIN-debug] POST   /update                   --> main.updateHandler (2 handlers)
[GIN-debug] GET    /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] POST   /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] PUT    /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] PATCH  /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] HEAD   /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] OPTIONS /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] DELETE /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] CONNECT /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] TRACE  /v2/*path                 --> github.com/arduino/arduino-create-agent/vendor/github.com/gin-gonic/gin.WrapH.func1 (2 handlers)
[GIN-debug] Listening and serving HTTP on 127.0.0.1:8991
[ERR] bonjour: Failed to bind to udp6 port: listen udp6 [ff02::]:5353: socket: address family not supported by protocol
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9f544d]

goroutine 21 [running]:
net.(*conn).ok(...)
	/home/jenkins/go-latest/src/net/net.go:168
net.(*UDPConn).SyscallConn(...)
	/home/jenkins/go-latest/src/net/udpsock.go:98
github.com/arduino/arduino-create-agent/vendor/golang.org/x/net/internal/socket.NewConn(0xe31d60, 0x0, 0x0, 0xe31d60, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/vendor/golang.org/x/net/internal/socket/rawconn.go:32 +0x9d
github.com/arduino/arduino-create-agent/vendor/golang.org/x/net/ipv6.NewPacketConn(0xe31100, 0x0, 0xc0001bc0a0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/vendor/golang.org/x/net/ipv6/endpoint.go:121 +0x5d
github.com/arduino/arduino-create-agent/vendor/github.com/oleksandr/bonjour.newClient(0x0, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/vendor/github.com/oleksandr/bonjour/client.go:100 +0x1b6
github.com/arduino/arduino-create-agent/vendor/github.com/oleksandr/bonjour.NewResolver(0x0, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/vendor/github.com/oleksandr/bonjour/client.go:23 +0x2f
main.getPorts(0x0, 0x0, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/discovery.go:111 +0x3c
main.GetNetworkList(0x0, 0x0, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/discovery.go:49 +0x34
main.GetList(0x1, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/seriallist.go:28 +0x8d5
main.spListDual(0xc0001dcc01)
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/serial.go:146 +0x42
main.discoverLoop.func2()
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/serial.go:137 +0x26
created by main.discoverLoop
	/home/jenkins/workspace/Create_agent_master/src/github.com/arduino/arduino-create-agent/serial.go:135 +0xce

bevand10 avatar Sep 30 '20 21:09 bevand10

Hi, Could you please try if the problem persists with the latest version 1.2.0.

Also could you please provide the steps to reproduce your network configuration? Thanks :love_letter:

umbynos avatar Jan 22 '21 10:01 umbynos