Bug 1980192 - Network statistics copy a U64 into DECIMAL(18,4)
Summary: Network statistics copy a U64 into DECIMAL(18,4)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.3.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: eraviv
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks: 2030663
TreeView+ depends on / blocked
 
Reported: 2021-07-08 04:15 UTC by Jamie Bainbridge
Modified: 2022-05-26 16:22 UTC (History)
4 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2030663 (view as bug list)
Environment:
Last Closed: 2022-05-26 16:22:29 UTC
oVirt Team: Network
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5044561 0 None None None 2021-07-08 04:33:18 UTC
Red Hat Product Errata RHSA-2022:4711 0 None None None 2022-05-26 16:22:55 UTC
oVirt gerrit 117183 0 master MERGED core: align network stats tx\rx_bytes data types 2021-12-07 13:28:24 UTC
oVirt gerrit 117423 0 master MERGED core: align network stats tx\rx_drops definition & type 2021-12-07 13:28:26 UTC
oVirt gerrit 117549 0 master MERGED core: test network stats with big integer values 2021-12-07 13:28:28 UTC
oVirt gerrit 118145 0 master MERGED webadmin: display rx+tx drops as N/A 2022-01-04 08:07:57 UTC

Description Jamie Bainbridge 2021-07-08 04:15:44 UTC
Description of problem:

The stored procedure "UPDATE vds_interface_statistics" copies the kernel's network interface statistics into the database.

We have a NIC which has wrapped its rx_dropped counter, which is a U64, so the value is about (2^64 - 1) or ~18.4 quintillion with 20 digits.

The stored procedure copies this into "v_rx_drop DECIMAL(18, 4)" and gets a numeric overflow error, because you cannot copy a 20-digit number into an 18-digit field.

v_tx_drop would suffer the same problem.

Version-Release number of selected component (if applicable):

RHV 4.3

How reproducible:

Always

Steps to Reproduce:
1. Have a NIC with rx_dropped or tx_dropped greater than 10^14.

Actual results:

 ERROR: numeric field overflow
 Detail: A field with precision 18, scale 4 must round to an absolute value less than 10^14.

Expected results:

 No error

Additional info:

The NIC's rx_dropped counter is certainly an error on the NIC, which the customer is also trying to resolve with the hardware vendor.

That doesn't change the fact that ovirt shouldn't try to copy a value into a field which is too small for that value, and expose itself to this numeric overflow bug.

Comment 6 Michael Burman 2022-03-23 09:13:04 UTC
Verified on - rhvm-4.5.0-0.237.el8ev.noarch

Comment 11 errata-xmlrpc 2022-05-26 16:22:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: RHV Manager (ovirt-engine) [ovirt-4.5.0] security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:4711


Note You need to log in before you can comment on or make changes to this bug.