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

Segmentation fault when enabling sticky host #1610

Closed
aouinizied opened this issue Dec 18, 2017 · 4 comments
Closed

Segmentation fault when enabling sticky host #1610

aouinizied opened this issue Dec 18, 2017 · 4 comments
Labels

Comments

@aouinizied
Copy link

Using ntopng version
v.3.2.171218 [Enterprise/Professional build]
GIT rev: 3.2-stable:36b231667fa7770c1463ad9f0acf8858acbdc798:20171218
Pro rev: r1279
Built on: Ubuntu 16.04.3 LTS
System Id: 877FE07F9206AAF2
Platform: x86_64
Edition: Enterprise
License Type: Demo
Validity: Until Mon Dec 18 17:15:57 2017
On Ubuntu: 4.10.0-42-generic
Starting ntopng using: sudo ntopng -i enp0s25 --community -v 2 -S local -n 1
Output:
18/Dec/2017 17:04:23 [Ntop.cpp:1485] Setting local networks to 127.0.0.0/8
18/Dec/2017 17:04:23 [Redis.cpp:111] Successfully connected to redis 127.0.0.1:6379@0
18/Dec/2017 17:04:23 [Redis.cpp:111] Successfully connected to redis 127.0.0.1:6379@0
18/Dec/2017 17:04:28 [PcapInterface.cpp:88] Reading packets from interface enp0s25...
18/Dec/2017 17:04:28 [Ntop.cpp:1612] Registered interface enp0s25 [id: 0]
18/Dec/2017 17:04:28 [main.cpp:301] PID stored in file /var/run/ntopng.pid
18/Dec/2017 17:04:28 [HTTPserver.cpp:841] Please read https://github.com/ntop/ntopng/blob/dev/doc/README.SSL if you want to enable SSL.
18/Dec/2017 17:04:28 [Utils.cpp:457] User changed to nobody
18/Dec/2017 17:04:28 [HTTPserver.cpp:912] Web server dirs [/usr/share/ntopng/httpdocs][/usr/share/ntopng/scripts]
18/Dec/2017 17:04:28 [HTTPserver.cpp:915] HTTP server listening on port(s) 3000
18/Dec/2017 17:04:28 [main.cpp:383] Working directory: /var/tmp/ntopng
18/Dec/2017 17:04:28 [main.cpp:385] Scripts/HTML pages directory: /usr/share/ntopng
18/Dec/2017 17:04:28 [Ntop.cpp:385] Welcome to ntopng x86_64 v.3.2.171218 - (C) 1998-17 ntop.org
18/Dec/2017 17:04:28 [Ntop.cpp:395] Built on Ubuntu 16.04.3 LTS
18/Dec/2017 17:04:28 [Ntop.cpp:677] Adding xxxxx as IPv4 interface address for enp0s25
18/Dec/2017 17:04:28 [Ntop.cpp:685] Adding xxxxx as IPv4 local network for enp0s25
18/Dec/2017 17:04:28 [Ntop.cpp:704] Adding xxxx as IPv6 interface address for enp0s25
18/Dec/2017 17:04:28 [Ntop.cpp:713] Adding xxxxx as IPv6 local network for enp0s25
18/Dec/2017 17:04:28 [PeriodicActivities.cpp:59] Started periodic activities loop...
18/Dec/2017 17:04:28 [PeriodicActivities.cpp:100] Each periodic activity script will use 2 threads
18/Dec/2017 17:04:28 [NetworkInterface.cpp:2326] Started packet polling on interface enp0s25 [id: 0]...
Erreur de segmentation

I tried it without '-S' and it's working. Also, I tried sevral value of -S and stil get the seg fault.
Any Idea?

Best regards,

@emanuele-f
Copy link
Contributor

Hi, can you please run ntopng with gdb --args ntopng -i enp0s25 --community -v 2 -S local -n 1 and post a backtrace of the segmentation fault? You can do this with bt command from gdb, after the program crashes

@emanuele-f
Copy link
Contributor

Crash trace:

Thread 25 "ntopng" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffb97fa700 (LWP 15768)]
0x00005555555bbb5a in Mac::getDeviceType (this=0x0) at /home/emanuele/src/ntopng/include/Mac.h:103
103	  inline DeviceType getDeviceType()        { return (device_type); }
(gdb) bt
#0  0x00005555555bbb5a in Mac::getDeviceType() (this=0x0) at /home/emanuele/src/ntopng/include/Mac.h:103
#1  0x00005555555dd1fe in Flow::updateFlowShapers() (this=0x7fffb0001720) at src/Flow.cpp:2747
#2  0x00005555555d38b0 in Flow::setDetectedProtocol(ndpi_proto, bool) (this=0x7fffb0001720, proto_id=..., forceDetection=false) at src/Flow.cpp:468
#3  0x00005555555ea263 in NetworkInterface::processPacket(unsigned int, bool, timeval const*, unsigned long, ndpi_ethhdr*, unsigned short, ndpi_iphdr*, ndpi_ipv6hdr*, unsigned short, unsigned int, pcap_pkthdr const*, unsigned char const*, unsigned short*, Host**, Host**, Flow**) (this=0x555555a05bb0, bridge_iface_idx=1, ingressPacket=true, when=0x555556960100, packet_time=1514275062543, eth=0x555556960210, vlan_id=0, iph=0x55555696021e, ip6=0x0, ipsize=71, rawsize=85, h=0x555556960100, packet=0x555556960210 "\274\025\254\240\344\322\060R\313l\234\033\b", ndpiProtocol=0x7fffb97f9606, srcHost=0x7fffb97f9620, dstHost=0x7fffb97f9628, hostFlow=0x7fffb97f9630) at src/NetworkInterface.cpp:1632
#4  0x00005555555ec01d in NetworkInterface::dissectPacket(unsigned int, bool, unsigned char*, pcap_pkthdr const*, unsigned char const*, unsigned short*, Host**, Host**, Flow**) (this=0x555555a05bb0, bridge_iface_idx=1, ingressPacket=true, sender_mac=0x0, h=0x555556960100, packet=0x555556960210 "\274\025\254\240\344\322\060R\313l\234\033\b", ndpiProtocol=0x7fffb97f9606, srcHost=0x7fffb97f9620, dstHost=0x7fffb97f9628, flow=0x7fffb97f9630) at src/NetworkInterface.cpp:2167
#5  0x00005555555a84a8 in packetPollLoop(void*) (ptr=0x555555a05bb0) at src/PcapInterface.cpp:193
#6  0x00007ffff679b08a in start_thread () at /usr/lib/libpthread.so.0
#7  0x00007ffff397942f in clone () at /usr/lib/libc.so.6

@emanuele-f emanuele-f added the Bug label Dec 26, 2017
@emanuele-f
Copy link
Contributor

@aouinizied The above crash is fixed with commit df7a7c6 . A new package will be available in one hour. Please update and let me know.

@simonemainardi
Copy link
Contributor

as already pointed out issue has been fixed 10 days ago with commit df7a7c6 so it is safe to close the issue now.

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

No branches or pull requests

3 participants