[ovs-dev] openvswitch-2.4 possible bug in hmap_remove

Ben Pfaff blp at nicira.com
Mon Oct 5 18:28:40 UTC 2015

On Mon, Oct 05, 2015 at 06:25:31PM -0000, Richurov Kes wrote:
> There appears to be some problem with the mailing list as it formats whatever I cut paste from gdb. I have tried it three times, but it fail each time. It is somewhat captured correctly in your mailing archive below:
> http://openvswitch.org/pipermail/dev/2015-October/060884.html
> However it is still garbled toward the end. Our main concern is why is hmap_remove picking up bucket 7 instead of 6? Was it because of any resizing of the hmap array? The crash happen randomly, sometime after adding ports or even after sending some basic pings between VMs on the switch.

Please let us know how to reproduce the crash.

> Also, may not be connected to this problem, but I noticed that
> hmap_remove is lacking basic NULL pointer check and it can crash if it
> is called on an empty hmap pointer. Should it not return failure
> instead of crashing in these situations? We thought it could be
> modified as follows:

No, any case where it would crash indicates a bug in the calling code.

More information about the dev mailing list