Hi, ALL
A assert panic was trigger when I run ovs-dpdk tests. 
one vm is nginx server, another vm run wrk.


I guss the reason is key of default conn and rev_key of natted conn are same,
hash caculated from default conn and natted conn are same too,
and the two conns insert into the same list, the natted conn is before the 
default conn. 
when lookup connecions from conn table, natted conn is found, default conn 
cannot be found


I have 2 questions
1 since rev_key of  default conn is after natted,why create anothor  natted 
conn? 
2 if natted conn must be retained,split natted conn into anothor table?


(gdb) bt
#0  0x00007f458f299377 in raise () from /lib64/libc.so.6
#1  0x00007f458f29aa68 in abort () from /lib64/libc.so.6
#2  0x00007f458f9e1afe in ovs_abort_valist (err_no=err_no@entry=0, 
format=format@entry=0x7f458fa80b68 "%s: assertion %s failed in %s()", 
args=args@entry=0x7f4350dfd590) at lib/util.c:444
#3  0x00007f458f9e9e80 in vlog_abort_valist (module_=<optimized out>, 
message=0x7f458fa80b68 "%s: assertion %s failed in %s()", 
args=args@entry=0x7f4350dfd590) at lib/vlog.c:1249
#4  0x00007f458f9e9f14 in vlog_abort (module=module@entry=0x7f458fd2f4c0 
<this_module>, message=message@entry=0x7f458fa80b68 "%s: assertion %s failed in 
%s()") at lib/vlog.c:1263
#5  0x00007f458f9e17cc in ovs_assert_failure (where=where@entry=0x7f458fa58518 
"lib/conntrack.c:1093", function=function@entry=0x7f458fa58810 <__func__.21451> 
"conn_update_state", 
    condition=condition@entry=0x7f458fa58878 "conn->conn_type == 
CT_CONN_TYPE_DEFAULT") at lib/util.c:86
#6  0x00007f458f8ec55f in conn_update_state (ct=<optimized out>, pkt=<optimized 
out>, ctx=<optimized out>, conn=0x7f433805b280, now=<optimized out>) at 
lib/conntrack.c:1093
#7  0x00007f458f8ee967 in process_one (tp_id=0, helper=0x0, tp_dst=20480, 
tp_src=14624, nat_action_info=0x0, setlabel=0x0, setmark=0x0, now=1660326441, 
commit=false, force=false, zone=3, ctx=0x7f4350dfd8e0, pkt=0x1611a65a80, 
    ct=0x55c41afbf0a0) at lib/conntrack.c:1370
#8  conntrack_execute (ct=<optimized out>, 
pkt_batch=pkt_batch@entry=0x7f4350dfe900, dl_type=<optimized out>, 
force=<optimized out>, commit=<optimized out>, zone=<optimized out>, 
setmark=setmark@entry=0x0, 
    setlabel=setlabel@entry=0x0, tp_src=14624, tp_dst=20480, helper=<optimized 
out>, helper@entry=0x0, nat_action_info=nat_action_info@entry=0x0, 
now=1660326441, tp_id=0) at lib/conntrack.c:1463
#9  0x00007f458f912efe in dp_execute_cb (aux_=aux_@entry=0x7f4350e05800, 
packets_=packets_@entry=0x7f4350dfe900, a=a@entry=0x7f4338015004, 
should_steal=<optimized out>) at lib/dpif-netdev.c:8362
#10 0x00007f458f953234 in odp_execute_actions (dp=dp@entry=0x7f4350e05800, 
batch=batch@entry=0x7f4350dfe900, steal=steal@entry=true, actions=<optimized 
out>, actions_len=<optimized out>, 
    dp_execute_action=dp_execute_action@entry=0x7f458f912d90 <dp_execute_cb>) 
at lib/odp-execute.c:870
#11 0x00007f458f911fcb in dp_netdev_execute_actions (actions_len=<optimized 
out>, actions=<optimized out>, flow=0x7f433802a5c0, should_steal=true, 
packets=0x7f4350dfe900, pmd=0x7f4350e10010) at lib/dpif-netdev.c:8407
#12 packet_batch_per_flow_execute (pmd=0x7f4350e10010, batch=0x7f4350dfe8f0) at 
lib/dpif-netdev.c:7216
#13 dp_netdev_input__ (pmd=pmd@entry=0x7f4350e10010, 
packets=packets@entry=0x7f4350e06590, md_is_valid=md_is_valid@entry=true, 
port_no=port_no@entry=0) at lib/dpif-netdev.c:7810
#14 0x00007f458f913018 in dp_netdev_recirculate (packets=0x7f4350e06590, 
pmd=0x7f4350e10010) at lib/dpif-netdev.c:7827
#15 dp_execute_cb (aux_=aux_@entry=0x7f4350e0d5b0, 
packets_=packets_@entry=0x7f4350e06590, a=a@entry=0x7f44700008c8, 
should_steal=<optimized out>) at lib/dpif-netdev.c:8222
#16 0x00007f458f953234 in odp_execute_actions (dp=dp@entry=0x7f4350e0d5b0, 
batch=batch@entry=0x7f4350e06590, steal=steal@entry=true, actions=<optimized 
out>, actions_len=<optimized out>, 
    dp_execute_action=dp_execute_action@entry=0x7f458f912d90 <dp_execute_cb>) 
at lib/odp-execute.c:870
#17 0x00007f458f911fcb in dp_netdev_execute_actions (actions_len=<optimized 
out>, actions=<optimized out>, flow=0x7f4338013e50, should_steal=true, 
packets=0x7f4350e06590, pmd=0x7f4350e10010) at lib/dpif-netdev.c:8407
#18 packet_batch_per_flow_execute (pmd=0x7f4350e10010, batch=0x7f4350e06580) at 
lib/dpif-netdev.c:7216
#19 dp_netdev_input__ (pmd=<optimized out>, packets=<optimized out>, 
md_is_valid=md_is_valid@entry=false, port_no=<optimized out>) at 
lib/dpif-netdev.c:7810
#20 0x00007f458f91435d in dp_netdev_input (pmd=<optimized out>, 
packets=<optimized out>, port_no=<optimized out>) at lib/dpif-netdev.c:7819
#21 0x00007f458f9144cf in dp_netdev_process_rxq_port 
(pmd=pmd@entry=0x7f4350e10010, rxq=0x55c41afc02f0, port_no=2) at 
lib/dpif-netdev.c:4767
#22 0x00007f458f9148f9 in pmd_thread_main (f_=<optimized out>) at 
lib/dpif-netdev.c:6302
#23 0x00007f458f9a70df in ovsthread_wrapper (aux_=<optimized out>) at 
lib/ovs-thread.c:383
#24 0x00007f458f638ea5 in start_thread () from /lib64/libpthread.so.0
#25 0x00007f458f3618cd in clone () from /lib64/libc.so.6
(gdb) frame 7
#7  0x00007f458f8ee967 in process_one (tp_id=0, helper=0x0, tp_dst=20480, 
tp_src=14624, nat_action_info=0x0, setlabel=0x0, setmark=0x0, now=1660326441, 
commit=false, force=false, zone=3, ctx=0x7f4350dfd8e0, pkt=0x1611a65a80, 
    ct=0x55c41afbf0a0) at lib/conntrack.c:1370
1370                create_new_conn = conn_update_state(ct, pkt, ctx, conn, 
now);
(gdb) p ctx->key
$1 = {src = {addr = {ipv4 = 3731859648, ipv6 = {__in6_u = {__u6_addr8 = 
"\300\250o\336", '\000' <repeats 11 times>, __u6_addr16 = {43200, 56943, 0, 0, 
0, 0, 0, 0}, __u6_addr32 = {3731859648, 0, 0, 0}}}}, {port = 3360, {
        icmp_id = 3360, icmp_type = 0 '\000', icmp_code = 0 '\000'}}}, dst = 
{addr = {ipv4 = 1164945600, ipv6 = {__in6_u = {__u6_addr8 = "\300\250oE", 
'\000' <repeats 11 times>, __u6_addr16 = {43200, 17775, 0, 0, 0, 0, 0, 0}, 
          __u6_addr32 = {1164945600, 0, 0, 0}}}}, {port = 20480, {icmp_id = 
20480, icmp_type = 0 '\000', icmp_code = 0 '\000'}}}, dl_type = 8, zone = 3, 
nw_proto = 6 '\006'}
(gdb) p ctx->conn
$2 = (struct conn *) 0x7f433805b280
(gdb) p *ctx->conn
$3 = {key = {src = {addr = {ipv4 = 1164945600, ipv6 = {__in6_u = {__u6_addr8 = 
"\300\250oE", '\000' <repeats 11 times>, __u6_addr16 = {43200, 17775, 0, 0, 0, 
0, 0, 0}, __u6_addr32 = {1164945600, 0, 0, 0}}}}, {port = 20480, {
          icmp_id = 20480, icmp_type = 0 '\000', icmp_code = 0 '\000'}}}, dst = 
{addr = {ipv4 = 3731859648, ipv6 = {__in6_u = {__u6_addr8 = "\300\250o\336", 
'\000' <repeats 11 times>, __u6_addr16 = {43200, 56943, 0, 0, 0, 0, 0, 0}, 
            __u6_addr32 = {3731859648, 0, 0, 0}}}}, {port = 3360, {icmp_id = 
3360, icmp_type = 0 '\000', icmp_code = 0 '\000'}}}, dl_type = 8, zone = 3, 
nw_proto = 6 '\006'}, rev_key = {src = {addr = {ipv4 = 3731859648, ipv6 = {
          __in6_u = {__u6_addr8 = "\300\250o\336", '\000' <repeats 11 times>, 
__u6_addr16 = {43200, 56943, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {3731859648, 0, 
0, 0}}}}, {port = 3360, {icmp_id = 3360, icmp_type = 0 '\000', 
          icmp_code = 0 '\000'}}}, dst = {addr = {ipv4 = 1164945600, ipv6 = 
{__in6_u = {__u6_addr8 = "\300\250oE", '\000' <repeats 11 times>, __u6_addr16 = 
{43200, 17775, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {1164945600, 0, 0, 0}}}}, {
        port = 20480, {icmp_id = 20480, icmp_type = 0 '\000', icmp_code = 0 
'\000'}}}, dl_type = 8, zone = 3, nw_proto = 6 '\006'}, parent_key = {src = 
{addr = {ipv4 = 0, ipv6 = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, 
            __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 
0}}}}, {port = 0, {icmp_id = 0, icmp_type = 0 '\000', icmp_code = 0 '\000'}}}, 
dst = {addr = {ipv4 = 0, ipv6 = {__in6_u = {
            __u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 
0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}}, {port = 0, {icmp_id = 0, icmp_type 
= 0 '\000', icmp_code = 0 '\000'}}}, dl_type = 0, zone = 0, 
    nw_proto = 0 '\000'}, exp_node = {prev = 0x55c41afbf0d8, next = 
0x55c41afbf0d8}, cm_node = {next = {p = 0x0}}, nat_info = 0x0, alg = 0x0, 
nat_conn = 0x0, lock = {lock = {__data = {__lock = 0, __count = 0, __owner = 0, 
        __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev 
= 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}, where 
= 0x0}, label = {u32 = {0, 0, 0, 0}, u64 = {lo = 0, hi = 0}}, 
  expiration = 1660325898, mark = 0, seq_skew = 0, admit_zone = 0, 
zone_limit_seq = 0, seq_skew_dir = false, cleaned = false, alg_related = false, 
conn_type = CT_CONN_TYPE_UN_NAT, tp_id = 0}
(gdb) quit







_______________________________________________
discuss mailing list
disc...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to