[ovs-discuss] Thread Safety in rconn
Ben Pfaff
blp at nicira.com
Thu Aug 29 15:13:10 UTC 2013
On Thu, Aug 29, 2013 at 04:35:05PM +0200, Dirk van der Merwe wrote:
> #7 0x000000000043c3ba in connmgr_send_packet_in (mgr=0x213a100,
> pin=0x7f1822424d50)
> at ofproto/connmgr.c:1437
> ofconn = 0x2167290
> #8 0x000000000041daec in ofproto_dpif_send_packet_in (ofproto=0x213b940,
> pin=0x7f1822424d50)
> at ofproto/ofproto-sdn.c:578
> No locals.
>
> The second thread shown above is the one that generated the packet_in
> message. But in this case, its also the one trying to send it on.
> In other cases, the main thread has tried to send on the packet.
Here is the function ofproto_dpif_send_packet_in() that I see at the
bottom of your additional thread stack trace, quoted above:
void
ofproto_dpif_send_packet_in(struct ofproto_dpif *ofproto,
struct ofputil_packet_in *pin)
{
ovs_mutex_lock(&ofproto->pin_mutex);
if (ofproto->n_pins > 1024) {
ovs_mutex_unlock(&ofproto->pin_mutex);
COVERAGE_INC(packet_in_overflow);
free(CONST_CAST(void *, pin->packet));
free(pin);
return;
}
list_push_back(&ofproto->pins, &pin->list_node);
ofproto->n_pins++;
ovs_mutex_unlock(&ofproto->pin_mutex);
}
This function does not call connmgr_send_packet_in(), so I don't see how
your stack trace is possible.
More information about the discuss
mailing list