On 5/23/24 09:50, wushao...@chinatelecom.cn wrote:
> From: Shaohua Wu <wushao...@chinatelecom.cn>
> 
> description:
> The statistics for the cached DP flow table are updated in
> packet_batch_per_flow_execute. There might be a timing gap
> where the dp flow in the batch reaches its aging time and
> is prematurely aged. If actions on the dp flows  are
> executed at this time,and the memory for the DP flow
> has been released, it can lead to a crash.
> 
> 0  raise () from /lib64/libc.so.6
> 1  abort () from /lib64/libc.so.6
> 2  odp_execute_actions at lib/odp-execute.c:1166
> 3  dp_netdev_execute_actions at lib/dpif-netdev.c:11339
> 4  packet_batch_per_flow_execute  at lib/dpif-netdev.c:8537
> 5  dp_netdev_input__  at lib/dpif-netdev.c:10722
> 6  dp_netdev_input at lib/dpif-netdev.c:10731
> 7  dp_netdev_process_rxq_port at lib/dpif-netdev.c:6332
> 8  dpif_netdev_run at lib/dpif-netdev.c:7343
> 9  dpif_run at lib/dpif.c:479
> 10 type_run at ofproto/ofproto-dpif.c:370
> 11 ofproto_type_run at ofproto/ofproto.c:1789
> 12 bridge_run__ at vswitchd/bridge.c:3245
> 13 bridge_run at vswitchd/bridge.c:3310
> 14 main  at vswitchd/ovs-vswitchd.c:127
> (gdb) f 4
> (gdb) p flow->ref_cnt
> $4 = {count = 0}
> (gdb) p flow->dead
> $5 = true

Hmm.  Thanks for the patch!  Though the flow is supposed to be
protected by RCU and PMD threads are not supposed to enter
quiescent state in the middle of packet processing, so the flow
should not be freed until the processing is over.

The flow will be dead in this case with a zero counter, but it
is not freed, i.e. should be accessible.

Do you know what exactly failed in odp_execute_actions ?
Your version of the code seems to be very different from the
upstream main branch, so line numbers do not help much.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to