Abort (Core dumped) when running unittests with uvm-python
See original GitHub issueRunning make test
(or any unittest file) for https://github.com/tpoikela/uvm-python results in the following error:
/usr/include/c++/9/bits/stl_vector.h:1042: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = GpiImplInterface*; _
Alloc = std::allocator<GpiImplInterface*>; std::vector<_Tp, _Alloc>::reference = GpiImplInterface*&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
I bisected the issue to commit 3a0bf9460515ae0c2269890b75ddbeaa80085cff. It seems some imports have been changed to unconditional ones. More specifically, changing cocotb/utils.py back to conditional import seems to fix this issue. Any ideas on the source of error?
Background: uvm-python unit tests are run without simulator, but files under test are still importing stuff from cocotb.
To reproduce the issue:
mkdir temp
cd temp
python -m env .venv
source .venv/bin/activate
git clone https://github.com/cocotb/cocotb.git
cd cocotb
pip install -e .
cd ..
git clone https://github.com/tpoikela/uvm-python.git
cd uvm-python
ln -s src/uvm ./uvm
pip install cocotb_coverage pip install regex
python -m unittest unit/test_sv.py # Or make test-unit
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
[Unit test] Ut failed with Aborted (core dumped) #1460 - GitHub
I have searched related issues but cannot get the expected help. I have read the FAQ documentation but cannot get the expected help....
Read more >"core dumped" when running Python tests - Travis CI Community
“core dumped” means a C-level error. Most probably, you have extension modules incompatible with your system, instance of Python and/or each ...
Read more >Pytest running unittest exit with core dump - Stack Overflow
When we attempt to run our tests folder with pytest, in case the classes are directly derived from unittest.TestCase tests are running fine....
Read more >Frameworks and Methodologies — Open Source Verification ...
Cocotb is a coroutine based co-simulation library for writing VHDL and Verilog testbenches in Python. It was initially written and open sourced by...
Read more >LFY - River Thames Conditions - Environment Agency - GOV.UK
Sentinel self storage dubai, Photonic memory alpha, Widal test lab report! ... Run the one grey, Descargar asturias isaac albeniz mp3, Praga city...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@themperek Thanks for suggestion.
hasattr(cocotb, 'SIM_NAME')
seems to provide a workaround. Any potential pitfalls?Nevertheless, it is better not to leak segfaults, as these cannot be caught inside Python code.
@themperek That is a good idea that will also help us with #1724.