platinasystems / go

Other
9 stars 68 forks source link

xeth.gorx(): rxbuf null after 'goes restart' (fixme) #151

Open sandeep-dutta opened 5 years ago

sandeep-dutta commented 5 years ago

The issue is reproducible on the following goes & kernel version Goes version

root@invader29:/home/sandeep# goes vnetd -version fe1: v1.1.3 fe1a: v1.1.0 vnet-platina-mk1: v1.0.0

Kernel version

root@invader29:/home/sandeep# dpkg --list |grep kernel ii linux-image-4.13-platina-mk1 4.13-165-gbf3b5fef4591 amd64 Linux kernel, version 4.13-platina-mk1

When goes is restarted the below logs have been observed under /var/log/syslog

Jan 11 01:11:08 debian goes.vnetd[29200]: panic: runtime error: invalid memory address or nil pointer dereference Jan 11 01:11:08 debian goes.vnetd[29200]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5ab277] Jan 11 01:11:08 debian goes.vnetd[29200]: Jan 11 01:11:08 debian goes.vnetd[29200]: goroutine 7 [running]: Jan 11 01:11:08 debian goes.vnetd[29200]: net.(*UnixConn).ReadMsgUnix(0x0, 0xc0002b8000, 0x1000, 0x2600, 0xc0002ba600, 0x1000, 0x2600, 0x0, 0x0, 0x0, ...) Jan 11 01:11:08 debian goes.vnetd[29200]: /usr/local/go/src/net/unixsock.go:137 +0x37 Jan 11 01:11:08 debian goes.vnetd[29200]: github.com/platinasystems/xeth.gorx() Jan 11 01:11:08 debian goes.vnetd[29200]: /home/fyang/gopath/pkg/mod/github.com/platinasystems/xeth@v1.1.1/xeth.go:277 +0x280 Jan 11 01:11:08 debian goes.vnetd[29200]: created by github.com/platinasystems/xeth.Start Jan 11 01:11:08 debian goes.vnetd[29200]: /home/fyang/gopath/pkg/mod/github.com/platinasystems/xeth@v1.1.1/xeth.go:80 +0x256 Jan 11 01:11:08 debian goes.vnetd[29200]: exit status 2 Jan 11 01:11:12 debian goes.goes-daemons[29189]: done Jan 11 01:11:15 debian kernel: ixgbe 0000:03:00.0 eth1: NIC Link is Down Jan 11 01:11:15 debian kernel: ixgbe 0000:03:00.1 eth2: NIC Link is Down Jan 11 01:11:16 debian kernel: vfio-pci 0000:04:00.0: enabling device (0000 -> 0002) Jan 11 01:11:16 debian kernel: vfio-pci 0000:04:00.1: enabling device (0000 -> 0002) Jan 11 01:11:16 debian kernel: ixgbe 0000:03:00.0 eth1: NIC Link is Up 10 Gbps, Flow Control: RX/TX Jan 11 01:11:16 debian kernel: ixgbe 0000:03:00.1 eth2: NIC Link is Up 10 Gbps, Flow Control: RX/TX Jan 11 01:11:18 debian vnet-platina-mk1.vnet-platina-mk1[3203]: hget timeout: ERROR vnet.xeth2-1.speed: not found in platina-mk1 Jan 11 01:11:19 debian vnet-platina-mk1.vnet-platina-mk1[3203]: port 2 installed: Id: QSFP+, Compliance: 40G CR, Vendor: Fiberstore, Part Number QSFP-40G-DAC, Revision 0x41200305, Serial F07A2700037-1, Date 171120, Connector Type: No separable connector

This issue happens when we try to reload platina-mk1 module along with goes restart cmd.

rmmod platina-mk1 modprobe platina-mk1 provision=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ifdown -a --allow vnet ifup -a --allow vnet goes restart

sandeep-dutta commented 5 years ago

Attaching interface file for i-29 i29.interface.file.txt

sandeep-dutta commented 5 years ago

Issue does not exists while testing it with following goes, vnet & kernel binary

root@invader32:/home/sandeep# goes version v1.2.0-rc0 root@invader32:/home/sandeep# /usr/lib/goes/vnet-platina-mk1 version v1.1.0-rc.1 root@invader32:/home/sandeep# goes buildid /usr/lib/goes/vnet-platina-mk1 eQbZHEqYVlnmtWg0rrKX/_cijUVtjaoWW0ZN_kgAz/_5ZIdktEtT_Dai_3w3a2/k2VXo_jt1ILdYOQ0PRmS root@invader32:/home/sandeep# goes show buildid rjjzZZPY2SyOfms-m8NL/XXErNxVo98mT02g8UeoY/mw8GUUKjp5fm_q3k9Sm4/ZelNo7fcJcfUwSNDot7N

root@invader32:/home/sandeep# dpkg --list |grep kernel

ii linux-image-4.18.9-platina-mk1 4.18.9-186-g45aa046d8b3d amd64 Linux kernel, version 4.18.9-platina-mk1