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

Simple Example Not Working #287

Closed
snehilchopra opened this issue Aug 20, 2020 · 6 comments
Closed

Simple Example Not Working #287

snehilchopra opened this issue Aug 20, 2020 · 6 comments
Assignees
Labels
area:sdk bug Something isn't working priority:p1 Issues that are blocking

Comments

@snehilchopra
Copy link
Contributor

snehilchopra commented Aug 20, 2020

The simple example does not seem to be working.
I believe this is because the span destructor is not being invoked, which in turn invokes the span.End() method.

As a workaround, one has to explicitly call the span.End() method.

However, this is causing a lot of memory leaks. I tried running the example with bazel run --config=asan //example/simple:example_simple, and the report is too long to be pasted here.

I believe this has something to do with the newly implemented Runtime context, as per the report.

Any insights on this would be really appreciated, thanks!

@snehilchopra snehilchopra added the bug Something isn't working label Aug 20, 2020
@snehilchopra
Copy link
Contributor Author

@pyohannes @reyang @maxgolov

@reyang reyang added area:sdk priority:p1 Issues that are blocking labels Aug 20, 2020
@pyohannes
Copy link
Contributor

I think the reason is that our Context implementation is not memory safe. A gobal context_handler_ is initialized, but never de-initialized.

I will look into sanitizing and stabilizing the Context part.

@pyohannes pyohannes self-assigned this Aug 21, 2020
@nadiaciobanu
Copy link
Contributor

nadiaciobanu commented Aug 25, 2020

This affects all similar examples (e.g. the OTLP exporter example). As a workaround, I could add calls to span.End() in the examples. What are your thoughts?

@nadiaciobanu
Copy link
Contributor

I've created an OTLP exporter example using explicit calls to span->End() (#296). These calls should be removed once this issue is resolved.

@jajanet
Copy link
Contributor

jajanet commented Sep 2, 2020

BTW the zPages example is buggy too, which is related to running spans that don't end I believe

@pyohannes
Copy link
Contributor

End() calls are added for spans (this is required now). Also, #321 fixes the memory problems related to the global context_handler_ variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:sdk bug Something isn't working priority:p1 Issues that are blocking
Projects
None yet
Development

No branches or pull requests

5 participants