Skip to content

agents: fix crash in HttpCurlGlobalInitializer#34

Merged
santigimeno merged 1 commit intonode-v20.x-nsolid-v5.xfrom
santi/otlp_instance
Dec 1, 2023
Merged

agents: fix crash in HttpCurlGlobalInitializer#34
santigimeno merged 1 commit intonode-v20.x-nsolid-v5.xfrom
santi/otlp_instance

Conversation

@santigimeno
Copy link
Copy Markdown
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>
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.

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

2 participants