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

Broken node on indexed interface modport #1430

Closed
veripoolbot opened this issue May 6, 2019 · 8 comments
Closed

Broken node on indexed interface modport #1430

veripoolbot opened this issue May 6, 2019 · 8 comments
Assignees
Labels
effort: days Expect this issue to require roughly days of invested effort to resolve resolution: abandoned Closed; not enough information or otherwise never finished

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jonathan Kimmitt (@jrrk2)
Original Redmine Issue: 1430 from https://www.veripool.org

Original Assignee: Wilson Snyder (@wsnyder)


%Error: Internal Error: See the manual and http://www.veripool.org/verilator for more assistance.
- V3Ast.cpp:1045:     Dumping work-ver/Variane_testharness_990_final.tree
- V3Broken.cpp:278:   Broken called under broken, skipping recursion.
- V3StatsReport.cpp:241:statsReport: 
%Error: Internal Error: Aborting since under --debug

Program received signal SIGABRT, Aborted.
0x00007ffff7195428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
54	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
#0  0x00007ffff7195428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff719702a in __GI_abort () at abort.c:89
#2  0x00000000005a1ce6 in V3Error::vlAbort () at ../V3Error.cpp:141
#3  0x00000000005a2405 in V3Error::v3errorEnd (sstr=...) at ../V3Error.cpp:224
#4  0x00000000005b5aca in FileLine::v3errorEnd (this=0x2ddd3d0, str=...) at ../V3FileLine.cpp:242
#5  0x0000000000438b12 in AstNode::v3errorEnd (this=0x66ade10, str=...) at ../V3Ast.cpp:1084
#6  0x00000000004389c9 in AstNode::v3errorEndFatal (this=0x66ade10, str=...) at ../V3Ast.cpp:1070
#7  0x00000000004681b0 in BrokenCheckVisitor::processAndIterate (this=0x7fffffff8fe0, nodep=0x66ade10) at ../V3Broken.cpp:226
#8  0x000000000046882f in BrokenCheckVisitor::visit (this=0x7fffffff8fe0, nodep=0x66ade10) at ../V3Broken.cpp:260
#9  0x00000000004171d8 in AstNVisitor::visit (this=0x7fffffff8fe0, nodep=0x66ade10) at ./V3Ast__gen_visitor.h:175
#10 0x00000000004166e0 in AstNVisitor::visit (this=0x7fffffff8fe0, nodep=0x66ade10) at ./V3Ast__gen_visitor.h:120
#11 0x000000000044840e in AstIfaceRefDType::accept (this=0x66ade10, v=...) at ../V3AstNodes.h:573
#12 0x000000000043683e in AstNode::iterateAndNextConst (this=0xddc590, v=...) at ../V3Ast.cpp:827
#13 0x0000000000436438 in AstNode::iterateChildrenConst (this=0xdb8320, v=...) at ../V3Ast.cpp:763
#14 0x0000000000466e4d in AstNVisitor::iterateChildrenConst (this=0x7fffffff8fe0, nodep=0xdb8320) at ../V3Ast.h:2206
#15 0x0000000000468629 in BrokenCheckVisitor::processAndIterate (this=0x7fffffff8fe0, nodep=0xdb8320) at ../V3Broken.cpp:247
#16 0x000000000046882f in BrokenCheckVisitor::visit (this=0x7fffffff8fe0, nodep=0xdb8320) at ../V3Broken.cpp:260
#17 0x000000000041899c in AstNVisitor::visit (this=0x7fffffff8fe0, nodep=0xdb8320) at ./V3Ast__gen_visitor.h:292
#18 0x0000000000454fc4 in AstTypeTable::accept (this=0xdb8320, v=...) at ../V3AstNodes.h:5835
#19 0x000000000043683e in AstNode::iterateAndNextConst (this=0xdb8320, v=...) at ../V3Ast.cpp:827
#20 0x0000000000436480 in AstNode::iterateChildrenConst (this=0xdb7cf0, v=...) at ../V3Ast.cpp:765
#21 0x0000000000466e4d in AstNVisitor::iterateChildrenConst (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ../V3Ast.h:2206
#22 0x0000000000468629 in BrokenCheckVisitor::processAndIterate (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ../V3Broken.cpp:247
#23 0x000000000046882f in BrokenCheckVisitor::visit (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ../V3Broken.cpp:260
#24 0x0000000000417004 in AstNVisitor::visit (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ./V3Ast__gen_visitor.h:165
#25 0x000000000040cbce in AstNetlist::accept (this=0xdb7cf0, v=...) at ../V3AstNodes.h:5868
#26 0x000000000041aad8 in AstNVisitor::iterate (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ../V3Ast.h:2197
#27 0x000000000046886e in BrokenCheckVisitor::BrokenCheckVisitor (this=0x7fffffff8fe0, nodep=0xdb7cf0) at ../V3Broken.cpp:265
#28 0x0000000000466c4e in V3Broken::brokenAll (nodep=0xdb7cf0) at ../V3Broken.cpp:283
#29 0x000000000043892c in AstNode::dumpTreeFile (this=0xdb7cf0, filename="work-ver/Variane_testharness_018_dearray.tree", append=false, doDump=false) at ../V3Ast.cpp:1064
#30 0x00000000004085f9 in V3Global::dumpCheckGlobalTree (stagename="dearray", newNumber=0, doDump=false) at ../Verilator.cpp:153
#31 0x0000000000617d37 in V3Inst::dearrayAll (nodep=0xdb7cf0) at ../V3Inst.cpp:578
#32 0x00000000004088d2 in process () at ../Verilator.cpp:234
#33 0x00000000004099e2 in main (argc=243, argv=0x7fffffff9568, env=0x7fffffff9d08) at ../Verilator.cpp:631

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-06T12:33:27Z


The line before "Internal Error" should have been an error about node 66ade10

 3:1: IFACEREFDTYPE 0x66ade10 <e1760744> {gl86} @dt=this@(w1)iface cell=s_cut if=AXI_BUS mp=Master -> CELL 0x66a7e40 <e299965\

4#> {gl75} s_cut -> IFACE 0x5fd0a90 {m20} AXI_BUS__A40_AB40_AC5_AD1 L7 [LIB]

Somehow processing has lost AXI_BUS__A40_AB40_AC5_AD1. Can you make a test case?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2019-05-06T13:46:16Z


If the entire (preprocessed) design is acceptable as a testcase, please find it attached.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-06T22:42:33Z


What command line are you using? Can you please check with the most recent version? If that fails, a reduced test case would be appreciated, as would like something we can add to the regressions.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Jonathan Kimmitt (@jrrk2)
Original Date: 2019-05-07T07:35:19Z


The usual command line, as stated in the attached logfile: verilator -cc --top-module ariane_testharness --debug --gdbbt verilate-tokens.v is sufficient to demonstrate the problem. Since I'm not particularly familiar with your code it could be difficult to dissect further. Nevertheless since it is pre-processed open source code, I see no reason why it could not go in the regression suite, once the problem is reproduced and identified at your end. I have rerun with the latest release (Verilator 4.012 2019-03-23) with no obvious change in behaviour. If you want me to rerun with any other flags, I'm happy to do so, but to a non C++ developer the diagnostics don't mean a lot.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2019-05-22T02:06:19Z


Tracked this down to an issue that indexed interfaces with modports are broken in LinkDot. Stay tuned.

@veripoolbot veripoolbot added effort: days Expect this issue to require roughly days of invested effort to resolve status: asked reporter Bug is waiting for reporter to answer a question labels Dec 22, 2019
@deo248
Copy link

deo248 commented Apr 16, 2020

I believe I have also hit this bug now in a separate project from the original report. Verilator 4.032 reports the below log when running verilato_bin_dbg under gdb with --debug --gdbbt.

I had been using arrays of interfaces with modports within the design without encountering a problem, but after adding in a crossbar implementation that heavily uses indexed 1D arrays of interfaces the problem cropped up. Based on the previous comment I removed all the modports from the design, leaving just the interfaces, but the issue persisted. If this looks to be a separate issue I can also file separately and attempt to distill a testcase.

...
- V3AssertPre.cpp:154:assertPreAll: 
- V3Ast.cpp:1077:     Dumping []/Vverilator_top_014_assertpre.tree
- V3Assert.cpp:406:   assertAll: 
- V3Ast.cpp:1077:     Dumping []/Vverilator_top_015_assert.tree
- V3LinkLevel.cpp:96: wrapTop: 
- V3Const.cpp:2665:   constifyAllLint: 
- V3Ast.cpp:1077:     Dumping []/Vverilator_top_017_const.tree
- V3SplitVar.cpp:1291:splitVariable: 
- V3Inst.cpp:590:     dearrayAll: 

Program received signal SIGSEGV, Segmentation fault.
0x000000000067371c in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0x2eb7320) at ../V3Inst.cpp:419
419	                string newname = varrefp->name() + "__BRA__" + cvtToStr(i) + "__KET__";
(gdb) bt
#0  0x000000000067371c in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0x2eb7320) at ../V3Inst.cpp:419
#1  0x000000000044c3f2 in AstPin::accept (this=0x2eb7320, v=...) at ../V3AstNodes.h:1977
#2  0x000000000042fd19 in AstNode::iterateAndNext (this=0x2eb64c0, v=...) at ../V3Ast.cpp:804
#3  0x000000000042f9c4 in AstNode::iterateChildren (this=0x2eb6380, v=...) at ../V3Ast.cpp:766
#4  0x0000000000412119 in AstNVisitor::iterateChildren (this=0x7fffffffd440, nodep=0x2eb6380) at ../V3Ast.h:2482
#5  0x0000000000672363 in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0x2eb6380) at ../V3Inst.cpp:303
#6  0x000000000044dbc2 in AstCell::accept (this=0x2eb6380, v=...) at ../V3AstNodes.h:2245
#7  0x000000000042fd19 in AstNode::iterateAndNext (this=0x2eb2d40, v=...) at ../V3Ast.cpp:804
#8  0x000000000042f9c4 in AstNode::iterateChildren (this=0x2ebc820, v=...) at ../V3Ast.cpp:766
#9  0x0000000000412119 in AstNVisitor::iterateChildren (this=0x7fffffffd440, nodep=0x2ebc820) at ../V3Ast.h:2482
#10 0x0000000000673d45 in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0x2ebc820) at ../V3Inst.cpp:442
#11 0x000000000040b4e0 in AstNVisitor::visit (this=0x7fffffffd440, nodep=0x2ebc820) at ./V3Ast__gen_visitor.h:32
#12 0x00000000004506f8 in AstBegin::accept (this=0x2ebc820, v=...) at ../V3AstNodes.h:3836
#13 0x000000000042fd19 in AstNode::iterateAndNext (this=0x296c510, v=...) at ../V3Ast.cpp:804
#14 0x000000000042f9e8 in AstNode::iterateChildren (this=0x296bac0, v=...) at ../V3Ast.cpp:767
#15 0x0000000000412119 in AstNVisitor::iterateChildren (this=0x7fffffffd440, nodep=0x296bac0) at ../V3Ast.h:2482
#16 0x0000000000673d45 in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0x296bac0) at ../V3Inst.cpp:442
#17 0x000000000040d8a0 in AstNVisitor::visit (this=0x7fffffffd440, nodep=0x296bac0) at ./V3Ast__gen_visitor.h:209
#18 0x000000000040d254 in AstNVisitor::visit (this=0x7fffffffd440, nodep=0x296bac0) at ./V3Ast__gen_visitor.h:177
#19 0x00000000006bb22e in AstModule::accept (this=0x296bac0, v=...) at ../V3AstNodes.h:2029
#20 0x000000000042fd19 in AstNode::iterateAndNext (this=0x48e3450, v=...) at ../V3Ast.cpp:804
#21 0x000000000042f9c4 in AstNode::iterateChildren (this=0xf93cf0, v=...) at ../V3Ast.cpp:766
#22 0x0000000000412119 in AstNVisitor::iterateChildren (this=0x7fffffffd440, nodep=0xf93cf0) at ../V3Ast.h:2482
#23 0x0000000000673d45 in InstDeVisitor::visit (this=0x7fffffffd440, nodep=0xf93cf0) at ../V3Inst.cpp:442
#24 0x000000000040d490 in AstNVisitor::visit (this=0x7fffffffd440, nodep=0xf93cf0) at ./V3Ast__gen_visitor.h:188
#25 0x0000000000616cde in AstNetlist::accept (this=0xf93cf0, v=...) at ../V3AstNodes.h:7115
#26 0x00000000004120f2 in AstNVisitor::iterate (this=0x7fffffffd440, nodep=0xf93cf0) at ../V3Ast.h:2479
#27 0x0000000000673dab in InstDeVisitor::InstDeVisitor (this=0x7fffffffd440, nodep=0xf93cf0) at ../V3Inst.cpp:450
#28 0x000000000066f3bd in V3Inst::dearrayAll (nodep=0xf93cf0) at ../V3Inst.cpp:592
#29 0x0000000000403d38 in process () at ../Verilator.cpp:180
#30 0x0000000000404e1c in main (argc=11, argv=0x7fffffffdbe8, env=0x7fffffffdc48) at ../Verilator.cpp:586
(gdb) 

@wsnyder
Copy link
Member

wsnyder commented Apr 16, 2020

@engr248 I think it's unlikely this is the same issue, please file a new bug with a small test case.

If you run with "--debug --gdb" when you get the prompt, type

       call nodep->fileline()->ascii().c_str()

and this should show you the filename and pin causing the issue.

@wsnyder wsnyder added the resolution: abandoned Closed; not enough information or otherwise never finished label Aug 22, 2020
@wsnyder
Copy link
Member

wsnyder commented Aug 22, 2020

Never got test case and other fixes that might have fixed this - if this is still a problem please open a new issue, thanks.

@wsnyder wsnyder closed this as completed Aug 22, 2020
@wsnyder wsnyder removed the status: asked reporter Bug is waiting for reporter to answer a question label Aug 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: days Expect this issue to require roughly days of invested effort to resolve resolution: abandoned Closed; not enough information or otherwise never finished
Projects
None yet
Development

No branches or pull requests

3 participants