sdnfv / openNetVM

A high performance container-based NFV platform from GW and UCR.
http://sdnfv.github.io/onvm/
Other
263 stars 136 forks source link

rte_hash lookup issues in multi-process environment #185

Closed dennisafa closed 4 years ago

dennisafa commented 4 years ago

Bug Report

An rte_hash structure created in a primary process using rte_hash_create, with , then looked up using rte_hash_find_existing in a secondary process and subsequently used for lookups/additions may cause seg faults.

Current Behavior I initialize a hash structure from the primary process, the manager. Then, I create a separate NF that looks up the created structure by name. The pointer to the hash table is correct, and simple functions like rte_hash_count work, but rte_hash_lookup will fail with a rte_pipeline segfault.

Screen Shot 2020-02-12 at 2 25 37 PM

Expected behavior/code rte_hash structures mapped to hugepages should be accessible from any process that attaches to the EAL environment

Steps to reproduce Initiate hash structure in primary process, then look it up using rte_hash_find_existing from secondary process. Then, perform a lookup call.

Environment

Possible Solution

For the onvm_flow table api, we map the structure that contains the hash structure via rte_memzone (found here) This could work if we do it for hash structs as well.

Additional context/Screenshots