Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround: Delayed calls to release for ContextElementResponseVector objects #2994

Closed
kzangeli opened this issue Oct 4, 2017 · 1 comment

Comments

@kzangeli
Copy link
Member

kzangeli commented Oct 4, 2017

The premature releasing of ContextElementResponseVector objects in the function processOnChangeConditionForSubscription() provokes errors (detected by valgrind) when using these objects at creating the payload for notifications (using the objects after they've being freed).

A real solution is yet to be found, but we have a workaround, implemented in the PR #3009 .
This workaround consists in delaying the calls to release() of these ContextElementResponseVectors, saving pointers to the vectors and then at the end of the request (after the notification has been sent), all of them are released.

This issue is to not forget about this workaround, and that it would be better to find a real solution to the problem.

The implementation is in mongoGlobal.cpp (saving) and in rest.cpp (delayed release of the objects).

IMPORTANT
A thread variable holds a pointer to the ContextElementResponseVector objects to "delay-release", so the releasing function (delayedReleaseExecute) must be called from the same thread as the "populating function" (delayedReleaseAdd).

@fgalan
Copy link
Member

fgalan commented Jun 1, 2021

Initial notification functionality has been deprecated in Orion 3.1.0 (to be release soon). Thus, taking into account the rules at https://fiware-orion.readthedocs.io/en/master/deprecated/index.html

Bugs or issues related with deprecated features and not affecting any other feature are not addressed (they are closed in github.com as soon as they are spotted).

This issue is being closed.

@fgalan fgalan closed this as completed Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants