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

ABC: execution of command failed return code 139. #4473

Open
kareefardi opened this issue Jul 2, 2024 · 3 comments
Open

ABC: execution of command failed return code 139. #4473

kareefardi opened this issue Jul 2, 2024 · 3 comments

Comments

@kareefardi
Copy link

Version

Yosys 0.42+40 (git sha1 a739e21, g++ 11.4.0-1ubuntu1~22.04 -fPIC -Os)

On which OS did this happen?

Linux

Reproduction Steps

test-case.zip
Extract the attached zip. cd into the extracted folder and run the synthesis script yosys -c synth.tcl.

Expected Behavior

Clean exit

Actual Behavior

Looks like a crash

@kareefardi kareefardi added the pending-verification This issue is pending verification and/or reproduction label Jul 2, 2024
@Ravenslofty Ravenslofty changed the title ABC: execution of command failed return code 134. ABC: execution of command failed return code 139. Jul 2, 2024
@Ravenslofty
Copy link
Collaborator

Ravenslofty commented Jul 2, 2024

First things first: running the testcase results in "yosys-abc: src/map/scl/sclLibUtil.c:77: void abc::Abc_SclHashCells(SC_Lib*): Assertion '*pPlace == -1' failed." because you're passing -liberty $sky130_lib twice in the arguments to abc; I'm pretty sure you didn't mean to do that.

Also, though it's harmless, your script includes e.g. retime,-D,{D}, when {D} expands to include -D N already, resulting in abc getting -D -D N.

The actually reported issue is instead "ERROR: ABC: execution of command ""/usr/local/bin/yosys-abc" -s -f /tmp/yosys-abc-TaAwGJ/abc.script 2>&1" failed: return code 139." after stime -p.

After writing a wrapper script for abc that calls gdb, I get this:

Program received signal SIGSEGV, Segmentation fault.
0x00005555559d42db in abc::Abc_SclTimeNtkPrint (p=p@entry=0x5555577b1410, fShowAll=fShowAll@entry=0,
    fPrintPath=fPrintPath@entry=1) at src/map/scl/sclSize.c:203
203                 nLength = Abc_MaxInt( nLength, strlen(Abc_SclObjCell(pObj)->pName) );
#0  0x00005555559d42db in abc::Abc_SclTimeNtkPrint (p=p@entry=0x5555577b1410, fShowAll=fShowAll@entry=0,
    fPrintPath=fPrintPath@entry=1) at src/map/scl/sclSize.c:203
#1  0x00005555559d70cc in abc::Abc_SclTimePerformInt (pLib=pLib@entry=0x55555686f9e0, pNtk=pNtk@entry=0x555557646440,
    nTreeCRatio=nTreeCRatio@entry=0, fUseWireLoads=fUseWireLoads@entry=0, fShowAll=fShowAll@entry=0,
    fPrintPath=fPrintPath@entry=1, fDumpStats=0) at src/map/scl/sclSize.c:690
#2  0x00005555559d73e0 in abc::Abc_SclTimePerform (pLib=0x55555686f9e0, pNtk=0x555557646440, nTreeCRatio=nTreeCRatio@entry=0,
    fUseWireLoads=fUseWireLoads@entry=0, fShowAll=fShowAll@entry=0, fPrintPath=fPrintPath@entry=1, fDumpStats=0)
    at src/map/scl/sclSize.c:712
#3  0x00005555559a7472 in abc::Scl_CommandStime (pAbc=0x555556838200, argc=2, argv=0x5555578a8d20) at src/map/scl/scl.c:895
#4  0x00005555557a6c2b in abc::CmdCommandDispatch (pAbc=pAbc@entry=0x555556838200, pargc=pargc@entry=0x7ffffffed108,
    pargv=pargv@entry=0x7ffffffed110) at src/base/cmd/cmdUtils.c:157
#5  0x00005555557a078e in abc::Cmd_CommandExecute (pAbc=pAbc@entry=0x555556838200,
    sCommand=sCommand@entry=0x7ffffffed170 "stime -p;\n") at src/base/cmd/cmdApi.c:210
#6  0x000055555579e6d7 in abc::CmdCommandSource (pAbc=0x555556838200, argc=<optimized out>, argv=<optimized out>)
    at src/base/cmd/cmd.c:787
#7  0x00005555557a6c2b in abc::CmdCommandDispatch (pAbc=pAbc@entry=0x555556838200, pargc=pargc@entry=0x7fffffff5228,
    pargv=pargv@entry=0x7fffffff5230) at src/base/cmd/cmdUtils.c:157
#8  0x00005555557a078e in abc::Cmd_CommandExecute (pAbc=pAbc@entry=0x555556838200,
    sCommand=sCommand@entry=0x555556837e10 "source abc.script") at src/base/cmd/cmdApi.c:210
#9  0x00005555557e758a in abc::Abc_RealMain (argc=3, argv=<optimized out>) at src/base/main/mainReal.c:332
#10 0x00005555557e4e40 in main (argc=<optimized out>, argv=<optimized out>) at src/base/main/main.c:11

@Ravenslofty Ravenslofty added bug ABC dependencies and removed pending-verification This issue is pending verification and/or reproduction labels Jul 2, 2024
@Ravenslofty
Copy link
Collaborator

Reported upstream as berkeley-abc/abc#305.

@kareefardi
Copy link
Author

kareefardi commented Jul 3, 2024

@Ravenslofty Thanks for your help. Yes the double -liberty wasn't intentional.

Also, though it's harmless, your script includes e.g. retime,-D,{D}, when {D} expands to include -D N already, resulting in abc getting -D -D N.

Thanks for noticing that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants