Repository navigation
Kill the compiler's process group on timeout - #344
Merged
Merged
Conversation
AntonOresten
marked this pull request as draft
October 29, 2026 14:00
|
Documentation preview: https://juliagpu.github.io/cuTile.jl/previews/PR344/ |
maleadt
force-pushed
the
ao/compiler-group-kill
branch
from
November 5, 2026 07:49
e900407 to
52facbc
Compare
maleadt
marked this pull request as ready for review
November 5, 2026 07:49
Member
|
Rebased and slightly reworked. The fix stands, but tileiras sends ptxas output to a log file, so the actual problem was the orphaned ptxas, not a blocked read. I also dropped detach on Windows, where it would take tileiras out of libuv's kill-on-exit job object. |
`tileiras` runs `ptxas`. On a timeout, `run_and_collect` killed `tileiras` alone, leaving `ptxas` running unattended for however long the kernel takes it to compile. Outside of Windows the compiler now runs in a session of its own (`detach`), and a timeout kills its process group. Since the compiler then no longer receives the terminal's Ctrl-C, an interrupted wait kills the group too. On Windows, `detach` would take the compiler out of the job object that kills it when Julia exits, so there only the compiler is killed, as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZLLYWFZYfnGcR3TSUNK4A
maleadt
force-pushed
the
ao/compiler-group-kill
branch
from
November 5, 2026 07:51
52facbc to
15dc9e6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tileirasrunsptxas. When the compiler timeout fired,run_and_collectSIGKILLedtileirasalone, andptxaskept running on its own for however long the kernel takes it to compile, burning a core and memory after we had already reported aTileCompilerTimeoutError.Outside of Windows, the compiler now runs in a session of its own (
detach), and a timeout kills its whole process group. In its own session the compiler no longer receives the terminal's Ctrl-C, so an interrupted wait kills the group too. The kill holds the I/O lock likekill(::Process)does, so the process can't be reaped (and its pid reused) between the check and the signal.On Windows,
detachwould also take the compiler out of libuv's job object that kills it when Julia exits, so there nothing changes: only the compiler is killed.tileirasleaves its/var/tmp/mlir-kernels-*temporaries behind when killed, with SIGKILL or SIGTERM alike; that's not addressed here.