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

Reuse discovery receiver's obsreport for receivercreator #5111

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

hughesjj
Copy link
Contributor

Without this, we get the following error

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


goroutine 86 [running]:
go.opentelemetry.io/collector/internal/sharedcomponent.(*Component[...]).Start.func1()
    	go.opentelemetry.io/[email protected]/internal/sharedcomponent/sharedcomponent.go:94 +0xcb
sync.(*Once).doSlow(0x410c85?, 0x7772e2fdd878?)
    	sync/once.go:74 +0xbf
sync.(*Once).Do(...)
    	sync/once.go:65
go.opentelemetry.io/collector/internal/sharedcomponent.(*Component[...]).Start(0xc00238ee60?, {0x7d76ba8?, 0xc002c1e230?}, {0x7d252b8?, 0xc0028a1650?})
    	go.opentelemetry.io/[email protected]/internal/sharedcomponent/sharedcomponent.go:89 +0x9b
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver.(*jmxMetricReceiver).Start(0xc002c223c0, {0x7d76978, 0xcb69ec0}, {0x7d252b8, 0xc0028a1650})
    	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/receiver.go:99 +0x911
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator.(*wrappedReceiver).Start(0xc002c21260, {0x7d76978, 0xcb69ec0}, {0x7d252b8, 0xc0028a1650})
    	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/runner.go:224 +0x154
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator.(*receiverRunner).start(0xc0022641c0, {{{{0xc002254cc0, 0x3}}, {0xc002254cc4, 0x9}}, 0xc002c20420, {0xc0022580f0, 0x45}}, 0xc0022580f0?, 0xc002225a40)
    	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/runner.go:110 +0xef8
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator.(*observerHandler).OnAdd(0xc002c220f0, {0xc002c0c300?, 0x5, 0x7d77ee0?})
    	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/observerhandler.go:150 +0x1632
github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer.(*EndpointsWatcher).updateAndNotifyOfEndpoints(0x0?, {0x7d77ee0, 0xc002c220f0}, {0xc002c222d0?, 0x0?, 0x0?}, 0x0?)
    	github.com/open-telemetry/opentelemetry-collector-contrib/extension/[email protected]/endpointswatcher.go:111 +0x1a3
created by github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer.(*EndpointsWatcher).notifyOfLatestEndpoints in goroutine 1
    	github.com/open-telemetry/opentelemetry-collector-contrib/extension/[email protected]/endpointswatcher.go:96 +0x1fb

To reproduce, download and extract (tar -xzvf repro-splunk-jmx.tar.gz) the following

splunk discovery -- bugs out (check the otelcol-config.yaml and change to the logs pipeline from the metrics pipeline to see it.. May also need to change process name in reproduce.sh for macs if on arm)

@hughesjj hughesjj marked this pull request as ready for review July 17, 2024 21:08
@hughesjj hughesjj requested review from a team as code owners July 17, 2024 21:08
@hughesjj hughesjj merged commit b91214c into main Jul 18, 2024
48 of 50 checks passed
@hughesjj hughesjj deleted the add_obsreport_to_telemetry branch July 18, 2024 00:00
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants