[ovs-discuss] ovs_assert(classifier_is_empty(&table->cls)) failed when restart openvswitch service.

Zhanghaibo (Euler) zhanghaibo5 at huawei.com
Wed Dec 6 20:28:30 UTC 2017


Hello all,

I run into abort issue when restart openvswitch service, the coredump file shows that ovs_assert() failed in function oftable_destroy()/ofproto.c.

The problem is pretty hard to reproduce, Do you have any idea about this? OVS release is v2.7.0, Any suggestion would be appreciated.

Source codes and gdb information were copied below.

-------------------------------------------------------------------------------------------------
/* Destroys 'table', including its classifier and eviction groups.
*
* The caller is responsible for freeing 'table' itself. */
static void
oftable_destroy(struct oftable *table)
{
    ovs_assert(classifier_is_empty(&table->cls));

    ovs_mutex_lock(&ofproto_mutex);
    oftable_configure_eviction(table, 0, NULL, 0);
    ovs_mutex_unlock(&ofproto_mutex);

    hmap_destroy(&table->eviction_groups_by_id);
    heap_destroy(&table->eviction_groups_by_size);
    classifier_destroy(&table->cls);
    free(table->name);
}

-------------------------------------------------------------------------------------------------

(gdb) bt
#0  0x00007fc6f51d6157 in raise () from /usr/lib64/libc.so.6
#1  0x00007fc6f51d7848 in abort () from /usr/lib64/libc.so.6
#2  0x000000000055b52e in ovs_abort_valist (err_no=err_no at entry=0, format=format at entry=0x669f30 "%s: assertion %s failed in %s()", args=args at entry=0x7fc6a37fd7e8) at lib/util.c:337
#3  0x00000000005620d0 in vlog_abort_valist (function=<optimized out>, line=<optimized out>, module_=<optimized out>, message=0x669f30 "%s: assertion %s failed in %s()", args=args at entry=0x7fc6a37fd7e8) at lib/vlog.c:1229
#4  0x000000000056214d in vlog_abort (function=function at entry=0x66a610 <__func__.7912> "ovs_assert_failure", line=line at entry=74, module=module at entry=0x934560 <this_module>,
    message=message at entry=0x669f30 "%s: assertion %s failed in %s()") at lib/vlog.c:1243
#5  0x000000000055b2f9 in ovs_assert_failure (where=where at entry=0x63751e "ofproto/ofproto.c:8446", function=function at entry=0x638f70 <__func__.29749> "oftable_destroy",
    condition=condition at entry=0x637de8 "classifier_is_empty(&table->cls)") at lib/util.c:73
#6  0x00000000004720ce in oftable_destroy (table=0x6c59480) at ofproto/ofproto.c:8446
#7  ofproto_destroy__ (ofproto=0x6c4fe50) at ofproto/ofproto.c:1653
#8  0x000000000052d3a6 in ovsrcu_call_postponed () at lib/ovs_rcu.c:323
#9  0x000000000052d574 in ovsrcu_postpone_thread (arg=<optimized out>) at lib/ovs_rcu.c:338
#10 0x000000000052f8e1 in ovsthread_wrapper (aux_=<optimized out>) at lib/ovs_thread.c:651
#11 0x00007fc6f66e7dc5 in start_thread (arg=0x7fc6a37fe700) at pthread_create.c:308
#12 0x00007fc6f529875d in clone () from /usr/lib64/libc.so.6
(gdb) print *table
$15 = {flags = (unknown: 0), cls = {n_rules = 1, n_flow_segments = 3 '\003', flow_segments = "<@J", subtables_map = {impl = {p = 0xa5a1680}}, subtables = {impl = {p = 0x7fc690003db0}, temp = 0x0}, partitions = {impl = {p = 0x0}},
    tries = {{field = 0x64a440 <mf_fields+7168>, root = {p = 0x0}}, {field = 0x64a408 <mf_fields+7112>, root = {p = 0x0}}, {field = 0x0, root = {p = 0x0}}}, n_tries = 2, publish = true}, name = 0x0, max_flows = 4294967295,
  n_flows = 0, eviction_fields = 0x0, n_eviction_fields = 0, eviction_group_id_basis = 0, eviction_groups_by_id = {buckets = 0x6c59518, one = 0x0, mask = 0, n = 0}, eviction_groups_by_size = {array = 0x0, n = 0, allocated = 0},
  miss_config = OFPUTIL_TABLE_MISS_DEFAULT, eviction = 0, vacancy_event = (unknown: 0), vacancy_down = 0 '\000', vacancy_up = 0 '\000', n_matched = 33714, n_missed = 412}
(gdb) p *(struct cmap_impl *)(struct cmap)(table->cls.subtables_map).impl
$16 = {n = 1, max_n = 8, min_n = 1, mask = 1, basis = 3512155531, pad = '\000' <repeats 43 times>, buckets = {{counter = 0, hashes = {0, 0, 0, 0, 0}, nodes = {{next = {p = 0x0}}, {next = {p = 0x0}}, {next = {p = 0x0}}, {next = {
            p = 0x0}}, {next = {p = 0x0}}}}}}
(gdb) p *(struct pvector_impl *)(struct pvector)(table->cls.subtables).impl
$17 = {size = 1, allocated = 7, vector = 0x7fc690003dc0}
(gdb)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20171206/a04206e7/attachment-0001.html>


More information about the discuss mailing list