I've tried to debug the vswichtd process but seems like something is not working...

Attaching to process 2772
Reading symbols from /usr/sbin/ovs-vswitchd...(no debugging symbols found)...done. Reading symbols from /usr/lib/libofproto.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/libsflow.so.1...(no debugging symbols found)...done. Reading symbols from /usr/lib/libopenvswitch.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/ld-musl-mips-sf.so.1...(no debugging symbols found)...done.

warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

warning: GDB can't find the start of the function at 0x77e1b044.

    GDB is unable to find the start of the function at 0x77e1b044
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
    This problem is most likely caused by an invalid program counter or
stack pointer.
    However, if you think GDB should simply search farther back
from 0x77e1b044 for code which looks like the beginning of a
---Type <return> to continue, or q <return> to quit---
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
0x77e1b044 in ?? ()
(gdb) b ofproto.c:7123
(gdb) run
2017-03-29T09:39:15Z|00004|ofproto_dpif|INFO|system@ovs-system: Datapath supports recirculation 2017-03-29T09:39:15Z|00005|ofproto_dpif|INFO|system@ovs-system: MPLS label stack length probed as 1 2017-03-29T09:39:15Z|00006|ofproto_dpif|INFO|system@ovs-system: Datapath supports unique flow ids 2017-03-29T09:39:15Z|00007|ofproto_dpif|INFO|system@ovs-system: Datapath supports ct_state 2017-03-29T09:39:15Z|00008|ofproto_dpif|INFO|system@ovs-system: Datapath supports ct_zone 2017-03-29T09:39:15Z|00009|ofproto_dpif|INFO|system@ovs-system: Datapath does not support ct_mark 2017-03-29T09:39:15Z|00010|ofproto_dpif|INFO|system@ovs-system: Datapath does not support ct_label
[New LWP 3459]
[New LWP 3460]
[New LWP 3461]
2017-03-29T09:39:15Z|00001|ofproto_dpif_upcall(handler1)|INFO|received packet on unassociated datapath port 0 2017-03-29T09:39:15Z|00011|bridge|INFO|bridge br0: added interface eth0.3 on port 2 2017-03-29T09:39:15Z|00012|bridge|INFO|bridge br0: added interface wlan1 on port 5 2017-03-29T09:39:15Z|00013|bridge|INFO|bridge br0: added interface eth0.2 on port 1 2017-03-29T09:39:15Z|00014|bridge|INFO|bridge br0: added interface eth0.4 on port 3 2017-03-29T09:39:15Z|00015|bridge|INFO|bridge br0: added interface br0 on port 65534 2017-03-29T09:39:15Z|00016|bridge|INFO|bridge br0: added interface wlan0 on port 6 2017-03-29T09:39:15Z|00017|bridge|INFO|bridge br0: using datapath ID 0000c4e9847dd74f 2017-03-29T09:39:15Z|00018|connmgr|INFO|br0: added service controller "punix:/var/run/br0.mgmt" 2017-03-29T09:39:15Z|00019|connmgr|INFO|br0: added primary controller "tcp:192.168.1.100:6633" 2017-03-29T09:39:15Z|00020|rconn|INFO|br0<->tcp:192.168.1.100:6633: connecting... 2017-03-29T09:39:15Z|00002|ofproto_dpif_upcall(handler1)|INFO|received packet on unassociated datapath port 2
[LWP 3460 exited]
[LWP 3459 exited]
[New LWP 3462]
[New LWP 3463]
2017-03-29T09:39:15Z|00021|bridge|INFO|ovs-vswitchd (Open vSwitch) 2.5.0
2017-03-29T09:39:15Z|00022|rconn|INFO|br0<->tcp:192.168.1.100:6633: connection timed out 2017-03-29T09:39:15Z|00023|rconn|INFO|br0<->tcp:192.168.1.100:6633: waiting 1 seconds before reconnect 2017-03-29T09:39:16Z|00024|rconn|INFO|br0<->tcp:192.168.1.100:6633: connecting...
2017-03-29T09:39:16Z|00025|rconn|INFO|br0<->tcp:192.168.1.100:6633: connected
2017-03-29T09:39:25Z|00026|memory|INFO|3404 kB peak resident set size after 10.1 seconds 2017-03-29T09:39:25Z|00027|memory|INFO|handlers:1 ofconns:1 ports:6 revalidators:1 rules:18 udpif keys:2 2017-03-29T09:39:26Z|00028|connmgr|INFO|br0<->tcp:192.168.1.100:6633: 6 flow_mods 10 s ago (6 adds) 2017-03-29T09:41:20Z|00029|ofp_msgs|WARN|unknown OpenFlow message (version 4, type 19, stat 0, vendor 0x2320, subtype 27)

It doesn't matter where I add breakpoints, every time it won't be recognized.

(gdb) b my_custom_method
Function "handle_netst_statistics_request" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 3 (handle_netst_statistics_request) pending.

(gdb) bt
#0  0x77e71bcc in ?? ()

Did I miss something?

Best regards,
Adam


Zitat von Ben Pfaff <[email protected]>:

On Mon, Mar 27, 2017 at 09:08:32PM +0200, Adam Paul Rzyska wrote:
Hello,

in the last weeks I tried to exchange custom openflow messages (type
experimenter) between a controller (ONOS) and a switch (Open vSwitch). The
controller sends a really simple of-msg:

struct my_custom_struct : of_nicira_header {
     uint8_t version;
     uint8_t type == 4;
     uint16_t length;
     uint32_t xid;
     uint32_t experimenter == 0x00002320;
     uint32_t subtype == 0x0080;
 };

In wireshark and OVS it is possible to see, that the switch receives my
custom messages. I've added ofpraw and oftype in ofp-msgs.h. My
request_method have been added to ofproto.c and also into the switch case.
It works fine with a simple VLOG_INFO() output. Every time the switch
receive my custom message a VLOG_INFO-message pops up into the logging file
of OVS. But as soon as I'm trying to implement a reply/replies a error
occurs, which crash's the vswichd (demon). This results in disconnecting the
switch from the controller.

Error message: 2017-02-05T12:09:02Z|00225|ofp_msgs|WARN|unknown OpenFlow
message (version 4, type 19, stat 0, vendor 0x2320, subtype 80)

I know exactly where it happens, but I don't know why... It starts with
ofpmp_init() in my method.

Can you post a backtrace from GDB?  Have you tried running ovs-vswitchd
under valgrind?



_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to