Segfault in timing-driven global_placement (Rebuffer::fullyRebuffer > PathEndPathDelay > Search::pathClkPathArrival1) with set_max_delay -ignore_clock_latency

Đang mở
#11,977 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@gudeh đang làm issue này rồi.

Từ ngày 26/10/2026.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp
Lĩnh vực
backend, performance

Hướng nghiên cứu

Start by reproducing with the attached gpl-segfault-repro.zip: run ./run.sh with OpenROAD on PATH and inspect out/gpl.log around iteration 315. The stack points to Search::pathClkPathArrival1 during Rebuffer::fullyRebuffer, with -ignore_clock_latency in design/chipleap_soc.sdc; compare that run with the bounds written without the flag. Done means identifying and fixing the invalid path access so timing-driven placement completes on the reproduction.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

gpl
Describe the bug

global_placement -timing_driven segfaults in its first timing-driven pass on a 120k-instance design with two clocks (IHP SG13G2). It happens after repair_design has inserted its buffers, while Rebuffer::fullyRebuffer updates required times. The search builds a PathEndPathDelay for a set_max_delay -ignore_clock_latency endpoint, walks the data path back to its clock in Search::pathClkPathArrival1, and hits an invalid object.

It is deterministic. All five crashes came at the same Nesterov iteration with the same numbers. The innermost frame varies (Path::prevPath, Path::isClock or Edge::role), but the stack from Search::pathClkPathArrival1 up is the same each time. With the same two bounds written without -ignore_clock_latency, placement finishes.

The clocks are clk (27.778 ns) and accel_clk_i (11.111 ns). The crossings are bounded with:

set_max_delay -ignore_clock_latency 11.111 -from [get_clocks clk] -to [get_clocks accel_clk_i]
set_max_delay -ignore_clock_latency 11.111 -from [get_clocks accel_clk_i] -to [get_clocks clk]
set_false_path -hold -from [get_clocks clk] -to [get_clocks accel_clk_i]
set_false_path -hold -from [get_clocks accel_clk_i] -to [get_clocks clk]

Placement command (LibreLane 3.0.14 classic flow):

global_placement -density 0.55 -timing_driven -routability_driven -pad_right 0 -pad_left 0 -init_wirelength_coef 0.25
What I tried

Same starting database, global placement only, 4 threads, unless noted.

Variant Result
as above Signal 11 in timing-driven iteration 1/2 at Nesterov iteration 315 (overflow 0.631), after repair_design inserted 17755 buffers in 3465 nets. Same numbers in four runs (one on 32 threads), two of them from the attached folder with plain OpenROAD
-keep_resize_below_overflow 0 same crash, with virtual: true
without -timing_driven finishes (iteration 481)
bounds without -ignore_clock_latency (full flow, only the SDC differs) same pass with the same numbers (iteration 315, 17755 buffers), then the rebuffer completes (removed 17752, inserted 29953) and placement finishes at iteration 2715, in about 61 min
crossings as set_false_path no crash within an hour (the crash comes at 15 min), but it did not finish in that hour either

I could not get it to crash on a smaller design. A 43k-cell two-clock block with the same two lines placed fine, and so did a generated design where every path between the clocks is a crossing, at 18k and at 79k instances. So the attachment is the full design. With plain OpenROAD it crashes at the same iteration in 14 to 20 minutes on 4 threads.

Expected Behavior

Timing-driven global placement finishes, as it does when the bounds are written without -ignore_clock_latency.

Environment
OpenROAD dcf36133a369abc8f3c5e5738cd4d82e4903c0e0
Features included (+) or not (-): +GPU +GUI +Python
  • OpenROAD from LibreLane 3.0.14's image (ghcr.io/librelane/librelane:3.0.14, Nix openroad-2026-02-17), OpenSTA at 857316ff001b2a8dbbdc5996944d08a6d38c87ab, Yosys 0.62.
  • IHP-Open-PDK 22f2a25 (sg13g2_stdcell, sg13g2_io, RM_IHPSG13_1P SRAM macros).
  • Design: 120466 instances (119412 movable), 120044 nets, core 3386 x 2264 um, 36.5 % utilization.
  • I have not tried a newer build. Search::pathClkPathArrival1 is unchanged on OpenSTA master (84c4d7e, the submodule of OpenROAD master 6f3f28c on 2026-10-24).
To Reproduce

Unzip gpl-segfault-repro.zip (attached in a comment below) and run ./run.sh with openroad on the PATH. It writes out/gpl.log and crashes at iteration 315 as above.

run.sh runs LibreLane 3.0.14's own scripts/openroad/gpl.tcl with that step's environment (env.tcl), so the settings are those of the failing run. Nothing else from LibreLane is needed.

Path Contents
run.sh, env.tcl the runner and the step's environment, with paths relative to $::env(B)
design/chipleap_soc.odb (64 MB) the database global placement starts from: netlist, floorplan, PDN, taps, pins and placed macros
design/chipleap_soc.sdc the constraints above
design/macros/ LEF and fast, slow and typical liberty for the two IHP SRAM macros
pdk/ihp-sg13g2/ IHP standard cell and IO LEF and liberty, and the excluded-cell lists
scripts/ LibreLane 3.0.14's OpenROAD scripts, unmodified

All of it comes from open sources: IHP-Open-PDK and LibreLane (Apache-2.0), X-HEEP (Solderpad) and ChipLeap (MIT).

Relevant log output

The first crash (a full LibreLane run on 32 threads):

[INFO GPL-0100] Timing-driven iteration 1/2, virtual: false.
[INFO GPL-0101]    Iter: 315, overflow: 0.631, keep resizer changes at: 1, HPWL: 5827607366
Iteration |   Area    | Resized | Buffers | Nets repaired | Remaining
---------------------------------------------------------------------
        0 |     +0.0% |       0 |       0 |             0 |    120044
    final |     +3.9% |      20 |   17755 |          3465 |         0
---------------------------------------------------------------------
[INFO RSZ-0034] Found 674 slew violations.
[INFO RSZ-0035] Found 2986 fanout violations.
[INFO RSZ-0036] Found 412 capacitance violations.
[INFO RSZ-0037] Found 5 long wires.
[INFO RSZ-0039] Resized 20 instances.
[INFO RSZ-0038] Inserted 17755 buffers in 3465 nets.
   Iter   |    Area   | Removed | Inserted |   Pins
          |           | Buffers | Buffers  | Remaining
-------------------------------------------------------
        0 |     +0.0% |       0 |        0 |    111003
Signal 11 received
Stack trace:
 0# 0x000055E514CE1AD2 in openroad
 1# 0x000014F3BD8769C0 in libc.so.6
 2# sta::Path::prevPath() const in openroad
 3# sta::Search::pathClkPathArrival1(sta::Path const*) const in openroad
 4# sta::Search::pathClkPathArrival(sta::Path const*) const in openroad
 5# sta::PathEndPathDelay::PathEndPathDelay(sta::PathDelay*, sta::Path*, sta::Path*, sta::TimingArc*, sta::Edge*, sta::StaState const*) in openroad
 6# sta::VisitPathEnds::visitCheckEnd(sta::Pin const*, sta::Vertex*, sta::Path*, sta::RiseFall const*, sta::PathAnalysisPt const*, bool, sta::PathEndVisitor*, bool&) in openroad
 7# sta::VisitPathEnds::visitClkedPathEnds(sta::Pin const*, sta::Vertex*, sta::Corner const*, sta::MinMaxAll const*, bool, sta::PathEndVisitor*, bool&) in openroad
 8# sta::VisitPathEnds::visitPathEnds(sta::Vertex*, sta::Corner const*, sta::MinMaxAll const*, bool, sta::PathEndVisitor*) in openroad
 9# sta::RequiredVisitor::visit(sta::Vertex*) in openroad
10# sta::BfsIterator::visit(int, sta::VertexVisitor*) in openroad
11# sta::Search::findRequireds(int) in openroad
12# rsz::Rebuffer::fullyRebuffer(sta::Pin*) in openroad
13# rsz::Resizer::findResizeSlacks(bool) in openroad
14# gpl::TimingBase::executeTimingDriven(bool) in openroad
15# gpl::NesterovPlace::runTimingDriven(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int&, long&, bool) in openroad
16# gpl::NesterovPlace::doNesterovPlace(int) in openroad
17# gpl::Replace::doNesterovPlace(int, gpl::PlaceOptions const&, int) in openroad
18# replace_nesterov_place_cmd(...) in openroad
19# 0x000055E514DC630D in openroad
20# TclNRRunCallbacks in libtcl.so
...
27# main in openroad

(Frame 18's template arguments and frames 21 to 26, Tcl and ord::tclInit, are shortened.)

Additional Context

This is from reading the source. I have not checked it in a debugger.

  • All three innermost frames are in Search::pathClkPathArrival1's walk back along prev_path_, so the walk reaches a Path that is no longer valid.
  • That walk only runs for path delays with -ignore_clock_latency. Its callers (PathEndPathDelay::findSrcClkArrival, the PathEndLatchCheck constructor and Latches::latchRequired) check ignoreClkLatency() first, which would explain why the same bounds without the flag pass.
  • Rebuffer::fullyRebuffer calls search_->findRequireds(drvr->level()) before each driver, after editing the netlist for the previous one. As far as I can tell it does not update arrivals first. Maybe arrivals invalidated by those edits leave prev_path_ pointing into freed path arrays, and this walk is the only one that follows them. The crash comes within the first 11100 drivers.

#8351 (closed as stale) was also a crash under Rebuffer::fullyRebuffer from global_placement: an intermittent assertion in sta::Path::vertex on Nangate45. They may have the same cause.

The design is the X-HEEP RISC-V SoC with an accelerator on a second clock, generated by ChipLeap (https://github.com/danieltyukov/chipleap) and laid out with LibreLane 3.0.14.

Ngôn ngữ chính
Verilog
Star
3.4k
Fork
1.1k
Merge trung bình
3 ngày 11 giờ
Pull request đã merge (30 ngày)
247

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của The-OpenROAD-Project/OpenROAD

Tất cả issue của The-OpenROAD-Project/OpenROAD

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.