Hide Forgot
Description of problem: The etime is computed as end_time - start_time. time is composed of two counters sec/nsec (timespec). When end_time.nsec > start_time.nsec then the nsec value in the etime is invalid. It should be 1B - (start_time.nsec - end_time.nsec) but it is 1B + (start_time.nsec - end_time.nsec) Then we can have logs like: [17/Jul/2019:10:12:02.880310556 -0400] conn=1642 op=34 SRCH base="cn=my_group,cn=groups,cn=accounts,<suffix>" scope=0 filter="(objectClass=*)" attrs="objectClass posixgroup cn userPassword gidNumber member ipaUniqueID ipaNTSecurityIdentifier modifyTimestamp entryusn ipaExternalMember uid" [17/Jul/2019:10:12:03.575336828 -0400] conn=1642 op=34 RESULT err=0 tag=101 nentries=1 etime=0.1301729719 Here etime should be close to 1000000000 - (880310556 - 575336828) = 0.695026272 This impact function slapi_timespec_diff Version-Release number of selected component (if applicable): All RHEL7 How reproducible: Not systematic. Run fast commands (search on cn=config), when start and end cover a second border, start.nsec > end.nsec Actual results: etime can contain wrong nsec value Expected results: etime should contain valid nsec value Additional info:
Upstream ticket: https://pagure.io/389-ds-base/issue/50510
Upstream pushed upstream -> POST
Verified on 389-ds-base: 1.3.10.1-1.el7 ds/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py::test_etime_at_border_of_second output : =============================================== test session starts ================================================ platform linux -- Python 3.6.3, pytest-5.1.2, py-1.8.0, pluggy-0.12.0 -- /opt/rh/rh-python36/root/usr/bin/python3 cachedir: .pytest_cache metadata: {'Python': '3.6.3', 'Platform': 'Linux-3.10.0-1077.el7.x86_64-x86_64-with-redhat-7.8-Maipo', 'Packages': {'pytest': '5.1.2', 'py': '1.8.0', 'pluggy': '0.12.0'}, 'Plugins': {'metadata': '1.8.0', 'html': '1.22.0'}} 389-ds-base: 1.3.10.1-1.el7 nss: 3.44.0-5.el7 nspr: 4.21.0-1.el7 openldap: 2.4.44-21.el7_6 cyrus-sasl: 2.1.26-23.el7 FIPS: disabled rootdir: /mnt/tests/rhds/tests/upstream/ds/dirsrvtests, inifile: pytest.ini plugins: metadata-1.8.0, html-1.22.0 collected 1 item ds/dirsrvtests/tests/suites/ds_logs/ds_logs_test.py::test_etime_at_border_of_second PASSED [100%]
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, 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/RHBA-2020:1064