Skip to content
New issue

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

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

Already on GitHub? # to your account

agents: fix crash in HttpCurlGlobalInitializer #34

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

santigimeno
Copy link
Member

Make sure the HttpCurlGlobalInitializer static instance is created before the OTLPAgent so it's destroyed after the OTLPAgent in _run_exit_handlers. This fixes an insidious crash which happened if between the HttpCurlGlobalInitializer and OTLPAgent destruction, a config update caused the metrics_exporter to be reset to a specific exporter. This caused the HttpCurlGlobalInitializer instance destructor to be called twice thus crashing.

Fixes: #33

@santigimeno santigimeno self-assigned this Nov 24, 2023
Base automatically changed from santi/otlp_agent to node-v20.x-nsolid-v5.x November 30, 2023 22:41
@trevnorris trevnorris force-pushed the node-v20.x-nsolid-v5.x branch from 1a1236e to b2c1bb3 Compare November 30, 2023 23:47
Make sure the HttpCurlGlobalInitializer static instance is created before
the OTLPAgent so it's destroyed after the OTLPAgent in __run_exit_handlers.
This fixes an insidious crash which happened if between the
HttpCurlGlobalInitializer and OTLPAgent destruction, a config update caused
the metrics_exporter_ to be reset to a specific exporter. This caused the
HttpCurlGlobalInitializer instance destructor to be called twice thus
crashing.

Fixes: #33
PR-URL: #34
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
@santigimeno santigimeno merged commit 9eb4d06 into node-v20.x-nsolid-v5.x Dec 1, 2023
@santigimeno santigimeno deleted the santi/otlp_instance branch December 1, 2023 10:28
santigimeno added a commit that referenced this pull request Dec 6, 2023
Make sure the HttpCurlGlobalInitializer static instance is created before
the OTLPAgent so it's destroyed after the OTLPAgent in __run_exit_handlers.
This fixes an insidious crash which happened if between the
HttpCurlGlobalInitializer and OTLPAgent destruction, a config update caused
the metrics_exporter_ to be reset to a specific exporter. This caused the
HttpCurlGlobalInitializer instance destructor to be called twice thus
crashing.

Fixes: #33
PR-URL: #34
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
trevnorris pushed a commit that referenced this pull request Dec 7, 2023
Make sure the HttpCurlGlobalInitializer static instance is created before
the OTLPAgent so it's destroyed after the OTLPAgent in __run_exit_handlers.
This fixes an insidious crash which happened if between the
HttpCurlGlobalInitializer and OTLPAgent destruction, a config update caused
the metrics_exporter_ to be reset to a specific exporter. This caused the
HttpCurlGlobalInitializer instance destructor to be called twice thus
crashing.

Fixes: #33
PR-URL: #34
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIGSEGV on OTLPAgent deletion when running test-nsolid-otlp-config-start.js
2 participants