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

[Bug]: Improper Handling of Invalid abci_query Paths Leading to Telemetry and Metrics Disruption #23472

Open
1 task done
kc1116 opened this issue Jan 21, 2025 · 0 comments
Open
1 task done
Labels

Comments

@kc1116
Copy link

kc1116 commented Jan 21, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

This bug in the Cosmos SDK telemetry system occurs when an invalid or unknown query path is passed to the abci_query endpoint. This causes the node to dynamically register invalid metrics with Prometheus, leading to disruptions in the /metrics endpoint and making it unusable until the node is restarted. This issue impacts anyone using Prometheus or other monitoring tools for observability of a Cosmos SDK node, as it prevents proper telemetry collection and operational visibility.

Cosmos SDK Version

v0.50.11

How to reproduce?

  1. Start a Cosmos SDK Node: Ensure the Cosmos SDK node is running with telemetry and metrics enabled.

  2. Send an Invalid abci_query Request: Execute the following command to send an invalid abci_query request with a malformed path (replace with a placeholder string):

curl -X GET "http://localhost:5702/abci_query?path=\"/cosmos/slashing/v1beta1/signing_infos/<validator-consensus-address>\""
  1. Scrape Metrics from /metrics Endpoint: Attempt to retrieve metrics from the /metrics endpoint:
curl http://localhost:6702/metrics
  1. Observe the Error: The /metrics endpoint will return an error and stop reporting valid metrics:
An error has occurred while serving metrics:
2 error(s) occurred:
* "cosmos__cosmos_slashing_v1beta1_signing_infos_<validator_consensus_address>" is not a valid metric name
* "cosmos_query__cosmos_slashing_v1beta1_signing_infos_<validator_consensus_address
@kc1116 kc1116 added the T:Bug label Jan 21, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Cosmos-SDK Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant