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

Use of DlmLoaderFactory causes segmentation fault #123

Open
tomhenderson opened this issue Aug 2, 2021 · 0 comments
Open

Use of DlmLoaderFactory causes segmentation fault #123

tomhenderson opened this issue Aug 2, 2021 · 0 comments

Comments

@tomhenderson
Copy link
Collaborator

  • ns3 version (cat $NS3FOLDER/VERSION or the commit hash): ns-3.34
  • DCE version (git log|head -n1): 5a25643
  • Operating system/version (lsb_release -a): Ubuntu 16.04
  • Libc version (ldd -v): 2.23
  • compiler version (gcc -v/g++ -v/clang -v/clang++ -v): 5.4

Description of the problem

The loader factory used by default in DceManagerHelper is CoojaLoaderFactory, but an option exists to use DlmLoaderFactory. However, the latter doesn't seem to work any more. It is commented out in a number of examples:

example/dce-ltp.cc:  // processManager.SetLoader ("ns3::DlmLoaderFactory");
example/dce-sctp-simple.cc:  // processManager.SetLoader ("ns3::DlmLoaderFactory");
example/dce-linux.cc:  // processManager.SetLoader ("ns3::DlmLoaderFactory");
example/dce-xfrm.cc:  // processManager.SetLoader ("ns3::DlmLoaderFactory");
example/dce-mptcp-lte-wifi-v6.cc:  dceMng.SetLoader ("ns3::DlmLoaderFactory");

To reproduce the problem, uncomment this line in any one of the example programs that has been commented out (e.g. dce-linux.cc):

--- a/example/dce-linux.cc
+++ b/example/dce-linux.cc
@@ -104,7 +104,7 @@ int main (int argc, char *argv[])
     }
 
   DceManagerHelper processManager;
-  // processManager.SetLoader ("ns3::DlmLoaderFactory");
+  processManager.SetLoader ("ns3::DlmLoaderFactory");

Then run the program through gdb:

$ ./waf --command-template="gdb %s" --run dce-linux
...
(gdb) handle SIGUSR1 nostop
Signal        Stop	Print	Pass to program	Description
SIGUSR1       No	Yes	Yes		User defined signal 1
(gdb) r

Program received signal SIGUSR1, User defined signal 1.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff19b6bfe in ?? ()
(gdb) up
#1  0x00007ffff7ac2f33 in ns3::DlmLoader::DlmLoader (this=0x720540, argc=0, 
    argv=0x0, envp=0x0) at ../model/dlm-loader-factory.cc:59
59	  m_lmid = dlLmidNew (argc, argv, envp);
(gdb) 
#2  0x00007ffff7ac4116 in ns3::DlmLoaderFactory::Create (this=0x718fc0, 
    argc=0, argv=0x0, envp=0x0) at ../model/dlm-loader-factory.cc:143
143	  DlmLoader *loader = new DlmLoader (argc, argv, envp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant