catacomb/src
Luna ffa864c470 Robustness: hang watchdog kills stalled yt-dlp/ffmpeg jobs (2.5)
A yt-dlp process can stall with the OS process alive but no progress — a
wedged TLS handshake, an unresponsive server, a dead socket mid-fragment.
Before, that job hung forever, holding a concurrency slot until the user
noticed and cancelled.

Now each Job tracks last_activity (bumped on any stdout/stderr line or
progress message). poll() runs check_watchdog(): a Running job silent for
HANG_TIMEOUT (5 min) gets SIGKILLed by pid via libc::kill. The threshold
sits well above any legitimate quiet gap — yt-dlp prints a line per
download chunk, polls every 30s under --wait-for-video, and our longest
sleep is ~30s — so 5 min of total silence is a real stall.

To capture the pid, spawn_job + enqueue_transcode now spawn the child
*before* the reader thread (the thread still owns it for the blocking
wait()). A watchdog kill sets watchdog_killed, and drain() forces the
resulting failure to NetworkError (retryable) instead of the Other that
classify() would return for an output-less kill — so the existing
auto-retry path re-queues it (a hang is transient).

Non-Unix builds keep the flagging but can't force-kill (no portable
pid-kill; Windows isn't first-class). JobState gains Debug for tests.

2 tests: watchdog kill → retryable class; normal failures still
classify from the log. 98 pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-07 01:39:00 -07:00
..
web_ui Web UI: named filter presets (1.3+) 2026-06-05 11:36:06 -07:00
app.rs Desktop: global UI scale (egui zoom_factor), persisted 2026-06-04 19:14:23 -07:00
config.rs Desktop: global UI scale (egui zoom_factor), persisted 2026-06-04 19:14:23 -07:00
crash.rs Stability hardening: crash.log + disk-full preflight (2.5) 2026-05-27 02:53:56 -07:00
database.rs N-level folder nesting (1.2+) 2026-05-31 21:28:10 -07:00
disk_space.rs Stability hardening: crash.log + disk-full preflight (2.5) 2026-05-27 02:53:56 -07:00
download_options.rs Format conversion pipeline (Tartube parity 1.7) 2026-06-03 23:20:06 -07:00
downloader.rs Robustness: hang watchdog kills stalled yt-dlp/ffmpeg jobs (2.5) 2026-06-07 01:39:00 -07:00
error_class.rs Classify YouTube captcha wall as rate-limited, not "not found" 2026-06-01 08:47:14 -07:00
library.rs Performance: faster scans, thumbnails, library JSON, and codegen 2026-05-27 03:28:40 -07:00
main.rs Robustness: recover from poisoned locks instead of cascading panics (2.5) 2026-06-06 23:49:56 -07:00
maintenance.rs Add bundled yt-dlp, music library, Plex metadata, sort by date; security + perf hardening 2026-05-23 04:54:26 -07:00
platform.rs Nest all platforms under channels_root (was: siblings) 2026-05-27 10:38:01 -07:00
plex.rs Add multi-platform support: TikTok, Twitch, Vimeo, Bandcamp, SoundCloud, Odysee 2026-05-24 22:16:40 -07:00
pot_provider.rs Fix POT provider: install version-matched plugin, not PyPI upstream 2026-05-31 22:24:01 -07:00
stats.rs Add statistics view, editable source_url, rewrite security audit 2026-05-23 05:34:29 -07:00
theme.rs Desktop: shuffle + library backup + theme contrast fixes 2026-05-26 03:09:50 -07:00
tray.rs Add system tray with minimize-to-tray (Tartube parity 1.6) 2026-05-27 02:17:10 -07:00
util.rs Robustness: recover from poisoned locks instead of cascading panics (2.5) 2026-06-06 23:49:56 -07:00
web.rs Robustness: recover from poisoned locks instead of cascading panics (2.5) 2026-06-06 23:49:56 -07:00
ytdlp_bin.rs Bundled yt-dlp: install nightly (--pre) to fix broken impersonation 2026-06-01 04:22:56 -07:00