On Wed, Aug 28, 2013 at 01:25:01PM +0200, Dirk van der Merwe wrote: > We have implemented another datapath protocol provider (replaced > ofproto-dpif module) specifically interfacing with our hardware, and then > slotting into OVS. > > When I send a couple of thousand packets (without any flow configured), > thus generating packet_in messages to the controller, at some point I get > an assertion error in 'rconn_packet_counter_dec' function within the > 'rconn' source file. Note that the rconn queue needs to get backed up for > this to happen. > > The assertion fails on anyone of these two statements each time: > ovs_assert(c->n_packets > 0); > ovs_assert(c->n_bytes >= n_bytes); > > I have seen that there are two threads operating on the rconn queue, the > one thread doing the maintenance of the rconn (when the queue starts to > back up) and the other when a packet_in is actually generated. And it seems > that there is a race condition occurring here.
If two threads are actually touching the rconn directly, that's a bug. There's supposed to be only a single thread (the "main" thread) touching the rconn queue. The threads that generate packet_ins are supposed to queue packets to that main thread using ofproto_dpif_send_packet_in(). Do you see where the unexpected access to the rconn is happening? Thanks, Ben. _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss