-
Notifications
You must be signed in to change notification settings - Fork 2.8k
invalid memory address or nil pointer dereference with log files larger than 1 MB #38289
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
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Pinging code owners for pkg/stanza/fileconsumer: @djaglowski. See Adding Labels via Comments if you do not have permissions to add labels yourself. For example, comment '/label priority:p2 -needs-triaged' to set the priority and remove the needs-triaged label. |
Fix: #38354 |
…tric count is greater than 0 (#38354) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Fix nil pointer dereference due to empty token <!-- Issue number (e.g. #1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes #38289 <!--Describe what testing was performed and which tests were added.--> #### Testing Added test which fails without the fix in place.
@pantanuj can you please confirm the fix by taking the latest pull? |
Uh oh!
There was an error while loading. Please reload this page.
Component(s)
receiver/otlpjsonfile
What happened?
Description
When the log file size being read exceeds 1 MB, collector errors out with invalid memory address or nil pointer dereference. The stack trace is
Steps to Reproduce
Configure pipeline to export logs to disk using file exporter. Default settings with max_megabytes set to 2.
Try to read the logs using a separate pipeline with otlpjsonfile receiver. Exporting to debug console for testing.
Expected Result
Log files should be parsed and should be written to console
Actual Result
Log files are parsed if size is small ( less than 1 MB). For any higher size, nil pointer exception is thrown
Collector version
0.120.1
Environment information
Environment
OS: Windows 11
OpenTelemetry Collector configuration
Log output
Additional context
No response
The text was updated successfully, but these errors were encountered: