[ovs-dev] [v5] dpif-netdev: Modified ovs-appctl dpctl/dump-flows command

Roi Dayan roid at mellanox.com
Mon Jan 20 16:39:36 UTC 2020



On 2020-01-20 6:21 PM, Ilya Maximets wrote:
> On 20.01.2020 17:20, Roi Dayan wrote:
>>
>>
>> On 2020-01-17 6:00 PM, Stokes, Ian wrote:
>>> --- a/lib/dpctl.c
>>> +++ b/lib/dpctl.c
>>> @@ -829,6 +829,10 @@ format_dpif_flow(struct ds *ds, const struct
>>> dpif_flow *f, struct hmap *ports,
>>>       }
>>>       ds_put_cstr(ds, ", actions:");
>>>       format_odp_actions(ds, f->actions, f->actions_len, ports);
>>> +    if (dpctl_p->verbosity && f->attrs.dp_extra_info) {
>>> +        ds_put_format(ds, ", dp-extra-info:%s", f->attrs.dp_extra_info);
>>> +    }
>>> +    free(f->attrs.dp_extra_info);
>>>   }
>>
>>
>> Hi,
>>
>> We see ovs-vswitchd crashes with this patch.
>> Looks like from the call to free() on dp_extra_info.
> 
> Yes, try this: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwork.ozlabs.org%2Fpatch%2F1225037%2F&data=02%7C01%7Croid%40mellanox.com%7C601f69a8abf444fdf2ea08d79dc4d438%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C637151341012667700&sdata=SzVuSixjXb7oFVMdGsnLr4xmmb144ojzkEy6a%2Bbydoc%3D&reserved=0
> 

it fixes the issue. thanks!

>>
>> (gdb) bt
>> #0  __GI___libc_free (mem=0x1000) at malloc.c:3104
>> #1  0x0000000000626487 in format_dpif_flow (ds=0x7fff1ef1bb40, f=0x7fff1ef1b570, ports=0x0, dpctl_p=0x7fff1ef1bbe0) at lib/dpctl.c:835
>> (gdb) frame 1
>> #1  0x0000000000626487 in format_dpif_flow (ds=0x7fff1ef1bb40, f=0x7fff1ef1b570, ports=0x0, dpctl_p=0x7fff1ef1bbe0) at lib/dpctl.c:835
>> 835         free(f->attrs.dp_extra_info);
>> (gdb) print f->attrs.dp_extra_info
>> $1 = 0x1000 <error: Cannot access memory at address 0x1000>
>> (gdb) print f->attrs
>> $2 = {offloaded = true, dp_layer = 0x686086 "tc", dp_extra_info = 0x1000 <error: Cannot access memory at address 0x1000>}
>>
>>
>> Thanks,
>> Roi
>>


More information about the dev mailing list