Skip to content

Conversation

@gaborcsardi
Copy link
Member

Reading the output might fail, so we need to tryCatch() it.

Closes #2262.

Reading the output might fail, so we need to `tryCatch()` it.

Closes #2262.
@claude
Copy link

claude bot commented Oct 9, 2025

Claude finished @gaborcsardi's task —— View job


Code Review Progress

  • Read and analyze the changed file
  • Review tryCatch implementation
  • Provide feedback on potential issues

Review Findings

The changes wrap four worker process output reading calls with a safely() function to handle potential errors when reading from crashed worker processes.

Issue identified: Line 96 in the inc assignment calls safely(worker$read_output(), "") but line 100 uses nchar(inc) without checking if inc is NULL. If both worker$read_output() and worker$read_error() fail, inc could be "" + "" = "", which is fine. However, the logic assumes paste0() always returns a character, which it should.

Minor concern: The safely() function doesn't log or track that errors occurred during output reading, which might make debugging worker crashes more difficult.

Otherwise the fix looks appropriate for handling crashed worker processes gracefully.

@gaborcsardi gaborcsardi requested a review from hadley October 9, 2025 18:47
@hadley hadley merged commit 58e1189 into main Oct 9, 2025
14 checks passed
@hadley hadley deleted the fix/parallel-crash-error branch October 9, 2025 19:00
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.

Parallel crash test case sometimes fails

2 participants