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

Error when open superblue18 on GUI #21

Open
sheiny opened this issue Oct 23, 2019 · 6 comments
Open

Error when open superblue18 on GUI #21

sheiny opened this issue Oct 23, 2019 · 6 comments

Comments

@sheiny
Copy link

sheiny commented Oct 23, 2019

Hello, I'm having some problems when opening superblue18 using GUI.
Thats what a I did:

git clone [email protected]:RsynTeam/rsyn-x.git
cd rsyn-x
wget https://www.dropbox.com/s/1vkcbyqqnmvxydx/rsyn-example.tar.bz2
tar xvf rsyn-example.tar.bz2
mkdir build
cd build
cmake ..
make
cd bin
ln -s ../../x/run/* .
./rsyn

So, when I open the script superblue18-long.rsyn I got a segmentation fault.

here is the log error:

Loading scenario... Done (runtime: 0.067123 seconds memory: +14 MB)
Initializing Physical Layer...

Thread 6 "Rsyn::WorkerThr" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffea1ed700 (LWP 35223)]
Rsyn::PhysicalDesign::addPhysicalSpecialNet (this=0x7fffea1eb8d8, specialNet=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp:917
917             PhysicalNetData & netData = data->clsPhysicalNets[net];

And here is the stack trace:

#0  Rsyn::PhysicalDesign::addPhysicalSpecialNet (this=0x7fffea1eb8d8, specialNet=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp:917
#1  0x00005555559c2227 in Rsyn::PhysicalDesign::loadDesign (this=this@entry=0x7fffea1eb8d8, design=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp:175
#2  0x00005555558d7505 in Rsyn::ICCAD15Reader::openBenchmarkFromICCAD15 (this=0x7fffd0006500) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/reader/ICCAD15Reader.cpp:182
#3  0x00005555558dc4df in Rsyn::ICCAD15Reader::load (this=this@entry=0x7fffd0006500, options=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/reader/ICCAD15Reader.cpp:76
#4  0x0000555555a9f8c7 in ICCAD15::ICCAD15ReaderExtended::load (this=0x7fffd0006500, params=...) at /home/sheiny/workspace/rsyn-x/x/src/x/io/reader/ICCAD15ReaderExtended.cpp:31
#5  0x0000555555a24cf9 in Rsyn::Session::runReader (name=..., params=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/session/Session.cpp:486
#6  0x0000555555a25464 in Rsyn::Session::<lambda(const ScriptParsing::Command&)>::operator() (__closure=<optimized out>, command=...)
    at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/session/Session.cpp:258
#7  std::_Function_handler<void(const ScriptParsing::Command&), Rsyn::Session::registerDefaultCommands()::<lambda(const ScriptParsing::Command&)> >::_M_invoke(const std::_Any_data &, const ScriptParsing::Command &) (__functor=..., __args#0=...) at /usr/include/c++/9.2.0/bits/std_function.h:300
#8  0x0000555555a3085b in std::function<void (ScriptParsing::Command const&)>::operator()(ScriptParsing::Command const&) const (__args#0=..., this=0x7fffea1ec960)
    at /usr/include/c++/9.2.0/bits/std_function.h:685
#9  ScriptParsing::CommandManager::evaluateCommand (this=<optimized out>, parsedCommand=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/parser/script/ScriptCommand.h:1041
#10 0x0000555555a260fb in ScriptParsing::CommandManager::evaluateFile (filename=..., this=0x555556acad00) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/parser/script/ScriptCommand.h:1207
#11 Rsyn::Session::evaluateFile (filename=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/session/Session.cpp:149
#12 0x0000555555a26213 in Rsyn::Session::<lambda(const ScriptParsing::Command&)>::operator() (__closure=<optimized out>, command=...)
    at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/session/Session.cpp:275
#13 std::_Function_handler<void(const ScriptParsing::Command&), Rsyn::Session::registerDefaultCommands()::<lambda(const ScriptParsing::Command&)> >::_M_invoke(const std::_Any_data &, const ScriptParsing::Command &) (__functor=..., __args#0=...) at /usr/include/c++/9.2.0/bits/std_function.h:300
#14 0x0000555555a3085b in std::function<void (ScriptParsing::Command const&)>::operator()(ScriptParsing::Command const&) const (__args#0=..., this=0x7fffea1ecbc0)
    at /usr/include/c++/9.2.0/bits/std_function.h:685
#15 ScriptParsing::CommandManager::evaluateCommand (this=<optimized out>, parsedCommand=...) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/parser/script/ScriptCommand.h:1041
#16 0x0000555555a25f5b in ScriptParsing::CommandManager::evaluateString (
    str="\001\000\000\000\000\000\000\000\b\255\254VUU\000\000\000ЬVUU\000\000\340ԬVUU\000\000p\340\254VUU\000\000\004\000\000\000\000\000\000\000list", '\000' <repeats 12 times>, " ݬVUU\000\000^\356v\366\026\000\000\000p-\242UUU\000\000 -\242UUU\000\000\260\340\254VUU\000\000\004\000\000\000\000\000\000\000list\000\177", '\000' <repeats 11 times>, "VUU\000\000\063\000\000\000\000\000\000\000\063", '\000' <repeats 16 times>, "ϬVUU\000\000`ϬVUU\000\000`ϬVUU", '\000' <repeats 18 times>..., this=0x555556acad00)
    at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/io/parser/script/ScriptCommand.h:1199
#17 Rsyn::Session::evaluateString (str="source \"/home/sheiny/workspace/rsyn-x/superblue18-long.rsyn\"") at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/session/Session.cpp:141
#18 0x0000555555a0d6b0 in Rsyn::WorkerThread::run (this=0x555556d96e30) at /home/sheiny/workspace/rsyn-x/rsyn/src/rsyn/qt/window/MainWindow.cpp:65
#19 0x00007ffff6d145b0 in ?? () from /usr/lib/libQt5Core.so.5
#20 0x00007ffff68b44cf in start_thread () from /usr/lib/libpthread.so.0
#21 0x00007ffff67e32d3 in clone () from /usr/lib/libc.so.6

The seg fault was in file: rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp:917
on method:

void PhysicalDesign::addPhysicalSpecialNet(...

@dmangira
Copy link

I had the same problem as sheiny mentioned above.
I fixed it by adding the follow code in rsyn-x/rsyn/src/rsyn/phy/obj/impl/PhysicalDesign.cpp file before line 917 .

if (!net) {
return;
}

Actually, the special nets defined in SPECIALNETS section in .def file, cannot be found and null pointer is returned causing segmentation fault.

@sheiny
Copy link
Author

sheiny commented Nov 13, 2019

Thank you for the help.
It fixes the problem.
I will keep the issue open, just to make sure the mainteiners are aware of that.

@christosg88
Copy link
Contributor

If the design is defined only using a def file, this error doesn't happen, because both normal and special nets are defined in the def file.

The error actually happens when a Reader (in your case the ICCAD15Reader, but it also happens for GenericReader) is populating the design with nets from the verilog file, and only the cells from the def file. The special nets in the def file are skipped, and when the design tries to retrieve one of them it's not found and the program crashes.

I copied the section creating the special nets from the Reader which uses only def file.

Relative pull request: #23 (comment)

@ZhaohaoSun
Copy link

ZhaohaoSun commented Nov 20, 2019

Hello, I also use the example of superblue18 on gui. But I face a different erro below:

Loading library into Rsyn...
Loading library into Rsyn... Done (runtime: 0.038373 seconds memory: +2 MB)
Loading design into Rsyn...
Killed

Had anyone met the same problem ?

@christosg88
Copy link
Contributor

It's probably the same issue.
You can try applying the patch I have provided here: #23
Recompile, rerun and report your results.

Hello, I also use the example of superblue18 on gui. But I face a different erro below:

Loading library into Rsyn...
Loading library into Rsyn... Done (runtime: 0.038373 seconds memory: +2 MB)
Loading design into Rsyn...
Killed

Had anyone met the same problem ?

@ZhaohaoSun
Copy link

It's probably the same issue.
You can try applying the patch I have provided here: #23
Recompile, rerun and report your results.

Hello, I also use the example of superblue18 on gui. But I face a different erro below:
Loading library into Rsyn...
Loading library into Rsyn... Done (runtime: 0.038373 seconds memory: +2 MB)
Loading design into Rsyn...
Killed
Had anyone met the same problem ?

Thanks, I find the problem now.
When I use example of rsyn-x/x/demo/simple, it doesn't produce error.
I use command "dmesg" , it report below :
Out of memory: Kill process 17324 (Rsyn::WorkerThr) score 685 or sacrifice child
So it is cused by Out of memory.

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

4 participants