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

Segmentation Fault in the "make -C bp_top/syn tire_kick" output #10

Open
mik1234mc opened this issue Jul 14, 2022 · 6 comments
Open

Segmentation Fault in the "make -C bp_top/syn tire_kick" output #10

mik1234mc opened this issue Jul 14, 2022 · 6 comments

Comments

@mik1234mc
Copy link

I would to check that the Segmentation Fault message in the make -C bp_top/syn tire_kick output is intended or I have something wrong in my setup.

...
__________ ___________  _______________________________
\______   \\_   _____/ /   _____/\_   _____/\__    ___/
 |       _/ |    __)_  \_____  \  |    __)_   |    |   
 |    |   \ |        \ /        \ |        \  |    |  1->0 time =      20000
 |____|_  //_______  //_______  //_______  /  |____|   
 ASYNC  \/         \/         \/         \/            
NBF loader done!
Hello World!
[CORE0 FSH] PASS
All cores finished! Terminating...
- /home/michael/projects/black-parrot-sim/rtl/bp_top/test/common/bp_nonsynth_host.sv:183: Verilog $finish
Finishing test
Executing final
Segmentation fault
[CORE0 FSH] PASS
make: [/home/michael/projects/black-parrot-sim/rtl/bp_top/test/tb/bp_tethered/Makefile.verilator:117: /home/michael/projects/black-parrot-sim/rtl/bp_top/syn/results/verilator/bp_tethered.e_bp_default_cfg.none.sim.bp-tests.hello_world/tire_kick] Error 1 (ignored)
make: Leaving directory '/home/michael/projects/black-parrot-sim/rtl/bp_top/syn'

Thanks for confirmation,
Michael

@dpetrisko
Copy link
Collaborator

dpetrisko commented Jul 14, 2022

Hi Michael,

It's not intended but it is expected. There's some combination of Verilator+OS that results in this segfault upon exit. The simulation itself appears to have been successful.

Copying a conversation from our Gitter for tracking:

I did try running it under gdb and it seems like the error is during a call to fdClose in iofclose.c:
(gdb) where
#0 _IO_new_fclose (fp=0x0) at iofclose.c:48

#1 0x000055555556715d in VerilatedContextImp::fdClose(unsigned int) ()

#2 0x0000555555757f45 in Vtestbench024rootfinal_TOP(Vtestbench024root*) ()

#3 0x00005555556aa0a8 in Vtestbench024rootfinal(Vtestbench024root*) ()

#4 0x000055555555abcb in main ()
(gdb)
looks like a 0x0 argument is passed which is then dereferenced later in the code.

@black-parrot
Copy link
Collaborator

black-parrot commented Jul 15, 2022 via email

@mik1234mc
Copy link
Author

I have Verilator 4.216 and Debian11. I see that you have tagged a specific Verilator version in tools subdir. Should I add this binary version into system $PATH?

@dpetrisko
Copy link
Collaborator

Wouldn't hurt to give it a shot but that tag is just the latest we've tried out on CentOS, so the Debian issue is likely to exist

@black-parrot
Copy link
Collaborator

black-parrot commented Jul 15, 2022 via email

@dpetrisko
Copy link
Collaborator

Verilator is tested with Debian by itself, so it's likely a combination of that with Unix pipes

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