Closed zhou88qiao closed 6 years ago
agent启动后segment fault, `panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6ad0f6]
goroutine 62 [running]: yulong-hids/agent/vendor/github.com/akrennmair/gopcap.sockaddr_to_IP(0x0, 0x0, 0x1, 0xc4203681e0, 0x0, 0x1) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:234 +0x26 yulong-hids/agent/vendor/github.com/akrennmair/gopcap.findalladdresses(0x7f88680021a0, 0x0, 0x0, 0x10) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:222 +0xbd yulong-hids/agent/vendor/github.com/akrennmair/gopcap.Findalldevs(0xc420020400, 0x9, 0x9, 0x0, 0x0) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:208 +0x1ec yulong-hids/agent/monitor.getPcapHandle(0xc420252120, 0xc, 0x0, 0x0, 0x0) /usr/local/go/src/yulong-hids/agent/monitor/lib.go:73 +0x37 yulong-hids/agent/monitor.StartNetSniff(0xc4200ca720) /usr/local/go/src/yulong-hids/agent/monitor/connection_linux.go:207 +0x4e created by yulong-hids/agent/client.(*Agent).monitor /usr/local/go/src/yulong-hids/agent/client/agent.go:209 +0x5c`
ifconfig结果 docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.2.1 netmask 255.255.255.0 broadcast 0.0.0.0 ether 02:42:84:0f:24:bb txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.89.101.12 netmask 255.255.255.128 broadcast 10.89.101.127 ether 24:6e:96:2c:9d:20 txqueuelen 1000 (Ethernet) RX packets 54826197140 bytes 17925574214592 (16.3 TiB) RX errors 0 dropped 37 overruns 0 frame 0 TX packets 54952405014 bytes 17911656172103 (16.2 TiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
flannel0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1472 inet 172.17.2.0 netmask 255.255.0.0 destination 172.17.2.0 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 260154 bytes 19102156 (18.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 14128613 bytes 895492725 (854.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14128613 bytes 895492725 (854.0 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
报错信息好像不太全...
agent启动后segment fault,
`panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6ad0f6]
goroutine 62 [running]: yulong-hids/agent/vendor/github.com/akrennmair/gopcap.sockaddr_to_IP(0x0, 0x0, 0x1, 0xc4203681e0, 0x0, 0x1) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:234 +0x26 yulong-hids/agent/vendor/github.com/akrennmair/gopcap.findalladdresses(0x7f88680021a0, 0x0, 0x0, 0x10) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:222 +0xbd yulong-hids/agent/vendor/github.com/akrennmair/gopcap.Findalldevs(0xc420020400, 0x9, 0x9, 0x0, 0x0) /usr/local/go/src/yulong-hids/agent/vendor/github.com/akrennmair/gopcap/pcap.go:208 +0x1ec yulong-hids/agent/monitor.getPcapHandle(0xc420252120, 0xc, 0x0, 0x0, 0x0) /usr/local/go/src/yulong-hids/agent/monitor/lib.go:73 +0x37 yulong-hids/agent/monitor.StartNetSniff(0xc4200ca720) /usr/local/go/src/yulong-hids/agent/monitor/connection_linux.go:207 +0x4e created by yulong-hids/agent/client.(*Agent).monitor /usr/local/go/src/yulong-hids/agent/client/agent.go:209 +0x5c`
ifconfig结果 docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.2.1 netmask 255.255.255.0 broadcast 0.0.0.0 ether 02:42:84:0f:24:bb txqueuelen 0 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.89.101.12 netmask 255.255.255.128 broadcast 10.89.101.127 ether 24:6e:96:2c:9d:20 txqueuelen 1000 (Ethernet) RX packets 54826197140 bytes 17925574214592 (16.3 TiB) RX errors 0 dropped 37 overruns 0 frame 0 TX packets 54952405014 bytes 17911656172103 (16.2 TiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
flannel0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1472 inet 172.17.2.0 netmask 255.255.0.0 destination 172.17.2.0 unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 260154 bytes 19102156 (18.2 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 loop txqueuelen 0 (Local Loopback) RX packets 14128613 bytes 895492725 (854.0 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 14128613 bytes 895492725 (854.0 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0