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

Unix Signal SIGABRT raised from user application code #230

Open
penguali opened this issue Dec 3, 2024 · 2 comments
Open

Unix Signal SIGABRT raised from user application code #230

penguali opened this issue Dec 3, 2024 · 2 comments

Comments

@penguali
Copy link

penguali commented Dec 3, 2024

I am using pyvsc in combination with cocotb and pyhdl-if. I am using the last two packages heavily and they are great!
I started using pyvsc for functional coverage and I am getting the following error when running with xcelium/23.09:

xmsim: *F,SIGUSR: Unix Signal SIGABRT raised from user application code. Stack trace information is captured in file /path/to/sigusrdump.out

After that the stack trace information gets printed.

I found out that solely importing vsc via import vsc is causing this issue in my testbench.
Then I isolated this by trying the following in a separate file:

try:
    import vsc
except Exception as e:
    print(f"Error while using vsc: {e}")

which prints out Aborted (core dumped). I am not sure if these two things are related or what is causing this issue.
This problem happens after the simulation is completely finished.

This is not so urgent as the simulation can still run normally and finish.

Thanks for maintaining!

@mballance
Copy link
Member

Interesting... Appreciate the report!

If I'm understanding correctly, there are two situations in which the crash occurs:

  • On exit from Xcelium if PyVSC is imported along with cocotb and pyhdl-if
  • Immediately if you import vsc guarded by a try block

Are you able to import and use PyVSC outside the simulation (ie in a standalone Python script from the Unix command line)? I'm wondering whether there is a conflict between PyVSC and your OS or between PyVSC and Xcelium.

Can you share the stack trace?

@penguali
Copy link
Author

penguali commented Dec 3, 2024

Yes, the crash occurs in both scenarios.
I am able to import and use PyVSC outside the simulation normally in a standalone Python script, but still getting Aborted (core dumped) at the end.

I installed a fresh venv with Python 3.12.7 and with Python 3.10.15. The problem occurs in both.
My OS is Oracle Linux 8.10

Here is the stack trace:

***Current stack trace:
 -->[User Code       ] (nil)     <don't know>        
 -->[Don't Know      ] 0x1b85134 <don't know>        
 -->[Don't Know      ] 0x1b85335 serror               + 95      
 -->[SSS Overhead    ] 0xcbbd1f  <don't know>        
 -->[SSS Overhead    ] 0xcbe922  <don't know>        
 -->[User Code       ] 0x1479f6644d70 <don't know>         /lib64/libpthread.so.0
 -->[User Code       ] 0x1479f5d0a5ef gsignal              + 10f      /lib64/libc.so.6
 -->[User Code       ] 0x1479f5cdde65 abort                + 127      /lib64/libc.so.6
 -->[User Code       ] 0x1479e4023907 <don't know>         /lib64/libffi.so.6
 -->[User Code       ] 0x1479e4249a29 <don't know>         /path/to/python312_64/lib/python3.12/lib-dynload/_ctypes.cpython-312-x86_64-linux-gnu.so
 -->[User Code       ] 0x1479e624e5a7 <don't know>         /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e42506d2 <don't know>         /path/to/python312_64/lib/python3.12/lib-dynload/_ctypes.cpython-312-x86_64-linux-gnu.so
 -->[User Code       ] 0x1479e424642a <don't know>         /path/to/python312_64/lib/python3.12/lib-dynload/_ctypes.cpython-312-x86_64-linux-gnu.so
 -->[User Code       ] 0x1479e6260a5e <don't know>         /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e624c2c6 <don't know>         /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e62e73e4 _PyModule_ClearDict  + d4       /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e6335f9a <don't know>         /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e63355ee Py_FinalizeEx        + ae       /path/to/python312_64/lib/libpython3.12.so.1.0
 -->[User Code       ] 0x1479e6019c09 _embed_sim_cleanup   + 79       /path/to/venv/lib/python3.12/site-packages/cocotb/libs/libcocotb.so
 -->[User Code       ] 0x1479f6a782bd gpi_to_simulator()   + 14d      /path/to/venv/lib/python3.12/site-packages/cocotb/libs/libgpi.so
 -->[User Code       ] 0x1479e6a82188 <don't know>         /path/to/venv/lib/python3.12/site-packages/cocotb/libs/libcocotbvpi_ius.so
 -->[VPI Overhead    ] 0xa27bef  <don't know>        
 -->[SSS Overhead    ] 0xe3cb85  <don't know>

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