drone crashes in one of the ubuntu based Linux box

291 views
Skip to first unread message

Lucky

unread,
Jul 8, 2015, 5:04:04 AM7/8/15
to osti...@googlegroups.com

Hi,

Drone crashes when started, in one of the ubuntu based linux box :

# uname -a
Linux  3.14.0-rc8 #1 SMP Wed Jul 1 09:53:38 PDT 2015 x86_64 GNU/Linux

#lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie


# drone &
[1] 3158
root# Retrieving the device list from the local machine

0. eth0
cap file = /tmp/qt_temp.TJ3158
adding dev to all ports list <eth0>
1. any
 (Pseudo-device that captures on all interfaces)

cap file = /tmp/qt_temp.XM3158
adding dev to all ports list <any>
2. lo
cap file = /tmp/qt_temp.Lh3158
adding dev to all ports list <lo>
3. nflog
 (Linux netfilter log (NFLOG) interface)

Error setting direction(0) nflog: Setting direction is not implemented on this platform

PortMonitor: Error opening port nflog: nflog: Can't listen on group group index: Operation not permitted

PortTransmitter: Error opening port nflog: nflog: Can't listen on group group index: Operation not permitted

cap file = /tmp/qt_temp.nS3158
adding dev to all ports list <nflog>
PortManager: unable to open nflog. Skipping!
In ~LinuxPort
In ~PcapPort
3. nfqueue
 (Linux netfilter queue (NFQUEUE) interface)

Error setting direction(0) nfqueue: Setting direction is not implemented on this platform

PortMonitor: Error opening port nfqueue: nfqueue: Can't listen on group group index: Operation not permitted

PortTransmitter: Error opening port nfqueue: nfqueue: Can't listen on group group index: Operation not permitted

cap file = /tmp/qt_temp.kn3158
adding dev to all ports list <nfqueue>
PortManager: unable to open nfqueue. Skipping!
In ~LinuxPort
In ~PcapPort
3. usbmon1
 (USB bus number 1)

PortMonitor: Error opening port usbmon1: usbmon1: Can't open USB bus file /sys/kernel/debug/usbmon/1t: No such file or directory

PortMonitor: Error opening port usbmon1: usbmon1: Can't open USB bus file /sys/kernel/debug/usbmon/1t: No such file or directory

PortTransmitter: Error opening port usbmon1: usbmon1: Can't open USB bus file /sys/kernel/debug/usbmon/1t: No such file or directory

cap file = /tmp/qt_temp.Ti3158
adding dev to all ports list <usbmon1>
PortManager: unable to open usbmon1. Skipping!
In ~LinuxPort
In ~PcapPort
3. usbmon2
 (USB bus number 2)

PortMonitor: Error opening port usbmon2: usbmon2: Can't open USB bus file /sys/kernel/debug/usbmon/2t: No such file or directory

PortMonitor: Error opening port usbmon2: usbmon2: Can't open USB bus file /sys/kernel/debug/usbmon/2t: No such file or directory

PortTransmitter: Error opening port usbmon2: usbmon2: Can't open USB bus file /sys/kernel/debug/usbmon/2t: No such file or directory

cap file = /tmp/qt_temp.wZ3158
adding dev to all ports list <usbmon2>
PortManager: unable to open usbmon2. Skipping!
In ~LinuxPort
In ~PcapPort
3. usbmon3
 (USB bus number 3)

PortMonitor: Error opening port usbmon3: usbmon3: Can't open USB bus file /sys/kernel/debug/usbmon/3t: No such file or directory

PortMonitor: Error opening port usbmon3: usbmon3: Can't open USB bus file /sys/kernel/debug/usbmon/3t: No such file or directory

PortTransmitter: Error opening port usbmon3: usbmon3: Can't open USB bus file /sys/kernel/debug/usbmon/3t: No such file or directory

cap file = /tmp/qt_temp.TT3158
adding dev to all ports list <usbmon3>
PortManager: unable to open usbmon3. Skipping!
In ~LinuxPort
In ~PcapPort
nlmsg_flags = 301
netlink required buffer size = 3556
buffer size 3556 enough for netlink
if: lo(1)
if: bond0(2)

[1]+  Segmentation fault      drone

Any clues, how to debug this ?
Used the latest sources to build the drone.

Regards,
Lucky

Lucky

unread,
Jul 8, 2015, 5:06:02 AM7/8/15
to osti...@googlegroups.com
# ldd /usr/local/bin/drone
        linux-vdso.so.1 (0x00007fff45fd5000)
        libpcap.so.0.8 => /usr/lib/x86_64-linux-gnu/libpcap.so.0.8 (0x00007fd5a0a6e000)
        libprotobuf.so.9 => /usr/local/lib/libprotobuf.so.9 (0x00007fd5a075e000)
        libQtScript.so.4 => /usr/lib/x86_64-linux-gnu/libQtScript.so.4 (0x00007fd5a02aa000)
        libQtNetwork.so.4 => /usr/lib/x86_64-linux-gnu/libQtNetwork.so.4 (0x00007fd59ff59000)
        libQtCore.so.4 => /usr/lib/x86_64-linux-gnu/libQtCore.so.4 (0x00007fd59fa6a000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd59f84c000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd59f541000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd59f240000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd59f029000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd59ec80000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd59ea65000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd59e860000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd59e551000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd59e349000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fd5a0cc1000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd59e0da000)

Srivats P

unread,
Jul 8, 2015, 8:43:43 AM7/8/15
to Lucky, ostinato
Lucky,

Since you are building from source, build drone with debug symbols -

* make distclean
* qmake -config debug
* make

Then run drone via gdb and provide backtrace

Srivats



Srivats
> --
> Get Ostinato News and Updates on Twitter - Follow @ostinato
> (http://twitter.com/ostinato)
> ---------
> You received this message because you are subscribed to the Google Groups
> "ostinato" group.
> To post to this group, send email to osti...@googlegroups.com
> To unsubscribe from this group, send email to
> ostinato+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ostinato?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "ostinato" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ostinato+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
http://ostinato.org/
@ostinato

Lucky

unread,
Jul 9, 2015, 1:04:48 AM7/9/15
to osti...@googlegroups.com, ylu...@gmail.com
(gdb) bt
#0  __strcmp_ssse3 () at ../sysdeps/x86_64/multiarch/../strcmp.S:209
#1  0x0000000000417ddb in LinuxPort::StatsMonitor::netlinkStats (this=0x712610) at linuxport.cpp:569
#2  0x0000000000416ea4 in LinuxPort::StatsMonitor::run (this=0x712610) at linuxport.cpp:160
#3  0x00007ffff6c1570f in ?? () from /usr/lib/x86_64-linux-gnu/libQtCore.so.4
#4  0x00007ffff69840a4 in start_thread (arg=0x7ffff260b700) at pthread_create.c:309
#5  0x00007ffff5e9704d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Regards,
Lucky

Srivats P

unread,
Jul 9, 2015, 9:09:52 AM7/9/15
to Lucky, ostinato
The crash is happening on this line in linuxport.cpp -

qDebug("if: %s(%d)", ifname, ifi->ifi_index);
foreach(LinuxPort* port, allPorts_)
{
if (strcmp(port->name(), ifname) == 0) <<<<<<<<<<
{
portStats[uint(ifi->ifi_index)] = &(port->stats_);
portMaxStatsValue[uint(ifi->ifi_index)] = &(port->maxStatsValue_);

Looking at the code and the output that you had originally sent, I
can't find anything obviously wrong.

Please use gdb to examine the values of port->name() and ifname

Srivats

Lucky

unread,
Jul 10, 2015, 12:20:10 AM7/10/15
to osti...@googlegroups.com, ylu...@gmail.com
Yes, as a quick work around, I added if ( (port != NULL) && (port->name() !=NULL) && strcmp(port->name(), ifname) == 0).
Would debug further and see why name is NULL.

Regards,
Lucky

Srivats P

unread,
Jan 4, 2016, 10:10:28 AM1/4/16
to Lucky, ostinato
Lucky,

Were you able to find why port was NULL?

Srivats

Lucky

unread,
Jan 4, 2016, 10:48:58 PM1/4/16
to ostinato, ylu...@gmail.com

Sorry Srivats, I left the company I was working earlier, and couldn't debug this before I left.
The guy who is working on this now reached me couple of weeks back. I would check with him if he can verify this.


Regards,
Lucky

Srivats P

unread,
Jan 14, 2016, 8:29:24 AM1/14/16
to Lucky, ostinato
No problem, Lucky. I found the problem - see
https://groups.google.com/forum/#!topic/ostinato/NVNGltYVobw

Srivats
Reply all
Reply to author
Forward
0 new messages