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

NullPointerException in the Profiling plugin (xpack.profiling.action.CO2Calculator.getKiloWattsPerCore) #109953

Closed
rockdaboot opened this issue Jun 20, 2024 · 2 comments · Fixed by #110024
Assignees
Labels
>bug Team:obs-knowledge Meta label for Observability Knowledge team :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure

Comments

@rockdaboot
Copy link
Contributor

rockdaboot commented Jun 20, 2024

Elasticsearch Version

8.15 snapshot, 8.14

Installed Plugins

No response

Java Version

bundled

OS Version

any

Problem Description

The Kibana flamegraph and TopN functions view in Universal Profiling stay empty, even though data exists.
The reason for this is a Null Pointer Exception in the profiling plugin caused by incomplete host metadata.

Relevant part of the stacktrace:

[2024-06-19T18:37:03,104][WARN ][r.suppressed             ] [runTask-0] path: /_profiling/topn/functions, params: {}, status: 500 java.lang.NullPointerException: Cannot invoke "String.hashCode()" because "<local2>" is null
        at org.elasticsearch.xpack.profiling.action.CO2Calculator.getKiloWattsPerCore(CO2Calculator.java:59)
        at org.elasticsearch.xpack.profiling.action.CO2Calculator.getAnnualCO2Tons(CO2Calculator.java:54)
        at org.elasticsearch.xpack.profiling.action.TransportGetStackTracesAction$StackTraceHandler.calculateCO2AndCosts(TransportGetStackTracesAction.java:631)
        at org.elasticsearch.xpack.profiling.action.TransportGetStackTracesAction$StackTraceHandler.mayFinish(TransportGetStackTracesAction.java:645)
        at org.elasticsearch.xpack.profiling.action.TransportGetStackTracesAction$StackTraceHandler.onHostsResponse(TransportGetStackTracesAction.java:601)

Steps to Reproduce

Use Universal Profiling in Kibana with incomplete entries in profiling-hosts.

Logs (if relevant)

No response

@rockdaboot rockdaboot added >bug needs:triage Requires assignment of a team area label :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure labels Jun 20, 2024
@elasticsearchmachine elasticsearchmachine added Team:obs-knowledge Meta label for Observability Knowledge team and removed needs:triage Requires assignment of a team area label labels Jun 20, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/obs-knowledge-team (Team:obs-knowledge)

@rockdaboot
Copy link
Contributor Author

An example record from profiling-hosts that triggers this NPE:

    "_source": {
      "profiling.project.id": "",
      "host.id": "",
      "@timestamp": 0,
      "ecs.version": "1.12.0"
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Team:obs-knowledge Meta label for Observability Knowledge team :UniversalProfiling/Application Elastic Universal Profiling REST APIs and infrastructure
Projects
None yet
2 participants