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

[exporter/datasetexporter] DataSet exporter is crashing on NPE #27648

Closed
martin-majlis-s1 opened this issue Oct 12, 2023 · 7 comments · Fixed by #27663
Closed

[exporter/datasetexporter] DataSet exporter is crashing on NPE #27648

martin-majlis-s1 opened this issue Oct 12, 2023 · 7 comments · Fixed by #27663
Assignees
Labels
bug Something isn't working exporter/dataset

Comments

@martin-majlis-s1
Copy link
Contributor

Component(s)

exporter/dataset

What happened?

Description

Steps to Reproduce

Expected Result

DataSet exporter should not crash on NPE.

Actual Result

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x1536c93]

goroutine 55 [running]:
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValues(0xc000661120?, {0xc010393b00, 0x36}, {0x2573be8, 0x1}, {0x0?, 0x0}, 0x7f271c3e6a10?)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:105 +0x73
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValuesMap(0x1?, {0xc00ee887e0, 0x28}, {0x2573be8, 0x1}, 0xc000661208?, 0x3)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:92 +0xcc
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValues(0xc000600000?, {0xc00ee887e0, 0x28}, {0x2573be8, 0x1}, {0x1bac520?, 0xc00e184420}, 0x0?)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:107 +0xf3
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValuesArray(0x1?, {0xc00ee88780, 0x26}, {0x2573be8, 0x1}, {0xc0108085c0?, 0x1, 0x1bac520?}, 0x2)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:99 +0xa5
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValues(0xc00e1a63e8?, {0xc00ee88780, 0x26}, {0x2573be8, 0x1}, {0x1abde20?, 0xc00e19e0d8}, 0x1bac520?)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:109 +0x148
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValuesMap(0x1bac520?, {0xc00c9830c0, 0x19}, {0x2573be8, 0x1}, 0xc000661478?, 0x1)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:92 +0xcc
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValues(0xc0006614f0?, {0xc00c9830c0, 0x19}, {0x2573be8, 0x1}, {0x1bac520?, 0xc00e1843f0}, 0xc00eebc101?)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:107 +0xf3
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValuesMap(0x9f747b?, {0x0, 0x0}, {0x2573be8, 0x1}, 0x1c?, 0x0)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:92 +0xcc
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.updateWithPrefixedValues(0x0?, {0x0, 0x0}, {0x2573be8, 0x1}, {0x1bac520?, 0xc00e184360}, 0x4?)
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/datasetexporter.go:107 +0xf3
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.buildEventFromLog({0xc0108083c0?}, {0xc00d37a000?}, {0x3b35000?}, {0xc0007ec090, 0x28}, {0xe0?, 0x17?, 0x66?})
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/logs_exporter.go:225 +0x9d2
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter.(*DatasetExporter).consumeLogs(0xc0006c3440, {0x259e3b8?, 0xc00e184030?}, {0x3b35000?})
	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datasetexporter@v0.85.0/logs_exporter.go:252 +0x13b

Collector version

v0.85.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@martin-majlis-s1 martin-majlis-s1 added bug Something isn't working needs triage New item requiring triage labels Oct 12, 2023
@martin-majlis-s1 martin-majlis-s1 changed the title DataSet exporter is crashing on NPE [exporter/datasetexporter] is crashing on NPE Oct 12, 2023
@martin-majlis-s1 martin-majlis-s1 changed the title [exporter/datasetexporter] is crashing on NPE [exporter/datasetexporter] DataSet exporter is crashing on NPE Oct 12, 2023
@github-actions
Copy link
Contributor

Pinging code owners for exporter/dataset: @atoulme @martin-majlis-s1 @zdaratom @tomaz-s1. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@martin-majlis-s1
Copy link
Contributor Author

/label -needs-triage

@martin-majlis-s1
Copy link
Contributor Author

@martin-majlis-s1
Copy link
Contributor Author

/label good-first-issue

@github-actions github-actions bot added good first issue Good for newcomers and removed needs triage New item requiring triage labels Oct 13, 2023
@martin-majlis-s1
Copy link
Contributor Author

It's done by the job - https://github.com/open-telemetry/opentelemetry-collector-contrib/actions/workflows/add-labels.yml - so it took some time. :)

@martin-majlis-s1
Copy link
Contributor Author

/label -good-first-issue

@github-actions github-actions bot removed the good first issue Good for newcomers label Oct 13, 2023
mx-psi pushed a commit that referenced this issue Oct 17, 2023
… nil (#27663)

**Description:** Nil is valid value for the attributes in events, spans,
resources, and scopes. Lets do not crash when it appears.

**Link to tracking Issue:** #27648

**Testing:** I have added unit tests to verify the fix.

**Documentation:** <Describe the documentation added.>
@martin-majlis-s1
Copy link
Contributor Author

This was closed in the PR - #27663

JaredTan95 pushed a commit to openinsight-proj/opentelemetry-collector-contrib that referenced this issue Oct 18, 2023
… nil (open-telemetry#27663)

**Description:** Nil is valid value for the attributes in events, spans,
resources, and scopes. Lets do not crash when it appears.

**Link to tracking Issue:** open-telemetry#27648

**Testing:** I have added unit tests to verify the fix.

**Documentation:** <Describe the documentation added.>
sigilioso pushed a commit to carlossscastro/opentelemetry-collector-contrib that referenced this issue Oct 27, 2023
… nil (open-telemetry#27663)

**Description:** Nil is valid value for the attributes in events, spans,
resources, and scopes. Lets do not crash when it appears.

**Link to tracking Issue:** open-telemetry#27648

**Testing:** I have added unit tests to verify the fix.

**Documentation:** <Describe the documentation added.>
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this issue Nov 12, 2023
… nil (open-telemetry#27663)

**Description:** Nil is valid value for the attributes in events, spans,
resources, and scopes. Lets do not crash when it appears.

**Link to tracking Issue:** open-telemetry#27648

**Testing:** I have added unit tests to verify the fix.

**Documentation:** <Describe the documentation added.>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/dataset
Projects
None yet
2 participants