Skip to content

[DEBUG] Investigate Ruby 3.4 CI hanging issue#10

Closed
takaokouji wants to merge 5 commits intomasterfrom
debug-ruby34-hang
Closed

[DEBUG] Investigate Ruby 3.4 CI hanging issue#10
takaokouji wants to merge 5 commits intomasterfrom
debug-ruby34-hang

Conversation

@takaokouji
Copy link
Copy Markdown
Collaborator

Debug Configuration

This PR adds debugging for the Ruby 3.4 CI hanging issue.

Changes

  • Ruby 3.4 only - Speed up testing by only running Ruby 3.4
  • 5 parallel jobs - Run 5 independent jobs to increase chance of reproduction
  • 3 test attempts per job - Each job runs tests 3 times
  • Verbose output - TESTOPTS='-v' shows each test as it runs
  • 60 second timeout - Catch hangs instead of waiting forever
  • Version info - Show Ruby and minitest versions
  • Zombie check - Check for leftover processes after tests

Expected Output

If the hang occurs, we should see:

  1. Which test was running when it hung
  2. Timeout after 60 seconds
  3. Any zombie node/ruby processes

DO NOT MERGE - This is for debugging only.

🤖 Generated with Claude Code

takaokouji and others added 5 commits January 29, 2026 22:01
- Only run Ruby 3.4 to speed up testing
- Run 5 parallel jobs with 3 test attempts each
- Add verbose test output (-v flag)
- Add 60 second timeout to catch hangs
- Show Ruby/minitest versions
- Check for zombie processes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Print debug messages showing which finalizer is being called
- Show PIDs being processed
- Helps identify exactly where the hang occurs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SCHMOOZE_DEBUG env var to enable debug output in base.rb
- Show exactly where spawn_process and ensure_packages_are_initiated hang
- More detailed test output to narrow down the issue

The hang was found to occur during instance creation, not finalizer execution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The popen3 hang was caused by processes not being cleaned up between tests.
When ObjectSpace.define_finalizer is stubbed, no finalizer runs, leaving
zombie Node.js processes that exhaust system resources.

- Add setup/teardown to track and cleanup PIDs
- Each test tracks PIDs it creates
- Teardown kills any remaining processes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Ruby 3.4 CI hang was caused by zombie Node.js processes accumulating
across test runs. When processes aren't properly closed, fork() can block
due to resource exhaustion.

This commit adds teardown methods to:
- schmooze_test.rb
- error_test.rb
- garbage_test.rb
- local_script_test.rb

Each teardown calls close() on the schmoozer instance if it has a running
process, ensuring Node.js processes are properly terminated after each test.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@takaokouji takaokouji closed this Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant