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

How to enable gdb to check segmentation fault for storyboard application #92

Closed
ShilpiPhadnis opened this issue Oct 30, 2019 · 6 comments

Comments

@ShilpiPhadnis
Copy link

I am facing segmentation fault issue after did changes related to ethernet interface instead of ieee80211 for storyboard application. Is there any way to check segmentation fault issue.
Kindly provide any reference document or steps to use gdb for storybaord application

@riebl
Copy link
Owner

riebl commented Nov 4, 2019

You can run make debug_storyboard if your build has debug symbols enabled, i.e. the CMAKE_BUILD_TYPE is set to Debug.

@ShilpiPhadnis
Copy link
Author

Program received signal SIGSEGV, Segmentation fault.
0x00007f775baabb29 in omnetpp::cObject::getFullPathabi:cxx11 const (
this=<error reading variable: Cannot access memory at address 0x7ffd7b3aafc0>) at cobject.cc:57
57 {
(gdb) bt
#0 0x00007f775baabb29 in omnetpp::cObject::getFullPathabi:cxx11 const (
this=<error reading variable: Cannot access memory at address 0x7ffd7b3aafc0>) at cobject.cc:57
#1 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#2 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#3 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#4 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#5 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#6 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#7 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#8 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#9 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#10 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#11 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#12 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#13 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#14 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#15 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#16 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#17 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#18 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#19 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#20 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#21 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#22 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#23 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#24 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#25 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#26 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#27 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#28 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#29 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#30 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#31 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#32 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#33 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61
#34 0x00007f775baabbe7 in omnetpp::cObject::getFullPathabi:cxx11 const (this=0x7f775becb880 omnetpp::defaultList) at cobject.cc:61

@ShilpiPhadnis
Copy link
Author

Dear Riebl,
We got the segmentation fault problem .. it is getting crashed when it is calling bool MacBase::isNodeUp() as inside code it is not able to get containing module.
Seems EtherMac initialization done in InetRadioDriver is not correct.
Modifiied files:
InetRadioDriver.h

  1. // forward declaration
    namespace inet {
    class EtherMac;
    } // namespace inet
  2. inet::EtherMac* mLinkLayer = nullptr;

InetRadioDriver.cc

  1. //mLinkLayer = inet::findModuleFromParinet::ieee80211::Ieee80211Mac(par("macModule"), host);
    mLinkLayer = inet::findModuleFromParinet::EtherMac(par("macModule"), host);
    //mLinkLayer->subscribe(RadioDriverBase::ChannelLoadSignal, this);
  2. //properties->LinkLayerAddress = convert(mLinkLayer->getAddress());

Seems changes related to EherMac is not correct.

@riebl
Copy link
Owner

riebl commented Nov 7, 2019

Seems changes related to EherMac is not correct.

Well, then fix it :-)

@ShilpiPhadnis
Copy link
Author

ShilpiPhadnis commented Nov 7, 2019

Trying that only but stuck actually :)
We solved segmentation fault issue but faced new issue:
<!> getContainingNode(): node module not found (it should have a property named networkNode) for module 'EtherWorld.interfaceTable' -- in module (inet::InterfaceTable) EtherWorld.interfaceTable (id=6), during network initialization
Actually not able to understand problems as we had done many changes. Will try to push our whole code as suggested by you.

attached Issue that we are facing and connections that we made for Ethernet connection.

Connection
Issue

Kindly check and confirm if we had done incorrect implementation.

Thanks in advance :)

@riebl
Copy link
Owner

riebl commented Nov 8, 2019

InterfaceTable should exist per host but not as a global module. Then it will also succeed in looking up the host module.

@riebl riebl closed this as completed Nov 28, 2019
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

2 participants