thoth-station / cve-update-job

Update Thoth's database of CVEs
GNU General Public License v3.0
3 stars 9 forks source link

Overflow in metrics when too many message are sent #438

Closed fridex closed 2 years ago

fridex commented 3 years ago

Describe the bug

2021-10-26 13:04:19,032 1131429 CRITICAL root:105: Traceback (most recent call last):
  File "./app.py", line 240, in <module>
    __name__ == "__main__" and cli()
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "./app.py", line 214, in cli
    _METRIC_MESSSAGES_SENT.labels(
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/prometheus_client/metrics.py", line 263, in inc
    self._value.inc(amount)
  File "/home/fpokorny/.local/share/virtualenvs/cve-update-job-HOPZnyR_/lib/python3.8/site-packages/prometheus_client/values.py", line 21, in inc
    self._value += amount
OverflowError: int too large to convert to float

To Reproduce Steps to reproduce the behavior:

  1. Run cve-update-job on a fresh database without any CVE records
  2. See the error reported once all the data are stored in the database

Expected behavior

No exception should be raised.

fridex commented 3 years ago

/label bug

sesheta commented 3 years ago

@fridex: The label(s) /label bug cannot be applied. These labels are supported: community/discussion, community/group-programming, community/maintenance, community/question, deployment_name/ocp4-stage, deployment_name/ocp4-test, deployment_name/moc-prod, hacktoberfest, hacktoberfest-accepted, kind/cleanup, kind/demo, kind/deprecation, kind/documentation, kind/question, sig/advisor, sig/build, sig/cyborgs, sig/devops, sig/documentation, sig/indicators, sig/investigator, sig/knowledge-graph, sig/slo, sig/solvers, thoth/group-programming, thoth/human-intervention-required, thoth/potential-observation, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, triage/accepted, triage/duplicate, triage/needs-information, triage/not-reproducible, triage/unresolved

In response to [this](https://github.com/thoth-station/cve-update-job/issues/438#issuecomment-951920469): >/label bug > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
codificat commented 3 years ago

/kind bug

goern commented 2 years ago

/priority important-soon /help

sesheta commented 2 years ago

@goern: This request has been marked as needing help from a contributor.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/thoth-station/cve-update-job/issues/438): >/priority important-soon >/help Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sesheta commented 2 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

harshad16 commented 2 years ago

/lifecycle frozen

mayaCostantini commented 2 years ago

/sig devsecops

VannTen commented 2 years ago

At the risk of stating the obvious, this is certainly a logic error. There is 3504 cve currently reported for pypi at https://osv.dev/ , which is nowhere near the python float limit even if we had a downgraded float size. (even taking into account affected version multiplier and whatnot)

goern commented 2 years ago

@mayaCostantini @VannTen could you two walk through the readme on how to set up the database, and reproduce this issue /label thoth/group-programming

sesheta commented 2 years ago

@goern: The label(s) /label thoth/group-programming cannot be applied. These labels are supported: community/discussion, community/group-programming, community/maintenance, community/question, epic, hacktoberfest, hacktoberfest-accepted, kind/cleanup, kind/demo, kind/deprecation, kind/documentation, kind/question, tide/merge-method-merge, tide/merge-method-rebase, tide/merge-method-squash, triage/accepted, triage/duplicate, triage/needs-information, triage/not-reproducible, triage/unresolved, lifecycle/submission-accepted, lifecycle/submission-rejected

In response to [this](https://github.com/thoth-station/cve-update-job/issues/438#issuecomment-1322141968): >@mayaCostantini @VannTen could you two walk through the readme on how to set up the database, and reproduce this issue >/label thoth/group-programming Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
codificat commented 2 years ago

Moved from sig-devsecops to stack-guidance, as the topic at hand here is an update of knowledge around cve into