Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
  • Scenario & Debug Puzzles25
    • Testbench Debug Puzzles: Why Did the Test Hang?
    • Deadlock Scenario Puzzles: Objection and Phase Stalls
      • Early Return Leaves Objection Raised
      • fork...join_none Thread Leak
      • Semaphore Token Leak on Error Path
      • Mailbox Consumer Blocks Forever
      • Lock Inversion with Two Semaphores
      • Child Sequence Raises Objection but Never Drops
    • Scoreboard Puzzles: Mismatch or Ordering Bug?
    • Real Interview Rounds: End-to-End Debug Walkthrough
    • Scenario & Debug Puzzles: Tricky Q&A
  • Interview Prep: Puzzle Rounds5
  • DV Puzzle Cheatsheet
Loading lesson

‹Deadlock Scenario Puzzles: Objection and Phase Stalls
  1. Topics
  2. DV Interview Puzzles
  3. Scenario & Debug Puzzles
  4. Deadlock Scenario Puzzles: Objection and Phase Stalls
  5. fork...join_none Thread Leak

VLSI DV Interview Puzzles · All levels

fork...join_none Thread Leak

Phase appears idle, but simulation does not cleanly finish and memory usage climbs. Investigate leaked runtime threads.

On this page

    Puzzle

    Difficulty: Hard · Puzzle 2 of 6 · Topic: Deadlock Scenario Puzzles: Objection and Phase Stalls

    Phase appears idle, but simulation does not cleanly finish and memory usage climbs. Investigate leaked runtime threads.

    Code

    design.sv
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    task run_phase(uvm_phase phase);
      phase.raise_objection(this);
      fork
        begin
          forever begin
            poll_status();
            #100ns;
          end
        end
      join_none
      start_traffic();
      phase.drop_objection(this);
    endtask

    Hint

    Dropping objection does not automatically terminate orphaned forever loops.

    Step-by-step solution

    Diagram
    1) Use process listing / debug prints to confirm watchdog thread remains alive after drop.
    2) Verify join_none returns immediately and no handle/disable path is stored.
    3) Add explicit thread control: process handle + kill, event-based stop, or disable fork scope.
    4) Ensure shutdown path signals and joins child threads before dropping final objection.
    5) Add test that checks thread count stabilizes after traffic ends.

    Answer

    Answer: Bug: join_none launches a forever polling thread that is never stopped. Fix: keep process handle or controlled fork label and terminate thread before phase completion.

    Why candidates get it wrong

    Objection mechanics are necessary but not sufficient for process lifecycle correctness.

    Interviewer follow-up

    How would you standardize stoppable background threads across agents/components?

    Related topics

    • Back to Deadlock Scenario Puzzles: Objection and Phase Stalls

    • Scenario & Debug Puzzles section

    Previous

    187 / 210

    Next: Semaphore Token Leak on Error Path

    Up next

    Up nextSemaphore Token Leak on Error Path

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Mailbox Consumer Blocks Forever
    • Lock Inversion with Two Semaphores
    • Child Sequence Raises Objection but Never Drops