[SERVER-25654] currentOp secs_running is negative if operation runs for over 24 days Created: 17/Aug/16  Updated: 31/Oct/16  Resolved: 24/Oct/16

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 3.3.11
Fix Version/s: 3.4.0-rc2

Type: Bug Priority: Minor - P4
Reporter: deyukong Assignee: Geert Bosch
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Steps To Reproduce:

do as description.
the reason is below: line 298 converts long long to int, it causes this bug

291     int totalTimeMillis() {
292         return (int)(totalTimeMicros() / 1000);
293     }   
294     long long elapsedMicros() {
295         return curTimeMicros64() - startTime();
296     }
297     int elapsedMillis() {
298         return (int)(elapsedMicros() / 1000);
299     }
300     int elapsedSeconds() {
301         return elapsedMillis() / 1000;
302     }

Sprint: Integration 2016-10-10, Integration 2016-10-31
Participants:

 Description   

If an operations runs for more than 24 days(such as WT RecordStoreThread: local.oplog.rs), the currentOp's secs_running field returns a negative value



 Comments   
Comment by Githook User [ 24/Oct/16 ]

Author:

{u'username': u'GeertBosch', u'name': u'Geert Bosch', u'email': u'geert@mongodb.com'}

Message: SERVER-25654 Don't use int millis for elapsed time
Branch: master
https://github.com/mongodb/mongo/commit/3389f25e111e62dc42eebf05dca5e052f3c96d79

Comment by Juan Asensio Sánchez [ 21/Sep/16 ]

We are also affected by this bug.

Comment by Ramon Fernandez Marina [ 17/Aug/16 ]

Thanks for the detailed report wolf_kdy, we'll investigate.

Generated at Thu Feb 08 04:09:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.