Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault From ONVM Web #210

Open
kevindweb opened this issue Apr 15, 2020 · 0 comments
Open

Segmentation Fault From ONVM Web #210

kevindweb opened this issue Apr 15, 2020 · 0 comments
Labels

Comments

@kevindweb
Copy link
Contributor

Bug Report

Due to my own code, there is a segfault only when running manager with -s web.

Current Behavior
When we run any configuration of manager with -s web, I can get it to segfault every time. The issue is caused by #82 . Key points:

  • It does not matter what NF you run, just run one
  • You don't actually have to look at the web output, that's irrelevant to this issue
  • Things only need to initialize, you don't need to run for a long time or anything

Expected behavior/code
We should not have segmentation faults.

Steps to reproduce

  1. Run manager with ./go.sh 0,1,2,3 1 0xF0 -s web
  2. Run any NF, multiple is fine. I tested with:
  • Speed_tester ./go.sh 1 -d 1
  • Basic_monitor ./go.sh 1
  1. Once NF is running, ^C on the manager
  2. Watch segfault

Environment

  • OS: Ubuntu 18.04
  • onvm version: Current
  • dpdk version:
  • other info:

Possible Solution
I think I found the solution, but might want to wait on it until the release is complete to add more PRs.
Instead of:

cJSON_Delete(onvm_json_root);
cJSON_Delete(onvm_json_events_arr);

We want:

cJSON_Delete(onvm_json_events_arr);
cJSON_Delete(onvm_json_root);

My thought is that there are shared members between the two cJSON objects, and when root is deleted first, cJSON faults out on line https://github.com/sdnfv/openNetVM/blob/master/onvm/lib/cJSON.c#L1877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant