Originally filed against The-OpenROAD-Project/yosys#28; refiling here because the issue manifests through the ORFS flow and the workaround lives in ORFS usage rather than yosys source.
Subject
[yosys / yosys-abc interaction]
Describe the bug
yosys-abc invoked by yosys through a pipe deadlocks indefinitely on Ubuntu 24.04 hosts. Yosys remains blocked in pipe_read waiting for output from abc; yosys-abc remains blocked in do_select on its stdin pipe. Both processes sit at 0% CPU. Standalone yosys-abc -s -F script.txt completes the same script in under one second, so the abc binary itself is healthy — only the pipe-driven invocation from yosys hangs.
Expected Behavior
make DESIGN_CONFIG=./designs/asap7/gcd/config.mk synth should complete normally as it does in the upstream openroad/orfs docker image (Ubuntu 22.04 inside).
Environment
- OS (broken): Ubuntu 24.04 LTS,
ldd (Ubuntu GLIBC 2.39-0ubuntu8.7) 2.39
- Compiler: g++ 13.3.0-6ubuntu2~24.04.1
- Yosys SHA:
6d2c445ae (Release version 0.64, The-OpenROAD-Project/yosys fork)
- OS (working): Ubuntu 22.04 with glibc 2.35 (the
openroad/orfs docker image)
The same source SHA (6d2c445ae) is used in both, so this is a runtime regression rather than a source change.
To Reproduce
# On an Ubuntu 24.04 host with a locally built tree (./build_openroad.sh --local)
source env.sh
cd flow
make DESIGN_CONFIG=./designs/asap7/gcd/config.mk synth
# → never makes it past `Executing ABC pass ... Extracting gate netlist ... to <abc-temp-dir>/input.blif`
A minimal reproducer (no make harness needed):
timeout 60 yosys -p "read_verilog flow/designs/src/gcd/gcd.v; synth -top gcd; abc -liberty flow/platforms/asap7/lib/NLDM/asap7sc7p5t_AO_RVT_FF_nldm_211120.lib.gz" </dev/null
Diagnosis
strace -f -e trace=read,write,pipe2,close,dup2,fork,wait4 on the hung pair shows yosys-abc reading its stdin one byte at a time (line-discipline behavior, as if isatty(0) returns true), echoing each char back to its stdout. After yosys writes the full source /tmp/yosys-abc-…/abc.script\n command and abc echoes it, both deadlock:
762992 read(0, "t", 1) = 1
762992 read(0, "\n", 1) = 1
762992 write(1, "source /tmp/yosys-abc-AaX2kh/abc"..., 39) = 39
762985 read(5, "source /tmp/yosys-abc-AaX2kh/abc"..., 1023) = 39
762985 read(5, 0x7ffd…, 1023) = ? ERESTARTSYS ← blocks here forever
yosys-abc then never produces any more output; yosys blocks waiting for it. 5-minute wait did not unblock. Suggests a libreadline / TTY-detection path in abc that misbehaves with glibc 2.39's pipe semantics.
Workarounds tried
stdbuf -i 4096 -o 4096 -e 4096 wrapper on yosys-abc: no effect.
- Same binary works inside an Ubuntu 22.04 docker container; same docker-built binary copied onto the 24.04 host also hangs → not a build issue, a runtime/glibc issue.
Current workaround
Run make synth inside the openroad/orfs docker image (Ubuntu 22.04), then continue with locally built OpenROAD for the remaining stages on the host.
Subject
[yosys / yosys-abc interaction]
Describe the bug
yosys-abcinvoked byyosysthrough a pipe deadlocks indefinitely on Ubuntu 24.04 hosts. Yosys remains blocked inpipe_readwaiting for output from abc;yosys-abcremains blocked indo_selecton its stdin pipe. Both processes sit at 0% CPU. Standaloneyosys-abc -s -F script.txtcompletes the same script in under one second, so the abc binary itself is healthy — only the pipe-driven invocation from yosys hangs.Expected Behavior
make DESIGN_CONFIG=./designs/asap7/gcd/config.mk synthshould complete normally as it does in the upstreamopenroad/orfsdocker image (Ubuntu 22.04 inside).Environment
ldd (Ubuntu GLIBC 2.39-0ubuntu8.7) 2.396d2c445ae(Release version 0.64, The-OpenROAD-Project/yosys fork)openroad/orfsdocker image)The same source SHA (
6d2c445ae) is used in both, so this is a runtime regression rather than a source change.To Reproduce
A minimal reproducer (no make harness needed):
Diagnosis
strace -f -e trace=read,write,pipe2,close,dup2,fork,wait4on the hung pair showsyosys-abcreading its stdin one byte at a time (line-discipline behavior, as ifisatty(0)returns true), echoing each char back to its stdout. After yosys writes the fullsource /tmp/yosys-abc-…/abc.script\ncommand and abc echoes it, both deadlock:yosys-abcthen never produces any more output; yosys blocks waiting for it. 5-minute wait did not unblock. Suggests a libreadline / TTY-detection path in abc that misbehaves with glibc 2.39's pipe semantics.Workarounds tried
stdbuf -i 4096 -o 4096 -e 4096wrapper onyosys-abc: no effect.Current workaround
Run
make synthinside theopenroad/orfsdocker image (Ubuntu 22.04), then continue with locally built OpenROAD for the remaining stages on the host.