-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Access to Collector Log Pointer is not atomic #4939
Comments
Can I start looking into this ? |
@patil-kshitij by all means. I might have capacity to do so until next week so feel free. |
cc @djaglowski |
Thanks @sakshi1215. Assigned |
I was looking at this issue & have noticed that its no longer valid. Since version 0.54 we have remove the GetLogger method as well the Collector object no longer packagers Logger instance with it but only has LoggerOption under set.LoggingOptions
https://github.com/open-telemetry/opentelemetry-collector/blob/main/CHANGELOG.md#-breaking-changes--7 |
Thanks @sakshi1215. Closed |
Describe the bug
Access to the collectors log pointer is not atomic. If
GetLogger
is called beforeRun
the returned pointer is no longer valid as it is updated during startup.It also presents a race condition between calling shutdown and run as shutdown could reference the pointer in the recover before or after it's set.
Steps to reproduce
GetLogger
beforeRun
Run
What did you expect to see?
If I call
GetLogger
beforeRun
the pointer I'm given should update and log.What did you see instead?
Log pointer is not atomic so
GetLogger
will return a different point before and afterRun
is called.What version did you use?
v0.45.0
What config did you use?
Any will work
Environment
OS: MacOS 12.2.1
Compiler(if manually compiled): go 1.17.6
Additional Context
Action item from #4827
The text was updated successfully, but these errors were encountered: