SShortSingh.
Back to feed

Orphaned grandchild process silently blocked pipe reads by holding write descriptor open

0
·1 views

A developer discovered their program had silently hung for forty minutes at zero percent CPU while waiting for an EOF signal that never arrived. The root cause was a grandchild process — spawned by the tool being orchestrated — that had inherited the pipe's write-end file descriptor from its parent. When the parent process was killed by a timeout, the grandchild remained alive with its copy of the descriptor open, preventing EOF from ever being delivered to the reader. Unlike a CPU-spinning infinite loop, this class of hang is nearly invisible in process monitors and metrics, appearing only as a slow-running task. The fix was to apply a timeout to the drain phase itself, abandoning the read after a few seconds if EOF does not arrive, ensuring no indefinite waits on conditions that may never be fulfilled.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingHacker News ·

Mador: Lightweight 80-Line JavaScript Library Makes Any DOM Element Reactive

A developer has released Mador, a minimalist open-source JavaScript library hosted on GitHub. The tool uses a Proxy-based state tuple to make any DOM element reactive without requiring a full framework. The entire implementation spans just 80 lines of code, emphasizing simplicity and low overhead. Mador was shared on Hacker News as a community project, attracting early attention from developers interested in lightweight front-end solutions.

0
ProgrammingHacker News ·

XCancel Twitter Proxy Service Returns Online After Downtime

XCancel, a privacy-focused proxy service for viewing Twitter content without tracking, has become available again after a period of inaccessibility. The service allows users to browse Twitter posts without being redirected to or tracked by the platform. The return was noted by the Hacker News community, though the post attracted minimal engagement with only 4 points and no comments. No official explanation for the prior downtime or the restoration was provided in the announcement.

0
ProgrammingDEV Community ·

SchemaCrawler Offers Three API Models to Explore and Understand Database Schemas

SchemaCrawler is an open-source tool that connects to any JDBC-accessible database and converts raw metadata into documentation, diagrams, lint reports, and a Java API. Its Java API provides three distinct programmatic models: Catalog, ERModel, and ImportanceModel, each offering a different level of abstraction over the same database. The Catalog model serves as the foundation, exposing physical database objects such as tables, columns, indexes, foreign keys, and routines directly from JDBC metadata. ERModel builds on Catalog to add inferred entity-relationship semantics, while ImportanceModel enables graph-based analysis of dependency topology and domain clustering. Together, the three models are designed to help developers document legacy databases, enforce design rules in CI pipelines, and make schema knowledge accessible to both humans and AI agents.

0
ProgrammingDEV Community ·

Developer builds authorization layer below app code, invites public to break it

A developer has publicly released a live demo of an insurance claims app called Sentinel, challenging users to breach its access control system using provided credentials and curl commands. Unlike conventional B2B apps that scatter authorization logic across endpoints and components, this system enforces access rules at the infrastructure level, before any application code executes. The demo runs two fictional insurers — Northwind Mutual and Cascade Assurance — on a single deployment, testing both field-level security and tenant isolation. Visitors can verify that policyholders never receive sensitive fields like fraud scores or internal notes, and that each insurer's claims data remains invisible to the other's staff. The developer argues that embedding authorization in application code is inherently fragile, as any single forgotten endpoint can cause a data leak serious enough to warrant a CVE.

Orphaned grandchild process silently blocked pipe reads by holding write descriptor open · ShortSingh