Fix Flowframes hang detection (watchdog never fired on frozen log) - #2
Open
NetsumaInfo wants to merge 1 commit into
Open
Fix Flowframes hang detection (watchdog never fired on frozen log)#2NetsumaInfo wants to merge 1 commit into
NetsumaInfo wants to merge 1 commit into
Conversation
Flowframes can stop responding mid-interpolation after some time: the process stays alive but its session log stops growing. The 60s progress watchdog was meant to catch this but never fired: lastLogTime was refreshed on every poll tick whenever the log file simply read successfully, so a frozen-but-readable log kept resetting the timer and the job hung until it was manually paused. Only bump lastLogTime when new lines actually appear (lines.length > lastLineCount). Add a grace check so a quiet encode phase is not killed: if the newest output file is still growing, reset the timer instead of failing. On a genuine hang the job now errors out after 60s and the queue moves on.
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.
Problem
Flowframes can stop responding mid-interpolation after some time: the process
stays alive but its session log stops growing. A 60s progress watchdog already
existed to catch this, but it never fired, so the job hung indefinitely until
manually paused.
Root cause
lastLogTimewas refreshed on every poll tick whenever the session log filemerely read successfully, not only when new lines were written. A
frozen-but-readable log therefore kept resetting the timer, so
Date.now() - lastLogTime > 60000was never true.Fix
lastLogTimewhen new log lines actually appear(
lines.length > lastLineCount).output file is still growing, reset the timer instead of failing.
On a genuine hang the job now errors out after 60s and the queue moves on,
instead of hanging forever.
Scope
One file,
AniSmooth/js/utils/flowframesHandler.js(+16/-1). No other changes.Testing
node --checkpasses.