Skip to content

AP-25563: Add diagnostic logging for intermittent Python gateway comm…#85

Draft
HedgehogCode wants to merge 1 commit intomasterfrom
bug/AP-25563-cannot-obtain-communication
Draft

AP-25563: Add diagnostic logging for intermittent Python gateway comm…#85
HedgehogCode wants to merge 1 commit intomasterfrom
bug/AP-25563-cannot-obtain-communication

Conversation

@HedgehogCode
Copy link
Contributor

…unication failures

Logs gateway lifecycle events (creation, closure) with thread and identity information to help diagnose the root cause of "Cannot obtain a new communication channel" errors. Tracks gateway ownership through object hash codes for correlation.

  • DefaultPythonGateway.close(): Log PID and calling thread at INFO level
  • PythonScriptingSession: Log gateway hash and thread at creation (INFO) and shutdown (ERROR)
  • PythonGatewayTracker.clear(): Log process count and triggering thread at ERROR level
  • QueuedPythonGatewayFactory: Log eviction count and thread at gate-close (WARN)
  • PythonGatewayCreationGate: Include thread name in P2 phase event logs (INFO)
  • PythonScriptNodeModel: Handle no-cause "Cannot obtain" variant with improved error message

When this error occurs again, correlating gateway hash and PID across log entries will reveal which code path triggered the unexpected shutdown.

AP-25563 (Investigate "Cannot obtain a new communication channel" Python failures)

…unication failures

Logs gateway lifecycle events (creation, closure) with thread and identity information
to help diagnose the root cause of "Cannot obtain a new communication channel" errors.
Tracks gateway ownership through object hash codes for correlation.

- DefaultPythonGateway.close(): Log PID and calling thread at INFO level
- PythonScriptingSession: Log gateway hash and thread at creation (INFO) and shutdown (ERROR)
- PythonGatewayTracker.clear(): Log process count and triggering thread at ERROR level
- QueuedPythonGatewayFactory: Log eviction count and thread at gate-close (WARN)
- PythonGatewayCreationGate: Include thread name in P2 phase event logs (INFO)
- PythonScriptNodeModel: Handle no-cause "Cannot obtain" variant with improved error message

When this error occurs again, correlating gateway hash and PID across log entries will
reveal which code path triggered the unexpected shutdown.

AP-25563 (Investigate "Cannot obtain a new communication channel" Python failures)
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
15.9% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant