Skip to content

Send notification to Skeleton on Proxy destruction to "Unsubscribe" method.#358

Open
Tejveerpratap2803 wants to merge 1 commit intoeclipse-score:mainfrom
Tejveerpratap2803:tepr_proxy_method_unsubscribe_notification
Open

Send notification to Skeleton on Proxy destruction to "Unsubscribe" method.#358
Tejveerpratap2803 wants to merge 1 commit intoeclipse-score:mainfrom
Tejveerpratap2803:tepr_proxy_method_unsubscribe_notification

Conversation

@Tejveerpratap2803
Copy link
Copy Markdown
Contributor

@Tejveerpratap2803 Tejveerpratap2803 commented Apr 24, 2026

Notify Skeleton on Proxy destruction to unsubscribe method resources

When a Proxy is destroyed, TeardownMethods() now sends an UnsubscribeServiceMethod IPC message to the Skeleton, which removes the proxy's shared memory region and unregisters all method call handlers for that proxy.

  • Added UnsubscribeServiceMethod IPC path (local + remote) and RegisterOnServiceMethodUnsubscribedHandler to IMessagePassingService
  • Skeleton registers the unsubscription handler in PrepareOffer; on notification, it calls MethodResourceMap::Remove and unregisters all associated method call handlers
  • Added MethodUnsubscriptionRegistrationGuard RAII guard to manage handler lifetime; destroyed in PrepareStopOffer
  • Added SkeletonMethod::OnProxyMethodUnsubscribeFinished to complete the unsubscription flow
  • Refactored registration_guards_ from an ApplicationId-keyed map (with inner vector of guards) to a flat unordered_map<ProxyMethodInstanceIdentifier, pair<pid_t, MethodCallRegistrationGuard>> — one entry per proxy method instance; unsubscribe now erases by the full ProxyMethodInstanceIdentifier, preventing accidental removal of entries from other proxies sharing the same ApplicationId, while crash-detection cleanup still iterates by application_id extracted from the key to correctly remove all stale entries from a crashed process
  • Added unit tests covering all new IPC paths, the unsubscription flow, and the two-proxies-from-the-same-application scenario

@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as draft April 24, 2026 20:08
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 2 times, most recently from 5efbd22 to 11e9903 Compare April 27, 2026 02:34
@Tejveerpratap2803 Tejveerpratap2803 changed the title Send notification to Skeleton on Proxy destruction to "Unsubscribe" m… Send notification to Skeleton on Proxy destruction to "Unsubscribe" method. Apr 27, 2026
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 3 times, most recently from aae5669 to 53393c8 Compare April 28, 2026 18:00
@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as ready for review April 28, 2026 18:23
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 5 times, most recently from 30fdce5 to 3abf06f Compare April 28, 2026 21:17
@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as draft April 28, 2026 21:18
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 4 times, most recently from 6ca8e82 to a9c92e1 Compare April 28, 2026 21:49
@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as ready for review April 28, 2026 21:50
@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as draft April 28, 2026 21:50
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 4 times, most recently from caf69c5 to 680061a Compare April 29, 2026 04:50
@Tejveerpratap2803 Tejveerpratap2803 marked this pull request as ready for review April 29, 2026 05:29
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch 5 times, most recently from 84ee94a to fa47c66 Compare April 30, 2026 06:03
…ethod

- Add OnProxyMethodUnsubscribeFinished to notify SkeletonMethod when Proxy is destroyed
- Add MethodUnsubscriptionRegistrationGuard for cleanup management
- Add MethodResourceMap for tracking method resource ownership per proxy instance
- Refactor: use ProxyMethodInstanceIdentifier as key in registration_guards_
  (resolves intermediate solution from issue-250236)
@Tejveerpratap2803 Tejveerpratap2803 force-pushed the tepr_proxy_method_unsubscribe_notification branch from fa47c66 to 63f72b5 Compare April 30, 2026 11:26
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