[GH-ISSUE #5561] [Bug] IDA doctor stops responding when its registration path is a FIFO #3386

Closed
opened 2026-10-31 00:39:48 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @coygeek on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5561

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Provider or capability discovery

Observed behavior

rea doctor --provider ida --json does not return a readiness report when REA_IDA_MCP_CONFIG selects a POSIX FIFO with no writer. In the independent reproduction, it emitted no stdout or stderr during a 10-second wait and remained running for another five seconds after SIGINT. The owned child then required SIGKILL. These are measured waiting bounds, not a measurement of an infinite duration.

Reproduction

The independent verifier ran the built source CLI with isolated HOME, XDG directories and temporary storage. All provider paths were absent fake paths inside the disposable fixture; the environment was constructed explicitly rather than inherited. No real IDA installation was required.

  1. Create a FIFO with Python os.mkfifo and leave it without a writer.
  2. Set REA_IDA_MCP_CONFIG to that FIFO's absolute path and run node scripts/rea.mjs doctor --provider ida --json from the built checkout.
  3. Use subprocess.Popen with captured stdout/stderr and communicate(timeout=10). After timeout, send SIGINT to that child and wait another five seconds. It remains pending; kill and reap that child with a further bounded wait.
  4. Repeat with regular-file controls: {"command":"not-executed-fake-ida","args":[]} succeeds without launching its configured command; malformed JSON ({) returns an unhealthy report with invalid_configuration.

The independent probe and a later readback of its reproduction script both observed the FIFO timeout and failed SIGINT wait. A separate control started the same FIFO command, waited three seconds, then opened a nonblocking writer, wrote the valid JSON above and closed it; doctor then completed successfully.

Expected behavior

Doctor should finish with an unhealthy report, an IDA registration failure carrying invalid_configuration, useful remediation and exit status 1 when the selected path cannot provide a regular JSON registration. It should not wait for a FIFO producer.

The contract is grounded in docs/ida-provider.md:22 (JSON registration file), docs/ida-provider.md:138 (doctor validates registration without starting IDA), docs/cli.md:514 (exit 1 for failed required checks), and the existing invalid-configuration result in src/ida/IdaDoctor.ts:29-41 at the tested revision.

Impact and scope

The caller receives no readiness result for this local configuration input and cannot terminate the tested invocation with SIGINT within the measured five-second wait. Regular JSON registration is a demonstrated workaround. The reproduction used macOS POSIX FIFOs; other platforms, real IDA execution and wider incidence were not tested. No target data loss or security boundary crossing was demonstrated.

REA version

6.7.0; independently reproduced from source commit 074768901f3cdc8205b61773fb1faf6f6c7b3ca8 using the existing built CLI.

Runtime and platform

Node.js v26.12.0; Darwin 27.0.0; arm64. Fake provider paths only; no real Hopper, Ghidra or IDA runtime was exercised.

Target and artifact context

No analysis binary or database. A caller-selected local FIFO is the IDA MCP registration input; regular valid and malformed JSON files provide controls.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

Independent probe observations:

regular valid JSON: exit 0, healthy true, 1.307 seconds
regular malformed JSON: exit 1, healthy false, registration code invalid_configuration, 1.268 seconds
FIFO, no writer: still running after 10 seconds; still running 5 seconds after SIGINT
external SIGKILL: Python return code -9; stdout_bytes 0; stderr_bytes 0; 15.013 seconds total
separate FIFO writer-release control: exit 0, healthy true, 3.021 seconds total

The malformed-file code is in providerInspections[id=ida].checks[name=registration].code; the flattened ida-registration check omits that code. A second run of the reproduction script observed the same FIFO behavior, with external termination after 15.014 seconds.

A submission-time source check of origin/main at d2a3269d0c1007e16a2f84d44cc0b1503debb2ae found src/ida/IdaConfiguration.ts and src/ida/IdaDoctor.ts unchanged from the tested baseline. This is a source freshness check, not a new runtime reproduction on that revision.

Typed outcome or recovery expected

An unhealthy selected-provider report with an IDA registration check carrying invalid_configuration and remediation, followed by exit 1, without requiring a writer or external termination. Preserve successful validation of regular JSON without launching IDA and the existing malformed-JSON failure.

Analysis or suspected cause

Source-derived: src/cli/setupCommands.ts:106-139 reaches src/doctorRuntime.ts:52-58, then src/ida/IdaDoctor.ts:12 calls readIdaConfiguration. In src/ida/IdaConfiguration.ts:61-67, the size guard does not reject non-regular files before synchronous readFileSync. A blocking synchronous read prevents the JavaScript signal handler from completing cancellation. The separate writer-release observation supports waiting on FIFO input as the cause of the stall.

Additional context

Prepared with AI assistance and independently reproduced by a separate verifier. This report concerns registration-file admission, not headless workspace validation or analysis-session cleanup. Searches included open/closed issues and PRs, including merged PRs; related non-regular-input fixes such as #1273 concern different readers.

NOT_ENOUGH_INFO: the last known good and first affected versions have not been established.

Originally created by @coygeek on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5561 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Provider or capability discovery ### Observed behavior `rea doctor --provider ida --json` does not return a readiness report when `REA_IDA_MCP_CONFIG` selects a POSIX FIFO with no writer. In the independent reproduction, it emitted no stdout or stderr during a 10-second wait and remained running for another five seconds after SIGINT. The owned child then required SIGKILL. These are measured waiting bounds, not a measurement of an infinite duration. ### Reproduction The independent verifier ran the built source CLI with isolated HOME, XDG directories and temporary storage. All provider paths were absent fake paths inside the disposable fixture; the environment was constructed explicitly rather than inherited. No real IDA installation was required. 1. Create a FIFO with Python `os.mkfifo` and leave it without a writer. 2. Set `REA_IDA_MCP_CONFIG` to that FIFO's absolute path and run `node scripts/rea.mjs doctor --provider ida --json` from the built checkout. 3. Use `subprocess.Popen` with captured stdout/stderr and `communicate(timeout=10)`. After timeout, send SIGINT to that child and wait another five seconds. It remains pending; kill and reap that child with a further bounded wait. 4. Repeat with regular-file controls: `{"command":"not-executed-fake-ida","args":[]}` succeeds without launching its configured command; malformed JSON (`{`) returns an unhealthy report with `invalid_configuration`. The independent probe and a later readback of its reproduction script both observed the FIFO timeout and failed SIGINT wait. A separate control started the same FIFO command, waited three seconds, then opened a nonblocking writer, wrote the valid JSON above and closed it; doctor then completed successfully. ### Expected behavior Doctor should finish with an unhealthy report, an IDA registration failure carrying `invalid_configuration`, useful remediation and exit status 1 when the selected path cannot provide a regular JSON registration. It should not wait for a FIFO producer. The contract is grounded in `docs/ida-provider.md:22` (JSON registration file), `docs/ida-provider.md:138` (doctor validates registration without starting IDA), `docs/cli.md:514` (exit 1 for failed required checks), and the existing invalid-configuration result in `src/ida/IdaDoctor.ts:29-41` at the tested revision. ### Impact and scope The caller receives no readiness result for this local configuration input and cannot terminate the tested invocation with SIGINT within the measured five-second wait. Regular JSON registration is a demonstrated workaround. The reproduction used macOS POSIX FIFOs; other platforms, real IDA execution and wider incidence were not tested. No target data loss or security boundary crossing was demonstrated. ### REA version 6.7.0; independently reproduced from source commit `074768901f3cdc8205b61773fb1faf6f6c7b3ca8` using the existing built CLI. ### Runtime and platform Node.js v26.12.0; Darwin 27.0.0; arm64. Fake provider paths only; no real Hopper, Ghidra or IDA runtime was exercised. ### Target and artifact context No analysis binary or database. A caller-selected local FIFO is the IDA MCP registration input; regular valid and malformed JSON files provide controls. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence Independent probe observations: ```text regular valid JSON: exit 0, healthy true, 1.307 seconds regular malformed JSON: exit 1, healthy false, registration code invalid_configuration, 1.268 seconds FIFO, no writer: still running after 10 seconds; still running 5 seconds after SIGINT external SIGKILL: Python return code -9; stdout_bytes 0; stderr_bytes 0; 15.013 seconds total separate FIFO writer-release control: exit 0, healthy true, 3.021 seconds total ``` The malformed-file code is in `providerInspections[id=ida].checks[name=registration].code`; the flattened `ida-registration` check omits that code. A second run of the reproduction script observed the same FIFO behavior, with external termination after 15.014 seconds. A submission-time source check of `origin/main` at `d2a3269d0c1007e16a2f84d44cc0b1503debb2ae` found `src/ida/IdaConfiguration.ts` and `src/ida/IdaDoctor.ts` unchanged from the tested baseline. This is a source freshness check, not a new runtime reproduction on that revision. ### Typed outcome or recovery expected An unhealthy selected-provider report with an IDA registration check carrying `invalid_configuration` and remediation, followed by exit 1, without requiring a writer or external termination. Preserve successful validation of regular JSON without launching IDA and the existing malformed-JSON failure. ### Analysis or suspected cause Source-derived: `src/cli/setupCommands.ts:106-139` reaches `src/doctorRuntime.ts:52-58`, then `src/ida/IdaDoctor.ts:12` calls `readIdaConfiguration`. In `src/ida/IdaConfiguration.ts:61-67`, the size guard does not reject non-regular files before synchronous `readFileSync`. A blocking synchronous read prevents the JavaScript signal handler from completing cancellation. The separate writer-release observation supports waiting on FIFO input as the cause of the stall. ### Additional context Prepared with AI assistance and independently reproduced by a separate verifier. This report concerns registration-file admission, not headless workspace validation or analysis-session cleanup. Searches included open/closed issues and PRs, including merged PRs; related non-regular-input fixes such as #1273 concern different readers. NOT_ENOUGH_INFO: the last known good and first affected versions have not been established.
Author
Owner

@matbrgz commented on GitHub (Oct 20, 2026):

Cross-referencing with canonical issue #5559 ([Bug] Doctor reports IDA ready with an unusable headless workspace root) and sibling #5604. Both address IDA provider readiness verification, registration path constraints (handling non-regular files / FIFOs), and workspace roots. Cataloged under Cluster BF in consolidation tracker #4330.

<!-- gh-comment-id:6295986378 --> @matbrgz commented on GitHub (Oct 20, 2026): Cross-referencing with canonical issue #5559 (`[Bug] Doctor reports IDA ready with an unusable headless workspace root`) and sibling #5604. Both address IDA provider readiness verification, registration path constraints (handling non-regular files / FIFOs), and workspace roots. Cataloged under Cluster BF in consolidation tracker #4330.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#3386
No description provided.